Match-----Correlation-----find_ncc_model_exposure
* This example program shows how to use HALCON's correlation-based
* matching. In particular it demonstrates the robustness of this method against
* linear illumination changes. The training is performed in an image with good
* illumination. The matching is applied in images where the exposure time varies
* extremely from very short to very long.
********光照不均匀、明暗变化、且背景最好不能太复杂时用相关性匹配********
read_image (Image, 'cap_exposure/cap_exposure_03')
get_image_size (Image, Width, Height)
dev_close_window ()
dev_open_window (0, 0, Width, Height, 'black', WindowHandle)
dev_update_window ('off')
dev_display (Image)
gen_circle (Circle, 246, 336, 150)
area_center (Circle, Area, RowRef, ColumnRef)
reduce_domain (Image, Circle, ImageReduced)
*create_ncc_model(Template : : NumLevels, AngleStart, AngleExtent, AngleStep, Metric : ModelID)
*Template指定模板的单通道图像:单通道灰度图像
*NumLevels指定最高金字塔等级:金字塔最大层数,层数越多(向下),搜索的越快,但精度下降
*AngleStart指定模板最小旋转角度:模板最小的旋转角度
*AngleExtent指定模板角度的扩展范围:模板旋转范围
*AngleStep指定步距:每次旋转角度的步长(步长越小,旋转次数越多,越耗时?)
*Metric指定匹配标准:极性 ignore_global_polarity:忽略全局极性(对比度不好的忽略)
*ModelID:句柄 即标示
*新建create_ncc_model后,模板中心角度归为零度
create_ncc_model (ImageReduced, 'auto', 0, 0, 'auto', 'use_polarity', ModelID)
dev_set_draw ('margin')
dev_display (Image)
dev_display (Circle)
stop ()
Rows := []
Cols := []
for J := 1 to 10 by 1
*J$'02' 表示此字符宽度为2,左边补0 J=1时为‘01’ J=2时为‘02’ 以此类推
read_image (Image, 'cap_exposure/cap_exposure_' + J$'02')
*find_ncc_model(Image : : ModelID, AngleStart, AngleExtent, MinScore, NumMatches, MaxOverlap, SubPixel, NumLevels : Row, Column, Angle, Score)
*在输入图像中查找指定数目的NCC模板实例
*Image : : ModelID, AngleStart, AngleExtent:同上
*MinScore指定模型查找得分阈值:0~1之间 越高越不容易被找到
*NumMatches:指定要查找的匹配实例的数目 0:缺省(都找)
*MaxOverlap:指定最大交叠系数 0~1之间 接近1两个模板冲动容易被找到 接近0模板重叠越不容易被找到
*SubPixel:指定是否要求亚像素精度匹配
*NumLevels:指定匹配的金字塔等级
*Row, Column, Angle, Score:输出查找到的模板实例的行坐标、列坐标、角度、得分(可能是一组或者多组) Angle指与水平的夹角
find_ncc_model (Image, ModelID, 0, 0, 0.5, 1, 0.5, 'true', 0, Row, Column, Angle, Score)
* disp_circle (WindowHandle, Row, Column, 150)
vector_angle_to_rigid (RowRef, ColumnRef, 0, Row, Column, 0, HomMat2D)
*临近插值
affine_trans_region (Circle, RegionAffineTrans, HomMat2D, 'nearest_neighbor')
***********注意语法***********
Rows := [Rows,Row]
Cols := [Cols,Column]
dev_display (Image)
dev_display (RegionAffineTrans)
stop ()
endfor
* Compute the standard deviation of the found positions. If the individual
* positions in Rows and Cols are examined, it can be seen that the standard
* deviation is caused mainly by the last four images, which are severely
* overexposed.
*求标准偏差
StdDevRows := deviation(Rows)
StdDevCols := deviation(Cols)
clear_ncc_model (ModelID)
Match-----Correlation-----find_ncc_model_exposure的更多相关文章
- WebSphere MQ性能调优浅谈
导读:目前随着我们在中国的WebSphere MQ(MQSeries)用户数量越来越多,越来越多的用户开始对MQ使用时的性能优化问题提出要求,我根据日常积累的经验谈一谈在MQ性能优化方面应该考虑的因素 ...
- 归一化交叉相关Normalization cross correlation (NCC)
归一化交叉相关Normalization cross correlation (NCC) 相关系数,图像匹配 NCC正如其名字,是用来描述两个目标的相关程度的,也就是说可以用来刻画目标间的相似性.一般 ...
- [文学阅读] METEOR: An Automatic Metric for MT Evaluation with Improved Correlation with Human Judgments
METEOR: An Automatic Metric for MT Evaluation with Improved Correlation with Human Judgments Satanje ...
- Elasticsearch 5.0 中term 查询和match 查询的认识
Elasticsearch 5.0 关于term query和match query的认识 一.基本情况 前言:term query和match query牵扯的东西比较多,例如分词器.mapping ...
- SQL Server-聚焦查询计划Stream Aggregate VS Hash Match Aggregate(二十)
前言 之前系列中在查询计划中一直出现Stream Aggregate,当时也只是做了基本了解,对于查询计划中出现的操作,我们都需要去详细研究下,只有这样才能对查询计划执行的每一步操作都了如指掌,所以才 ...
- Java compiler level does not match解决方法
从别的地方导入一个项目的时候,经常会遇到eclipse/Myeclipse报Description Resource Path Location Type Java compiler level d ...
- 钉钉开放平台demo调试异常问题解决:hostname in certificate didn't match
今天研究钉钉的开放平台,结果一个demo整了半天,这帮助系统写的也很难懂.遇到两个问题: 1.首先是执行demo时报unable to find valid certification path to ...
- .net正则表达式大全(.net 的 System.Text.RegularExpressions.Regex.Match()方法使用)
正则表达式的本质是使用一系列特殊字符模式,来表示某一类字符串.正则表达式无疑是处理文本最有力的工具,而.NET的System.dll类库提供的System.Text.RegularExpression ...
- 在mongoose中使用$match对id失效的解决方法
Topic.aggregate( //{$match:{_id:"5576b59e192868d01f75486c"}}, //not work //{$match:{title: ...
- index+match函数在压实度中对盒号盒质量随机不重复的最佳使用
首先按照升序排列好盒号和盒质量,使其一一对应, 盒号 盒重量 随机值rand() 随机值大小排列rank 1 2001 0.01 ...
随机推荐
- tomcat 启动脚本走过的坑
最近由于 程序写的问题 tomcat经常需要重启,所以就让我写给监控tomcat并启动的脚本 例: 看着一起正常 然后就写到 crontab 计划任务里了 后来发现不管用, 找了好多文档 就是找不到问 ...
- xshell连接linux主机时,出现错误:Could not connect to '***.***.***.***' (port 22)
xshell连接linux主机时,会出现错误:Could not connect to '192.168.89.144' (port 22): Connection failed. 但是这时能ping ...
- VM下如何装虚拟机?
1.打开VM,点击创建新的虚拟机 2.选择典型,点击下一步 3.选择下载好的iso文件,如下: 4.输入如下参数,点击下一步:
- solr增加中文分析器
我的solr版本是5.3.0 1将jar包ik-analyzer-solr5-5.x.jar放入sor的web-inf的lib里面 2 在web-inf下面新建classes目录,再新增三个配置文件: ...
- JVMj机制
- Flutter 学习资料
Flutter 学习资料: 学习资料 网址 Flutter 中文网 https://flutterchina.club/ <Flutter实战>电子书 https://book.flutt ...
- nginx的启动与停止
参考 :http://www.cnblogs.com/codingcloud/p/5095066.html 启动: /usr/local/nginx/sbin/nginx -c /usr/local/ ...
- Ubuntu 16.04 LTS 常用快捷键
在Linux下Win键就是Super键 启动器 Win(长按) 打开启动器,显示快捷键 Win + Tab 通过启动器切换应用程序 Win + 1到9 与点击启动器上的图标效果一样 Win + Shi ...
- Node核心模块
在Node中,模块主要分两大类:核心模块和文件模块.核心模块部分在 Node 源代码的编译过程中,编译进了二进制执行文件.在 Node 进启动时,部分核心模块就被直接加载进内存中,所以这部分核心模块引 ...
- [UE4]Retainer Box
把子元素的内容渲染到一个Render Target上去,然后放把它放置到到屏幕上去. Retainer Box的作用: 1.控制UI更新频率 2.把渲染后的UI当成Texture,放入材质中,加工后, ...