cvFindContours () exception?-Collection of common programming errors

Why don’t you try something as follows:

Mat black = Mat::zeros(Size(100, 100), CV_8UC1);

vector< vector > contours;

if(sum(black).val[0] > 0.0)
{
    findContours(black, contours, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
}
else
{
    cout

Originally posted 2014-02-08 15:56:01.