Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Extract object and save it as an image.png using c++

HI Forum , Actually I work on a car detection project at real time, when I launch the camera I want to make a screenshot (.png) for any car and save it in a path, which means i need a function in opencv that does the screenshot of just a car detected (not all windows).

Suppose you have the following image:

image description

Now i want to extract to individual images each of the independent cars, like this for example:

image description

NB: i have a function can be detect object and draw a contour of each object is FeatureTracker() , i would use it for extracting image and save it in path/image.png

Thanks in advice