So, I have an image from a digital scanner, its resolution is 26 Megapixel. I want to reduce the resolution of the image to 5 Megapixel.
Is it possible to reduce the resolution of an image without damaging the contents?
If yes, how to reduce it in OpenCV implementation?
Any help would be greatly appreciated. Thankyou
You can use cv2::resize()
resize(src, dst, Size(), factor, factor, interpolation);
here, interpolation
can be selected as cv::INTER_LANCZOS4
to obtain best interpolation results.
factor
is the sampling ratio and in order to transform from 26mp to 5mp you may need it to be 2.28
Downsampling always introduces some information and detail loss.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With