Segmenting our input image

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

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.