Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

crop image to itself c++

Hi

When I crop image to itself do I need the .clone() function?

I mean:

Mat image = imread("somePath.bmp");

What is the right way to crop it?

image = image(rect(0,0,10,10)).clone();

or I can save the clone() and write

image = image(rect(0,0,10,10));

Thanks to all the helpers

crop image to itself c++

Hi

When I crop image to itself do I need the .clone() function?

I mean:

Mat image = imread("somePath.bmp");

imread("somePath.bmp");

What is the right way to crop it?

image = image(rect(0,0,10,10)).clone();

image(rect(0,0,10,10)).clone();

or I can save the clone() and write

image = image(rect(0,0,10,10));

image(rect(0,0,10,10));

Thanks to all the helpers