1 - Python
2 - Matplotlib
3 - Skimage
4 - bbox
5 - numpy
1 - Clone the repo
2 - Select the input and template images on this lines:
image = imread('examples/2.jpg', as_gray=False)
# load template and use the biggest box in it.
template = imread('examples/ref2.jpg', as_gray=True)
3 - Run the script:
python detect.py
In this technique a template of the desired object is chosen. Then a template area with a certain boundary in defined to search for optimal regions. For the analysis the input image is converted to gray-scale and then edges are extracted using skimage.feature.canny. Then the regions in the image are classified with skimage.measure.label using the connectivity method. Afterwards the derived regions are compared with the one from the template using the defined boundary. Lastly, to get more significant results, overlapping bounding-boxes are removed if they have 60% or more union percentage.