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 ...
随机推荐
- Dubbo的Filter链梳理---分组可见和顺序调整
前言: 刚刚写了篇博文: Dubbo透传traceId/logid的一种思路, 对dubbo的filter机制有了一个直观的理解. 同时对filter也多了一些好奇心, 好奇filter链是如何组织的 ...
- CSS样式补充第二天
#p1{/* border-width: 1px;*/ /*边框实线*/ /*border-style: solid;*/ /*边框虚线*/ ...
- 使用maven profile指定配置文件打包适用多环境
新建maven项目, 在pom.xml中添加 profile节点信息如下: <profiles> <profile> <!-- 开发环境 --> <id& ...
- SSH(远程登录)原理
最近在研究hadoop,因为是分布式的,会涉及很多机器协作工作,但所有的操作都是需要进行权限验证的,namenode主机会尝试启动datanode主机上的进程等等.下面就用一张图来解释SSH登录验证的 ...
- [随笔][Golang][golang nil 相关]
nil 是不能比较的 不同类型的nil的address是一样的 不同类型的nil是不能比较的 nil 是map, slice, pointer, channel, func, interface的零值 ...
- sequelize的mssql配置
配置文件 development: { username: process.env.LOCAL_USERNAME, password: process.env.LOCAL_PASSWORD, data ...
- Spark 性能调优-内存设置-GC设置
http://mt.sohu.com/20150604/n414449770.shtml http://my.oschina.net/mkh/blog/330386 http://itindex.ne ...
- 铁板纹理 铁锈Rust
软件:Substance Designer 2017.1.2 这篇文章记录铁锈的制作方法,铁锈效果见图一 图一:铁锈Rust 铁锈的具体制作过程为: 使用BnW Spots 2(Noise)结点生成噪 ...
- select函数总结
阻塞方式block,就是进程或是线程执行到这些函数时必须等待某个事件的发生,如果事件没有发生,进程或线程就被阻塞,函数不能立即返回.使用Select就可以完成非阻塞non-block,就是进程或线程执 ...
- 涂抹mysql笔记-mysql管理工具
五花八门的mysql管理工具<>mysql提供的命令行工具 mysql_install_db:mysql建库工具,在源码安装mysql环节我们使用过. mysql_safe:mysql启动 ...