Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

findContours() destroys the image, so you either need to show it before applying findContours(),

or pass a copy :

findContours(imgThresholded.clone(), contours, hierarchy, CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE);