Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you simply cannot copy a 64FC3 image into a ROI of an 8UC3 image

you simply cannot copy a 64FC3 image into a ROI of an 8UC3 imageimage.

also, the whole conversion / copyTo is unnessecary, and you should avoid doing any operation on pixels.

it could be as easy as:

Mat A = frame.submat(rects[i]); // reference to "frame" pixels
Core.divide(2.0, A, A);         // in-place

you simply cannot copy a 64FC3 image into a ROI of an 8UC3 image.

also, the whole conversion / copyTo is unnessecary, and you should avoid doing any operation on pixels.

it could be as easy as:

Mat A = frame.submat(rects[i]); // reference to "frame" pixels
Core.divide(2.0, A, A);         // in-place