Table of Contents
PillowResize library is a C++ porting of the resize method from the Pillow python library.
It is written in C++ using OpenCV for matrix support
The main difference with respect to the
resize method of OpenCV is the use of an anti aliasing filter, that is missing in OpenCV and could introduce some artifacts, in particular with strong down-sampling.
See also blog.
The only requirement is
OpenCV, so install it from your package manager.
git clone --recurse https://github.com/zurutech/PillowResize.git cd PillowResize git submodule update --init --recursive mkdir build && cd build cmake .. make
PillowResize as a package ensure that you have
OpenCV installed system-wide, then simply compile and install.
mkdir build && cd build cmake .. sudo make install
PillowResize and all the things it brings with it simply run
cd build sudo make uninstall
The library uses
cmake, hence this library can be added as a subdirectory and built together with your project or use the installed package as a normal CMake package.
target_link_libraries(your-target PUBLIC PillowResize)
The library defines also the variable
PILLOWRESIZE_LIBS, so you can replace
PillowResize in the command above with