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 ...
随机推荐
- Post Order traverse binary tree using non-recursive way
Process analysis Stack = 5, Push 3, Stack = 5, 3. Pre = 5 Current = 3, Pre = 5, Push 2 to the st ...
- python入门第二天
啦啦啦啦啦!!!!我又来啦,几天该正式开始学习python语言啦,好高兴啊!!!今天学习的主要内容是变量和简单的数据类型!! 变量和简单的数据类型 大家回忆一下昨天的Hello Python Worl ...
- 文件内容比较difflib
#!/usr/bin/env python#-*- coding:utf-8 -*-import difflibimport sys,osos.chdir('E:\\PythonWrok')a = o ...
- 全志A33 lichee 修改开机图片
开发平台 * 芯灵思SinlinxA33开发板 淘宝店铺: https://sinlinx.taobao.com/ 嵌入式linux 开发板交流 QQ:641395230 首先要知道开机图片存在哪里? ...
- Linux tmpwatch命令详解
Linux tmpwatch命令 Linux tmpwatch命令用于删除暂存文件. 执行tmpwatch指令可删除不必要的暂存文件,您可以设置文件超期时间,单位以小时计算 用法: tmpwatch ...
- Git和Svn对比
From: https://wenku.baidu.com/view/1f090e2e7275a417866fb84ae45c3b3567ecdd12.html Git和Svn对比 共享文档 ...
- WINDOWS NT操作系统的注册表文件
WINDOWS NT操作系统的注册表文件 WINDOWS NT注册表文件分为系统文件和用户文件两类. 系统设置和缺少用户 配置数据存放在系统C:\Windows\System32\config文件夹下 ...
- Raspberry3B installation
树莓派系统安装有两种方式,使用镜像安装和使用NOOBS安装.镜像方式安装传统,捣鼓的东西多一些.所以就使用NOOBS吧,NOOBS(New Out Of Box Software)开箱即用的,树莓派官 ...
- CodeSmith和Powerdesigner的搭建和实例化操作 转载自黄聪同学
好了,废话少说,开始我们的CodeSmith旅程吧,我先讲讲这个系列教程要完成的目标吧,众所周知,CodeSmith其中一个强大的功能就是依照模板生成批量代码,这也是吸引着众多编程人士使用它的原因,它 ...
- 搭建Tomcat应用服务器、tomcat虚拟主机及Tomcat多实例部署
一.环境准备 系统版本:CentOS release 6.6 (Final) x86_64 Tomcat版本:tomcat- JDK版本:jdk-8u25-linux-x64 关闭防火墙 软件包下载地 ...