0

I have an image ımage has curves but these curves have cut ;not contunie How can I do more clear this curves with connected componenet enter image description here

j.doe
  • 327
  • 7
  • 22
  • Possible duplicate of [C++ and OpenCV: clustering white pixels algorithm](http://stackoverflow.com/questions/19114287/c-and-opencv-clustering-white-pixels-algorithm) – Miki Sep 02 '16 at 08:34
  • Labelling connected components wont help here, since you don't have _connected_ components. You can use a clustering algorithm [partition] where you can specify the predicate to cluster items. The code in the duplicate answer should give you a big cluster with the pixels in the curved line, and probably other small cluster for the small blobs. You may need to change the `` euclidean_distance` parameter – Miki Sep 02 '16 at 08:37
  • 1
    In case you want to approximate a curve by joining those fragments, you need to apply some morphological operations first: http://docs.opencv.org/2.4/doc/tutorials/imgproc/opening_closing_hats/opening_closing_hats.html – yati sagade Sep 02 '16 at 09:20
  • I tried contours ,morpological operation and clustering But ı cant a result any idea :( – j.doe Sep 02 '16 at 11:58

0 Answers0