Blob分析
原创
©著作权归作者所有:来自51CTO博客作者茗君(Major_S)的原创作品,请联系作者获取转载授权,否则将追究法律责任
Blob:斑点分析。分析物体的二维特征、二维形状特征
一 Blob分析流程
- 采集图像
- 图像分割
- 形态学处理
- 连通性分析
- 填充
- 特征提取
二 图像分割
threshold
bin_threshold
auto_threshold
dyn_threshold
var_threshold
三 连通性分析
connection:把大区域分离成多个独立的小区域,分析其联通关系
逆运算:union
四 特征提取
可以使用工具:特征检测、特征直方图
- select_shape:
- select_shape_std
- 常用特征:
- 多个特征筛选
五 填充
- fill_up
- fill_up_shape
六 区域操作
- 合集:union1\union2
- difference
- intersection
- complement
七 形态学处理
形态学处理、连通性分析、特征提取、填充、区域操作无固定顺序,应根据实际情况,灵活使用
八 示例
*1.采集图像
read_image (Image, 'monkey')
*2.图像分割
threshold (Image, Region, 128, 255)
*3.形态学处理
dilation_circle (Region, RegionDilation,1.5)
erosion_circle (RegionDilation, RegionErosion, 3.5)
*4.连通性分析(拆分)
connection (RegionErosion, ConnectedRegions)
*5.填充
fill_up (ConnectedRegions, RegionFillUp)
*6.特征提取(筛选你的目标区域)
select_shape (RegionFillUp, SelectedRegions, 'area', 'and', 450, 800)
select_shape (SelectedRegions, SelectedRegions1, 'circularity', 'and', 0.3, 1)