简体   繁体   中英

Image segmentation using Python and OpenCV

I have been trying to segment the tread from images. The expected segmentation(manually segmented) is 1

在此处输入图片说明

The methods I have tried so far,

  • Found out the edges using the Line segment detector in OpenCV. Then grouped line segments based on nearness and orientation. From the groups, sampled the points to fit a two-degree polynomial. Using the curve equations, I found the mask for the tread.
  • Treated the problem as a binary segmentation problem and trained a CNN to get the mask. Since I don't have enough samples to train, I cannot use this method.
  • Tried out the watershed method. Failed due to poor marker construction.

Please note that I cannot use color thresholding as the background color changes.

Below is the image I want to segment.

在此处输入图片说明

Any idea on how I should approach this problem or which techniques will be useful will be of great help. I'm constrained to use Python and OpenCV.

Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM