Midhun Mohan Midhun Mohan - 1 year ago 209
Java Question

How to resize an image in Java with OpenCV?

I am cropping the image and want to resize it next.

Mat croppedimage = cropImage( image, rect );
Mat resizeimage = croppedimage.resize( any dimension ); //need to change this line

How can I do this?

Answer Source

I think, you want this.


Mat croppedimage = cropImage(image,rect);
Mat resizeimage = new Mat();
Size sz = new Size(100,100);
Imgproc.resize( croppedimage, resizeimage, sz );
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download