Skip to content

hailiang194/resize-rotate-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resize and rotate image

Resize and rotate image using OpenCV in C++

This project is a demo project for resize and rotate image using nearest neighbor search, bilinear interpolation and bicubic interpolation

Installation

git clone https://github.com/hailiang194/resize-rotate-image.git

Nearnest neighbor searching

Execution file is in nearest_neibor/build/ folder

To execute type

./ResizeImage <image-path> <resize-ratio> [G]

Add G if you want gray scale image, otherwise it is going to color image

Bilinear interpolation

Execution file is in bilinear/build/ folder

To execute type

./ResizeImage <image-path> <resize-ratio> [G]

Add G if you want gray scale image, otherwise it is going to color image

Bicubic interpolation

Execution file is in bicubic/build/ folder

To execute type

./ResizeImage <image-path> <resize-ratio> [G]

Add G if you want gray scale image, otherwise it is going to color image

Rotate image

Execution file is in rotate-bilinear/build/ folder

To execute type

./RotateImage <image-path> <resize-ratio> [G]

Add G if you want gray scale image, otherwise it is going to color image

Usage example

Original image

original image

Nearest neighbor searching with resize ratio = 4.4

nearest neighbor searching

Bilinear interpolation with resize ratio = 4.4

bilinear

Bicubic interpolation with resize ratio = 4.4

bicubic

Rotate image with 30 degree

rotate

Development setup

Go to build/ folder of each project

Type

cmake ../

About

Resize and rotate image using OpenCV in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published