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

青岛品牌设计线上seo关键词优化软件工具

青岛品牌设计,线上seo关键词优化软件工具,建设企业官方网站企业登录,菲纳斯wordpress操作系统:ubuntu22.04 OpenCV版本:OpenCV4.9 IDE:Visual Studio Code 编程语言:C11 算法描述 matchesGraphAsString 函数是OpenCV库中的一部分,位于 cv::detail 命名空间下。这个函数的主要作用是生成一个字符串表示的匹配图&am…
  • 操作系统:ubuntu22.04
  • OpenCV版本:OpenCV4.9
  • IDE:Visual Studio Code
  • 编程语言:C++11

算法描述

matchesGraphAsString 函数是OpenCV库中的一部分,位于 cv::detail 命名空间下。这个函数的主要作用是生成一个字符串表示的匹配图(matches graph),其中包含了一系列图像路径和它们之间的匹配信息。这对于调试或者可视化图像拼接过程中的匹配关系非常有用。

函数原型

String cv::detail::matchesGraphAsString 	
(std::vector< String > &  	paths,std::vector< MatchesInfo > &  	pairwise_matches,float  	conf_threshold 
) 	

参数

  • paths: 一个字符串向量,包含了参与匹配的所有图像的路径。
  • pairwise_matches: 包含了每对图像之间匹配信息的向量。每个MatchesInfo结构体通常包含关键点匹配、匹配的质量等信息。
  • conf_threshold: 置信度阈值,用于过滤掉那些被认为不够可靠的匹配。

返回值

返回一个字符串,表示图像匹配图。该字符串格式化为易于阅读的形式,可以用来展示哪些图像与哪些图像相匹配及其置信度等信息。

代码示例

#include <iostream>
#include <opencv2/opencv.hpp>
#include <opencv2/stitching/detail/matchers.hpp>
#include <vector>using namespace cv;
using namespace cv::detail;int main()
{// 示例图像路径std::vector< String > paths = { "/media/dingxin/data/study/OpenCV/sources/images/stich1.png", "/media/dingxin/data/study/OpenCV/sources/images/stich2.png" };// 加载图像std::vector< Mat > images;for ( const auto& path : paths ){Mat img = imread( path );if ( img.empty() ){std::cerr << "无法加载图像: " << path << std::endl;return -1;}images.push_back( img );}// 初始化特征检测器和描述符提取器Ptr< Feature2D > detector = ORB::create();std::vector< std::vector< KeyPoint > > keypoints( images.size() );std::vector< Mat > descriptors( images.size() );// 检测关键点并计算描述符for ( size_t i = 0; i < images.size(); ++i ){detector->detectAndCompute( images[ i ], noArray(), keypoints[ i ], descriptors[ i ] );}// 匹配描述符std::vector< MatchesInfo > pairwise_matches;BFMatcher matcher( NORM_HAMMING );for ( size_t i = 0; i < images.size(); ++i ){for ( size_t j = i + 1; j < images.size(); ++j ){std::vector< DMatch > matches;matcher.match( descriptors[ i ], descriptors[ j ], matches );MatchesInfo mi;mi.src_img_idx = static_cast< int >( i );mi.dst_img_idx = static_cast< int >( j );mi.matches     = matches;// 假设这里我们简单地设置了置信度为1.0f,实际应用中应根据实际情况设置mi.confidence = 1.0f;pairwise_matches.push_back( mi );}}// 设置置信度阈值float conf_threshold = 1.0f;try{// 调用matchesGraphAsString函数String matches_graph_string = matchesGraphAsString( paths, pairwise_matches, conf_threshold );std::cout << "Matches Graph:\n" << matches_graph_string << std::endl;}catch ( const std::exception& e ){std::cerr << "运行时错误: " << e.what() << std::endl;return -1;}return 0;
}

运行结果

Matches Graph:
graph matches_graph{
"stich1.png";
"stich2.png";
}
http://www.dtcms.com/wzjs/244043.html

相关文章:

  • 开源多商户商城系统seo推广的常见目的有
  • 重庆企业网站设计制作衡水seo排名
  • 苏州市建设培训网站安全员C类查询苏州网站建设书生商友
  • 网站功能建设描述书北京网站建设公司大全
  • 无锡网站建设推广公司无锡百度推广公司哪家好
  • 网站建设工资待遇99个创意营销方案
  • 阿里巴巴国际站运营培训浏览器网站进入口
  • 东营新闻网有没有免费的seo网站
  • 网页设计培训的授课学校seo排名大概多少钱
  • 免费做三级网站有哪些网球新闻最新消息
  • 自己做网站卖东西需要交税吗陕西seo推广
  • 做展示网站要恋用什么程序对网站外部的搜索引擎优化
  • 如何做网站的信息分类新东方在线网上课程
  • 郑州做网站好企业营销推广
  • 深圳市住房和建设局网站首页免费网站seo优化
  • 集团定制网站建设公司怎样通过网络销售自己的产品
  • 网站制作和网页制作区别最近发生的热点新闻
  • 辽宁网站建设论坛seo推广优化平台
  • 英文营销网站建设网络销售员每天做什么
  • php网站开发心得怎么免费自己做推广
  • 微信做自己网站b站推广软件
  • 海盐市网站建设长春网站快速优化排名
  • 中国城乡与住房建设部网站首页住房和城乡建设部官网
  • 网站建设方案策划书武汉百度开户代理
  • 高校网站建设需求分析推广app赚佣金接单平台
  • 网站建设开发程序五种常用的网站推广方法
  • 拼多多网站在那里做软文推广怎么写
  • 国家发改委网站开发区搜狗网
  • 聊城手机网站服务百度优化
  • 樊城网站建设各大网站提交入口