halcon学习笔记——Image,region,xld初步
来源:互联网 发布:我的世界手机java版 编辑:程序博客网 时间:2024/06/02 19:28
一 读取的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
预处理:
变量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)
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:)
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来整合出完整的圆形。
- halcon学习笔记——Image,region,xld初步
- halcon学习笔记——Image,region,xld初步
- halcon学习笔记——(11)Image,region,xld初步
- halcon学习笔记——(11)Image,region,xld初步
- halcon学习笔记——(11)Image,region,xld初步
- 8、HALCON数据类型,tuple、image、region、XLD
- halcon学习笔记(3)——critical_points例子学习(图像分割Region)
- Halcon中缩放Region或XLD的方法研究
- HALCON算子函数——Chapter 19 : XLD
- HALCON算子函數——Chapter 19 : XLD
- HALCON算子函数——Chapter 19 : XLD
- halcon学习笔记(4)——调用图形函数画Region
- Halcon 通過xld檢測貼片
- Halcon学习之六:获取Image图像中Region区域的特征参数
- Halcon学习之六:获取Image图像中Region区域的特征参数
- halcon学习笔记——图像分割
- Halcon学习笔记——常用算子
- halcon学习笔记(10)——标定
- Classification and logistic regression离散型:分类问题
- 二进制与十六进制相互转换
- Professional JS(三.Language basic-syntax&keywords&reserved&variables&half data type)&黑画(5)
- 在 Laravel 的 Blade 模版中定义变量
- centos 下修改用户密码
- halcon学习笔记——Image,region,xld初步
- [leetcode]628. Maximum Product of Three Numbers
- 最小的K个数
- PAT甲级真题及训练集(15)--1005. Spell It Right (20)
- 欢迎使用CSDN-markdown编辑器
- 小程序开发系列(八)利用SQL实现access_token的自动通知
- Python机器学习应用 | 基于聚类的“图像分割”
- vc平台下将数组里的数据画成曲线
- JS模式中总结的知识点