Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

your temp Mat is CV_8UC1, so you have to use:

temp.at<uchar>(contour[0][i])=255;

in general, please try to avoid per-pixel access, and use builtin functions, like drawContours() here.