Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

that's not a bug, but a programmer error, aka : your fault.

if the Mat's type is CV_8U, you have to use

image.at<uchar>(row,col);

easy to get wrong, so rather try to avoid per-pixel access at all.

that's not a bug, but a programmer error, aka : your fault.

if the Mat's type is CV_8U, you have to use

image.at<uchar>(row,col);

easy to get wrong, so rather try to avoid per-pixel access at all.

(a debug build of your program should also have thrown a proper exception here)

that's not a bug, but a programmer error, aka : your fault.

if the Mat's type is CV_8U, you have to use

image.at<uchar>(row,col);

easy to get wrong, so rather try to avoid per-pixel access at all.

(a debug build of your program should also have thrown a proper exception here)

that's not a bug, but a programmer error, aka : your fault.

if the Mat's type is CV_8U, you have to use

image.at<uchar>(row,col);

easy to get wrong, so rather try to avoid per-pixel access at all.

what you're doing is basically like:

image[ (width * y + x) * sizeof(int) ]

and this will get out of bounds easily th the edges, causing undefined behaviour.

that's not a bug, but a programmer error, aka : your fault.

if the Mat's type is CV_8U, you have to use

image.at<uchar>(row,col);

easy to get wrong, so rather try to avoid per-pixel access at all.

what you're doing is basically like:

image[ (width * y + x) * sizeof(int) ]

and this will get out of bounds easily th near the edges, causing undefined behaviour.