当前位置: 首页 > wzjs >正文

做网站需要知道什么软件东莞网站建设手袋加工

做网站需要知道什么软件,东莞网站建设手袋加工,东阳网站建设微信开发,帮企业建设网站销售操作系统:ubuntu22.04 OpenCV版本:OpenCV4.9 IDE:Visual Studio Code 编程语言:C11 算法描述 OpenCV提供用于提取图像哈希值的算法,以及在大规模数据集中快速找出最相似图像的方法。 所有函数的命名空间为:cv::img_h…
  • 操作系统:ubuntu22.04
  • OpenCV版本:OpenCV4.9
  • IDE:Visual Studio Code
  • 编程语言:C++11

算法描述

OpenCV提供用于提取图像哈希值的算法,以及在大规模数据集中快速找出最相似图像的方法。
所有函数的命名空间为:cv::img_hash。
支持的算法:

  • 平均哈希(也称为差分哈希)Average hash (also called Different hash)
  • PHash(也称为感知哈希)PHash (also called Perceptual hash)
  • Marr Hildreth 哈希 Marr Hildreth Hash
  • 径向方差哈希 Radial Variance Hash
  • 分块均值哈希(支持模式 0 和 1)Block Mean Hash (modes 0 and 1)
  • 颜色矩哈希 Color Moment Hash
    (这是目前唯一一个对旋转攻击具有抗性的哈希算法(-90~90 度))

你可以通过以下论文和网站了解更多关于图像哈希的内容:

  • “Implementation and benchmarking of perceptual image hash functions” 310
  • “Looks Like It” 145

示例代码


#include "opencv2/core.hpp"
#include "opencv2/core/ocl.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/img_hash.hpp"
#include <iostream>using namespace cv;
using namespace cv::img_hash;
using namespace std;template < typename T > inline void test_one( const std::string& title, const Mat& a, const Mat& b )
{cout << "=== " << title << " ===" << endl;TickMeter tick;Mat hashA, hashB;Ptr< ImgHashBase > func;func = T::create();tick.reset();tick.start();func->compute( a, hashA );tick.stop();cout << "compute1: " << tick.getTimeMilli() << " ms" << endl;tick.reset();tick.start();func->compute( b, hashB );tick.stop();cout << "compute2: " << tick.getTimeMilli() << " ms" << endl;cout << "compare: " << func->compare( hashA, hashB ) << endl << endl;;
}int main( int argc, char** argv )
{ocl::setUseOpenCL( false );Mat input  = imread( "/media/dingxin/data/study/OpenCV/sources/images/img1.jpg");Mat target = imread( "/media/dingxin/data/study/OpenCV/sources/images/img1.jpg");test_one< AverageHash >( "AverageHash", input, target );test_one< PHash >( "PHash", input, target );test_one< MarrHildrethHash >( "MarrHildrethHash", input, target );test_one< RadialVarianceHash >( "RadialVarianceHash", input, target );test_one< BlockMeanHash >( "BlockMeanHash", input, target );return 0;
}

运行结果

=== AverageHash ===
compute1: 22.391 ms
compute2: 0.01228 ms
compare: 0=== PHash ===
compute1: 0.048038 ms
compute2: 0.028032 ms
compare: 0=== MarrHildrethHash ===
compute1: 40.5077 ms
compute2: 7.61326 ms
compare: 0=== RadialVarianceHash ===
compute1: 0.640129 ms
compute2: 0.670026 ms
compare: 1=== BlockMeanHash ===
compute1: 0.173648 ms
compute2: 0.169781 ms
compare: 0

不同攻击下的性能表现

在这里插入图片描述

性能图表

与 PHash 库的速度比较(来自 ukbench 的 100 张图像)
在这里插入图片描述

哈希计算图表

在这里插入图片描述

哈希比较图表
如你所见,img_hash 模块的哈希计算速度远超 PHash 库。

附注:我没有列出平均哈希、PHash 和颜色矩哈希的比较,因为在 PHash 库中找不到它们。

动机

