This method essentially consists of understanding the characteristics of an image and its various classes and developing methods to classify the image class.
Note that the OpenCV method does not involve any training. For every contour, we define a bounding box using the OpenCV boundingRect property.
We will be using two important characteristics to select the bounding box:
- The size of the region of interest: We will eliminate all contours with a size that is less than 20.
Note that 20 is not a universal number, it just works for this image. For a larger image, the value can be larger.
- The color of the region of interest: Within each bounding box, we need to define the region of interest from 25% to 75% of the ...