惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Help Net Security
Help Net Security
G
Google Developers Blog
雷峰网
雷峰网
WordPress大学
WordPress大学
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Engineering at Meta
Engineering at Meta
Security Latest
Security Latest
T
Threat Research - Cisco Blogs
AWS News Blog
AWS News Blog
F
Full Disclosure
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
J
Java Code Geeks
U
Unit 42
C
Cyber Attacks, Cyber Crime and Cyber Security
V
V2EX
C
Cisco Blogs
博客园 - 司徒正美
Project Zero
Project Zero
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
Scott Helme
Scott Helme
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog
S
Securelist
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
S
Schneier on Security
G
GRAHAM CLULEY
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyberwarzone
Cyberwarzone
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
T
Threatpost
Recorded Future
Recorded Future
C
CXSECURITY Database RSS Feed - CXSecurity.com
宝玉的分享
宝玉的分享
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
The Register - Security
The Register - Security
S
Security Archives - TechRepublic
博客园 - Franky
N
News | PayPal Newsroom
Simon Willison's Weblog
Simon Willison's Weblog
S
SegmentFault 最新的问题
W
WeLiveSecurity
A
Arctic Wolf
B
Blog

博客园 - wqj1212

形态学处理 Halcon相机标定 Halcon标定步骤 Halcon学习标定助手 halcon学习之产品检测 halcon中variation_model_single实例注释. vc 实现打印功能 用VisualC++建立SOAP客户端应用(一) 第六章 - 图像变换 - 图像拉伸、收缩、扭曲、旋转[1] - 仿射变换(cvWarpAffine) OpenCV】透视变换 Perspective Transformation(续) 第六章 - 图像变换 - 图像拉伸、收缩、扭曲、旋转[2] - 透视变换(cvWarpPerspective) OpenCV仿射变换+投射变换+单应性矩阵 【最新图文教程】WinCE5.0中文模拟器SDK(VS2008)的配置 Visual Studio 2008 使用 WinCE 5.0 Emulator fff http://www.tugexing.com/Ad_doN.aspx?mmd=upM9swloFctgVHJiJa%2fj1w%3d%3d - wqj1212 VS2003打包時加入卸载功能 gggg - wqj1212 C++日志库,log4cplus,log4cpp使用资料手册
halcon学习笔记——(11)Image,region,xld初步
wqj1212 · 2015-07-05 · via 博客园 - wqj1212

一 读取的3种方式:

read_image( image,'filename')       //image 是输出对象,后面是输入文件的路径和名称

读取多图: 
1,申明一个数组,分别保存路径

ImagePath:=[] 
ImagePath[0]:='D:/1.bmp' 
ImagePath[1]:='D:/2.bmp' 
ImagePath[2]:='D:/3.bmp' 
for i:=0 to 2 by 1 
     read_image(Image,ImagePath[i]) 
endfor

2,for 循环  
  

for i:=1 to 3 by 1 
     read_image(Image,'D:/’+'i'+'.bmp') 
endfor 

3, 读取目录下所有文件 
助手,打开图像,选择路径,插入代码

list_files(输入文件目录地址,选取的要求(files指定选取文件格式,recursive递归,深入所有,derectories选取文件夹,follow_links,max_depth 5...),输出的被选择的文件列表)

选择符合规则的tuple,其中\\.是转义符,等价于'-->' 
tuple_regexp_select(文件名字,['\\.(bmp|tif)$','ignore_case忽略大小写'],输出) 
fabric文件路径 
  
二 图像变量Region 
预处理:

消除噪声 mean_image/ binomial_filter
抑制小斑点或者细线 median_image
平滑 smooth_image
保存边缘的平滑 anisotropic_diffusion

变量Region: 
Region 为某些附和要求性质的像素的子集,或者说一些被选择的图块区域s,region大小不受图像限制,有fill和margin两种表达方式,类似于游程编码,可用于压缩,eg:用a2b3c4代表aabbbcccc

region操作: 
选择相应区域

select_shape(regions,output,'select type',..requirements)

计算相应区域的面积,中心坐标:

area_center(regions,area,row,column)

不规则区域的转换:

shape_trans(region,regiontrans,type)

image

convex hull凸包围(由外向内包围)

outer_circle 外圆(能够包括对象的半径最小的圆形)

inner_circle 内圆

rectangle1 正矩形

rectangle2 最小包围矩形

inner_rectangle1 最大内矩形

三 图型变量XLD(eXtended Line Descriptions)

XLD代表亚像素级别的轮廓或者多边形

threshold_sub_pix(inputimage, output,requirement)
 
gen_contour_region_xld(inputRegion,output,...)

XLD的选择操作(select_shape_xld/selet_contours_xld):

select_shape_xld(XLD:SelectedXLD:Features,Operation,Min,Max:)
 
select_contours_xld(Contours:SelectedContours:Feature,Min1,Max1,Min2,Max2:)

计算xld的面积以及中心位置:

area_center_xld(XLD:::Area,row,column,pointOrder)

xld的合并操作:

union_colliner_contours_xld: 合并同一直线的xld
 
union_cocircular_contours_xld: 合并同圆的xld
 
union_adjacent_contours_xld: 合并相邻的xld

xld的转换操作与region类似:

shape_trans_xld(XLD:XLDTrans:Type:)

有上面几个类型

Xld的分割操作(segment_contours_xld)

把初始xld分割成直线,直线和圆,直线和椭圆

segment_contours_xld(Contours: ContoursSplit: Mode,SmoothCont, MaxLineDist1, MaxLineDist2:)

image

Xld 的拟合操作(fit_***_contour_xld)  把不完整的形状拟合完整

fit_line_contour_xld
 
fit_circle_contour_xld
 
fit_ellipse_contour_xld
 
fit_rectangle2_contour_xld

总结:

图像和视频,文件的读取

Region和XLD的初步介绍

注意:

在使用edges_sub_pix提取出来的结果,往往不是完整的圆形,需要用union来整合出完整的圆形。