I crop the image and want to change it further.
Mat croppedimage = cropImage( image, rect ); Mat resizeimage = croppedimage.resize( any dimension ); //need to change this line
How can i do this?
I think you want this .
eg.
Mat croppedimage = cropImage(image,rect); Mat resizeimage = new Mat(); Size sz = new Size(100,100); Imgproc.resize( croppedimage, resizeimage, sz );
Read the C ++ Resize method manual, it is the same as in java.
You can choose the type of interpolation. In some cases, it is important to achieve the best result.
Mat croppedImage = cropImage(image,rect); Mat resizeImage = new Mat(anyHeight, anyWidth, croppedImage.type()); int interpolation = Imgproc.INTER_CUBIC; Imgproc.resize(croppedImage, resizeImage, resizeImage.size(), 0, 0, interpolation );