Building Computer Vision Projects with OpenCV 4 and C++
上QQ阅读APP看书,第一时间看更新

Segmenting our input image

Now, we are going to introduce two techniques to segment our threshold image:

  • Connected components
  • Find contours

With these two techniques, we are allowed to extract each region of interest (ROI) of our image where our targets objects appear. In our case, these are the nut, screw, and ring.