PillowResize library is a C++ porting of the resize method from the Pillow python library.

Overview

Pillow Resize

Table of Contents

Description

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.

Requirements

The only requirement is OpenCV, so install it from your package manager.

Compilation

git clone --recurse https://github.com/zurutech/PillowResize.git
cd PillowResize
git submodule update --init --recursive
mkdir build && cd build
cmake ..
make

Installation

To install 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

Uninstall

To uninstall PillowResize and all the things it brings with it simply run

cd build
sudo make uninstall

Usage

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.

Installed package

find_package(PillowResize REQUIRED)

Subdirectory

add_subdirectory(path-to-subdir)

Link

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 "${PILLOWRESIZE_LIBS}".

You might also like...
A file dialog library for Dear ImGui
A file dialog library for Dear ImGui

ImFileDialog A simple file dialog library for Dear ImGui. This library supports favorites, actual Windows icons, image previews, zooming in, etc... DI

Intel® Open Image Denoise library
Intel® Open Image Denoise library

Intel Open Image Denoise is an open source library of high-performance, high-quality denoising filters for images rendered with ray tracing

lunasvg is a standalone SVG rendering library in C++
lunasvg is a standalone SVG rendering library in C++

lunasvg is a standalone SVG rendering library in C++

Arduino PNG image decoder library
Arduino PNG image decoder library

An 'embedded-friendly' (aka Arduino) PNG image decoding library

ZT is a zig-contained library that automatically compiles+links ImGui, OpenGL, and GLFW into typed packages.
ZT is a zig-contained library that automatically compiles+links ImGui, OpenGL, and GLFW into typed packages.

ZT is a zig-contained library that automatically compiles+links ImGui, OpenGL, and GLFW into typed packages. By zig contained I mean that ZT is intend

libvot - A C++11 multi-thread library for image retrieval

libvot is a fast implementation of vocabulary tree, which is an algorithm widely used in image retrieval and computer vision. It usually comprises three components to build a image retrieval system using vocabulary tree: build a k-means tree using sift descriptors from images, register images into the database, query images against the database. I

ppl.cv is a high-performance image processing library of openPPL supporting x86 and cuda platforms.

ppl.cv is a high-performance image processing library of openPPL supporting x86 and cuda platforms.

An 'embedded-friendly' (aka Arduino) JPEG image encoding library

Starting in the late 80's I wrote my own imaging codecs for the existing standards (CCITT G3/G4 was the first). I soon added GIF, JPEG and not long after that, the PNG specification was ratified. All of this code was "clean room" - written just from the specification. I used my imaging library in many projects and products over the years and recently decided that some of my codecs could get a new lease on life as open source, embedded-friendly libraries for microcontrollers.

The CImg Library is a small and open-source C++ toolkit for image processing
The CImg Library is a small and open-source C++ toolkit for image processing

http://cimg.eu The CImg Library is a small and open-source C++ toolkit for image processing, designed with these properties in mind: CImg defines clas

Comments
  • Complie Error

    Complie Error

    Dear Dep: I have cloned the pillow-resize and complied it. But met some Error as followed: the first one is "error: ‘_clip8_lut’ declared as an ‘inline’ field", the second is "‘static constexpr auto PillowResize::_lut(Generator&&) [with long unsigned int Length = 1280ul; Generator = PillowResize::<lambda(size_t)>]’ called in a constant expression _lut([](size_t n) -> uchar {". Could you help me to solve them?

    Thanks.

    opened by hongshenggeng 4
  • how to Anti-alias

    how to Anti-alias

    hello, i follow your code and trying to find how to "anti-alias". But not a clue. Could your plz, common it on code or apply some ref. on your "anti-alias" methods. Many thx!!! @marcov868

    opened by TanFluent 1
Owner
Zuru Tech
Open source @ ZURU Tech
Zuru Tech
This library provides a cross-platform image loading library in C11 for projects based on our foundation library

Image Library - Public Domain This library provides a cross-platform image loading library in C11 for projects based on our foundation library.

Mattias Jansson 1 Jan 29, 2022
GD Graphics Library

GD Graphics (Draw) Library GD is an open source code library for the dynamic creation of images by programmers. GD is written in C, and "wrappers" are

GD Graphics Library 777 Dec 28, 2022
An open source library for face detection in images. The face detection speed can reach 1000FPS.

libfacedetection This is an open source library for CNN-based face detection in images. The CNN model has been converted to static variables in C sour

Shiqi Yu 11.4k Jan 8, 2023
A fast image processing library with low memory needs.

libvips : an image processing library Introduction libvips is a demand-driven, horizontally threaded image processing library. Compared to similar lib

libvips 26 Nov 10, 2022
C++ image processing and machine learning library with using of SIMD: SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX-512, VMX(Altivec) and VSX(Power7), NEON for ARM.

Introduction The Simd Library is a free open source image processing and machine learning library, designed for C and C++ programmers. It provides man

Ihar Yermalayeu 1.7k Jan 5, 2023
Tiny ISO-compliant C++ EXIF and XMP parsing library for JPEG.

TinyEXIF: Tiny ISO-compliant C++ EXIF and XMP parsing library for JPEG Introduction TinyEXIF is a tiny, lightweight C++ library for parsing the metada

cDc 84 Dec 18, 2022
Video++, a C++14 high performance video and image processing library.

Video++ Video++ is a video and image processing library taking advantage of the C++14 standard to ease the writing of fast video and image processing

Matthieu Garrigues 692 Dec 28, 2022
a generic C++ library for image analysis

VIGRA Computer Vision Library Copyright 1998-2013 by Ullrich Koethe This file is part of the VIGRA computer vision library. You may use,

Ullrich Koethe 378 Dec 30, 2022
A C++ library for Background Matting

libovmatting A C++ library for Background Matting using openvino and deep learning models. Now support models such as BackgroundMattingV2, MODNet. App

null 45 Nov 22, 2022