Giter Site home page Giter Site logo

template_matching's Introduction

Template_Matching

比较两幅图的差异来发现缺陷
使用sift和orb特征匹配

指标

评估两张图片相似度的时候,可以使用多种指标,其中一些常见的包括:

  1. 均方误差 (MSE): 这是一种简单直观的方法,通过计算两张图片对应像素之间的平方差的平均值来衡量它们的差异。MSE值越低,表明图片越相似。而对于需要快速简单比较的场景,MSE或PSNR可能更为适用。
  2. 结构相似性指数 (SSIM): 这是一种更先进的方法,用于测量两张图片的视觉结构、亮度和对比度的相似度。SSIM的值在0到1之间,值越接近1,表示图片越相似。对于需要高度视觉相似度的应用,SSIM可能是更好的选择。(from skimage.metrics import structural_similarity as compare_ssim)
  3. 峰值信噪比 (PSNR): 这通常用于信号处理中,但也可用于图像比较。它通过比较原始图像和压缩或失真图像的最大可能像素值和均方误差来衡量图像质量。数值越高,表示图像质量越好,相似度越高。
  4. 直方图比较: 这种方法通过比较两张图片的色彩分布来判断它们的相似度。有多种方法可以用来比较直方图,如卡方测试、相关性等。
  5. 余弦相似性:比较两个特征向量的角度,通常用于深度学习特征的比较。
  6. 汉明距离:用于比较两个二进制特征向量(如哈希码)的相似性。
  7. 特征匹配: 在更复杂的应用中,如计算机视觉,可以使用基于特征的方法来比较图像。这包括使用SIFT(尺度不变特征变换)、SURF(加速鲁棒特征)等算法提取关键点,并比较这些关键点之间的匹配度。

template_matching's People

Contributors

nyzhhd avatar

Stargazers

 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.