Useful OpenCV snippets
A simple search function that traverses recursively the contour hierarchy given by openCV's findCountours, selecting only the contours that match a given criteria.
The example chooses contours contained in a rectangle with a given area and aspect ratio.