Goal of this project is to explore performance of OpenCL and its applications on image processing.
It's a high performance image resizing utility. It supports JPEG images and 3 sampling methods:
- nearest neighbor
- linear interpolation
- cubic interpolation
For high resolution images (2k+) it is faster than OpenCV. It's not particularly fast for low resolution images due to overhead of data transfer between CPU and GPU.
It resizes images on GPU (when found) rather than CPU. Detailed explanation can be found on my blog http://vaclavsamec.com/blog_resizer.
Call resizer
with these parameters:
Parameter | Description | Default |
---|---|---|
-input |
input directory of JPEG images | required |
-output |
output directory of resized images | required |
-quality |
quality of output JPEG image in range <1, 100> | 95 |
-algo |
sampling algorithm, use one of these [nn , linear cubic ] |
cubic |
-ratio |
ratio of resizing | 1.0 |
resizer -output ./testImages/output -input ./testImages/input -quality 95 -algo cubic -ratio 0.5
You need C++ compiler and following libraries:
- OpenCL
- Libjpeg Turbo
- CMake
See CMakeList.txt for further adjustments of libraries path.