Giter Site home page Giter Site logo

bicubic_interpolation's Introduction

bicubic_interpolation

basicly write a bicubic algorithm without function provided by OpenCV

  1. The code makes use of two libraries: and <opencv2/opencv.hpp>.
  2. hfuction Function: This function calculates the weights for bicubic interpolation based on the given distance x. It uses different formulas for different distance intervals, as shown below:

$$ h(t) = \begin{cases} |t|^3 - 2|t|^2 + 1, & \text{if } |t| \leq 1 \\ -|t|^3+5|t|^2 - 8|t| + 4, & \text{if } 1 < |t| \leq 2 \\ 0, & \text{if } |t| > 2 \end{cases} $$

  1. The MOZU bird photo input size: 378x283; output size: 1024x720.
  2. I selected a 4x4 area in the same position of two resized images and printed their grayscale values, as shown in the illustration below. It can be found that there is a slight difference with the built-in function of OpenCV, which may be caused by a different approximation method, within a reasonable range.

bicubic_interpolation's People

Contributors

gdbnpio avatar

Watchers

 avatar

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.