Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

so, the type is uchar. there cannot be negative numbers.

if you wanted that, you have to convert to a type, which allows negative numbers, like CV_32S:

M.convertTo(M, CV_32S);

so, the type is uchar. there cannot be negative numbers.

(one could either overflow or saturate, opencv's arithmetic ops do saturation here.)

if you wanted that, you have to convert to a type, which allows negative numbers, like CV_32S:

M.convertTo(M, CV_32S);

so, the type is uchar. there cannot be negative numbers.

(one could either overflow or saturate, opencv's arithmetic ops do saturation here.)

if you wanted that, negative numbers here, you have to convert to a type, which allows negative numbers, it, like CV_32S:

M.convertTo(M, CV_32S);