Ask Your Question

Revision history [back]

cropping image with matlab module OpenCV4.1.1

Hi, I'm trying to crop binary image using the opencv_matlab module and code

Mat maskImg; // input Mat bodyMask; //output Rect ROI(135, 135, 248, 230); Mat ROIim = maskImg(ROI); ROIim.copyTo(bodyMask);

and I get incorrect results comparing to Matlab, so that some additional parts are removed from the image inside the cropping box. Am I doing anything wrong?

Thank you.