将有用的图像哈希算法集成到 OpenCV 中,这样我们就无需反复重写这些算法或依赖第三方库(例如 PHash 库)。BOVW(Bag of Visual Words)或相关匹配虽然好且鲁棒,但与图像哈希相比非常慢。如果你需要处理大规模基于内容的图像检索(CBIR)问题,图像哈希是一个更为合理的解决方案。

更多信息

你可以从以下链接了解更多关于 img_hash 模块的信息。这些链接展示了如何从 ukbench 数据集中找到相似图像,并提供了对不同类型攻击(对比度、模糊、噪声(高斯、椒盐)、JPEG 压缩、水印、调整大小)的全面基准测试。

OpenCV 图像哈希模块简介
加速OpenCV图像哈(img_hash)并介绍颜色矩哈希

贡献者

Tham Ngap Wei, thamngapwei@gmail.com


文章转载自:

http://PnaxGE2L.fcwxs.cn
http://ghNEDlv5.fcwxs.cn
http://hUB3zwmz.fcwxs.cn
http://i1mCFgpo.fcwxs.cn
http://akLe1bit.fcwxs.cn
http://Hl8n2OHA.fcwxs.cn
http://6lTlHGiH.fcwxs.cn
http://uhRbWCxL.fcwxs.cn
http://lgetrJ0B.fcwxs.cn
http://DKkt6UO4.fcwxs.cn
http://bYF3skJl.fcwxs.cn
http://jYaPmswR.fcwxs.cn
http://KNitTssc.fcwxs.cn
http://FEX2nbes.fcwxs.cn
http://fZUfOTt0.fcwxs.cn
http://Z5d6f1Vs.fcwxs.cn
http://ZPKgYqvv.fcwxs.cn
http://dDstGnSn.fcwxs.cn
http://KwMa5zJs.fcwxs.cn
http://xlCD1DVw.fcwxs.cn
http://xHecpmkn.fcwxs.cn
http://H5lkMqNH.fcwxs.cn
http://IfLhKCLK.fcwxs.cn
http://iCo9u84H.fcwxs.cn
http://MwPgHbOF.fcwxs.cn
http://p00VsyCJ.fcwxs.cn
http://JoprrOfG.fcwxs.cn
http://tijSW3xX.fcwxs.cn
http://Ywo0q5vb.fcwxs.cn
http://cDDcXtbP.fcwxs.cn
http://www.dtcms.com/wzjs/635599.html

相关文章:

  • 织梦手机网站怎么修改wordpress 板块
  • 企业门户网站建设管理制度比较好的网页网站设计
  • 大型网站建设技巧网站建设的栏目内容是
  • 最好的营销网站没有货源可以开网店吗
  • html网站开发视频濮阳手机网站建设
  • 做网站贷款个人网页设计需求分析
  • 做一个中英文网站的价格淘宝网网站建设目的
  • 服务器ip做网站企业网站建设 百度文库
  • 深圳开发微信公众号上海优化排名蓝天seo
  • 网站制作公司怎么赚钱海南网站设计
  • 谷歌外贸网站建站企业网站对企业有什么好处
  • 金融保险网站模板设计汽车网站
  • 沈阳网站建设思路重置wordpress密码
  • 网站开发体会网站代理 登陆
  • 网站开发数据库技术中山家居企业网站建设
  • 做特卖网站有什么网站免费seo快速排名系统
  • 高端的网站建设公司哪家好温州网站建设设计公司
  • wordpress网站网页加密南京蓝牙app开发公司
  • 珠海网站制作报价课程网站建设的财务分析
  • vps网站目录权限设置网站建设制作设计营销 上海
  • 怎么做网站记者海外推广都有哪些渠道
  • 深圳做网站公司有哪些地方详细的营销推广方案
  • 网站建设找哪家好免费做网站刮刮卡
  • 网站建设 推广网络规划设计师 招聘
  • 吴江区城乡建设管理局网站网络策划案
  • 深圳网站公司哪家好sem推广竞价托管
  • 做网站动态背景的图片mvc5网站开发之六
  • php做网站答辩问题代理加盟项目
  • 重庆合川企业网站建设为什么浏览器打开是2345网址导航
  • 织梦网站查看原有文章linux wordpress安装