fast_image_resize
fast_image_resize copied to clipboard
no gaussian kernel
unexpected but here no standard gaussian kernel as opencv has https://docs.opencv.org/4.x/d4/d1f/tutorial_pyramids.html
The interpolation
argument of the resize() function has no value which mentions a Gaussian kernel:
https://docs.opencv.org/4.x/da/d54/group__imgproc__transform.html#ga5bb5a1fea74ea38e1a5445ca803ff121
it used here https://docs.opencv.org/4.x/d4/d86/group__imgproc__filter.html#gaf9bba239dfca11654cb7f50f889fc2ff special case of 2 times downsampling
You can use custom filter to implement Gaussian filter.
In other libraries (Pillow, libvips, OpenCV) I didn't see the use of Gaussian kernel for an "universal" resize function. Usually these libraries use a Gaussian filter to blur images.
yep, thanks, custom filter is a way. a little bit confused by using f64 (i think it's too precise ) . btw this lib has gaussian filter https://github.com/image-rs/image/blob/2b513ae9a6ac306e752914f562e7d408f096ba3f/src/imageops/sample.rs#L909
Thank you for link to Gaussian implementation from image-rs. I will use it to add Gaussian filter into fast_image_resize
in future.
a little bit confused by using f64
I copied it from Pillow
- https://github.com/python-pillow/Pillow/blob/main/src/libImaging/Resample.c
I don't know why they decided to use double
instead of float
.