Coder Social home page Coder Social logo

kongxiaoan / android-scaling-algorithm-for-image Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 44.07 MB

图像缩放算法总汇,使用C++实现。包含创建的插值算法和基于变换的算法

CMake 0.02% Kotlin 0.09% C++ 94.12% C 5.64% Objective-C 0.13%

android-scaling-algorithm-for-image's Introduction

Android-Scaling-algorithm-for-image

图像缩放算法总汇,使用C++实现。包含创建的插值算法和基于变换的算法

图像缩放算法可以分为两类:插值算法和基于变换的算法。下面是一些常见的图像缩放算法:

  1. 最近邻插值算法(Nearest Neighbor Interpolation):最简单的插值算法,对于每个缩放后的像素点,选择与其最近的原始像素点的值作为它的值。该算法容易实现,但会导致图像出现锯齿状的边缘。
  2. 双线性插值算法(Bilinear Interpolation):该算法在最近邻插值算法的基础上,加入了对相邻四个像素点的加权平均,使得图像边缘更加平滑。
  3. 双三次插值算法(Bicubic Interpolation):该算法在双线性插值算法的基础上,对相邻16个像素点进行加权平均,得到更加平滑的图像。
  4. Lanczos插值算法(Lanczos Interpolation):该算法使用了一种卷积方法,通过对像素点周围的采样点进行加权平均,得到缩放后像素点的值。该算法在保持图像细节的同时,会对图像进行轻微模糊。
  5. Sinc插值算法(Sinc Interpolation):该算法基于信号处理中的Sinc函数,使用卷积方法对像素点进行加权平均。该算法在保持图像细节的同时,会对图像进行一定的模糊,但比Lanczos插值算法的模糊程度小。

基于变换的算法:除了插值算法,还有一些基于变换的算法,如双线性变换、双三次变换、图像金字塔等。这些算法会对原始图像进行一定的变换,再进行缩放。这些算法通常能够产生更高质量的缩放结果,但计算复杂度也更高。

img.png

android-scaling-algorithm-for-image's People

Contributors

kongxiaoan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

cybkw spysoos

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.