Ask Your Question

Revision history [back]

If you want to write (on the disk) a part of your image, you should probably used the Region of Interest:

Mat Img = imread( "image/test.jpg" );
Mat subImg = Img(100,100);
imwrite( "myimage.png", subImg );