GithubHelp home page GithubHelp logo

yasinenigma / image_interpolation Goto Github PK

View Code? Open in Web Editor NEW
33.0 2.0 7.0 241 KB

Image interpolation implementation using pure python and compare result with Opencv.

License: MIT License

Python 100.00%
image-processing interpolation interpolation-methods python opencv image-interpolation

image_interpolation's Introduction

Image Interpolation

Hits

Image interpolation refers to the resizing of a digital image. Interpolation is the problem of approximating the value of a function for a non-given point in some space when given the value of that function in points around (neighboring) that point.

Image interpolation have three main techniques:

1. Nearest Neighbor Interpolation

Nearest-neighbor interpolation (also known as proximal interpolation or, in some contexts, point sampling) is a simple method of multivariate interpolation in one or more dimensions. The nearest neighbor algorithm selects the value of the nearest point and does not consider the values of neighboring points at all, yielding a piecewise-constant interpolant. The algorithm is very simple to implement and is commonly used (usually along with mipmapping) in real-time 3D rendering to select color values for a textured surface (Wikipedia).

"Nearest Neighbor Interpolation"

2. Bilinear Interpolation

Bilinear interpolation is performed using linear interpolation first in one direction, and then again in the other direction. Bilinear interpolation uses values of only the 4 nearest pixels, located in diagonal directions from a given pixel, in order to find the appropriate color intensity values of that pixel (Wikipedia).

"Bilinear Interpolation" "Bilinear Algorithm"

3. Bicubic Interpolation

In image processing, bicubic interpolation is often chosen over bilinear or nearest-neighbor interpolation in image resampling, when speed is not an issue. In contrast to bilinear interpolation, which only takes 4 pixels (2ร—2) into account, bicubic interpolation considers 16 pixels (4ร—4)(Wikipedia) "Bicubic Interpolation"  "Bicubic convolution formula"

Results

"Opencv implementation" "My Implementation" "Compare results"

Clone project

$ git clone https://github.com/yasinEnigma/Image_Interpolation/
$ pip3 install -r requirements.txt
$ python3 main.py

image_interpolation's People

Contributors

yasinenigma avatar zhguichen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

image_interpolation's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.