Skip to content

primum-coertus/bicubic-interpolation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bicubic-interpolation

This repository is for simple implementation of 'Bicubic-interpolation for images' (Python3).

Table of contents

Formulation

  • Interpolation kernel [1]

  Formulation

  • Interpolation Use the values of 16 pixels around the new pixel dst(x,y) [1][2]. (x,y) shows the location of pixels.

  Formulation2

Here, f means the values of pixels. x1, x2, x3, x4 are the distance of x direction from new pixel to near 16 pixels. y1, ... are the distance of y direction.

Example

  • Upscale input image 2 times (ratio = 2) The 'butterfly' image is from [3].

  Input image

  ↑ Input image (256x256)

  Output image

  ↑ Output image (512x512)

Requirement

  1. Minimun Python 3.5.2 installed, check in your cmd/terimal.

    $ python --version
    

    or

    $ python3 --version
    
  2. numpy and opencv libraries installed.

    $ pip3 install numpy opencv-python
    

    or

    $ pip3 freeze -r requirements.txt
    

Installation

$ git clone https://github.com/Kel-1-Cabang-GitHub/bicubic-interpolation.git`

Usage

$ python src\bicubic.py

or

$ python3 src\bicubic.py

Reference

  1. R. Keys, "Cubic convolution interpolation for digital image processing," in IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 29, no. 6, pp. 1153-1160, December 1981. URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1163711&isnumber=26156
  2. 奥富正敏ら, "ディジタル画像処理[改定新版]", CG-ARTS協会, pp. 170-171, 2016.
  3. M. Bevilacqua, A. Roumy, C. Guillemot and ML. Alberi, "Low-Complexity Single-Image Super-Resolution based on Nonnegative Neighbor Embedding",BMVC 2012.
  4. https://github.com/yunabe/codelab/blob/master/misc/terminal_progressbar/progress.py to show the progress.

Credits

@rootpine

Releases

No releases published

Packages

No packages published

Languages