Halcon学习之四:有关图像生成的函数
合集下载
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
பைடு நூலகம்
6. regiongrowing (Image, Regions, 3, 3, 1, 100) 7. * 生成 ImageMean 8. region_to_mean (Regions, Image, ImageMean) 9. * 将 Region 转换为二进制图像 10. region_to_bin (Regions, BinImage, 255, 0, 512, 512) 11. * 将 Region 转换为 Label 图像 12. region_to_label (Regions, ImageLabel, 'int4', 512, 512)
实验结果:
* 读取图像 read_image (Image, 'G:/Halcon/机器视觉/images/bin_switch/bin_switch_2.png' * 复制图像 copy_image (Image, DupImage) * 区域生长算法 regiongrowing (Image, Regions, 3, 3, 1, 100) * 生成ImageMean region_to_mean (Regions, Image, ImageMean) * 将Region转换为二进制图像 region_to_bin (Regions, BinImage, 255, 0, 512, 512) * 将Region转换为Label图像 region_to_label (Regions, ImageLabel, 'int4', 512, 512)
Halcon 学习之四:有关图像生成的函数
1、copy_image ( Image : DupImage : : ) 复制 image 图像 2、region_to_bin ( Region : BinImage : ForegroundGray, BackgroundGray,Width, Height : ) 将区域 Region 转换为一幅二进制图像 BinImage。 ForegroundGray, BackgroundGray 分别为前景色灰度值和背景色灰度值。 Width, Height 为 Region 的宽度和高度。 3、region_to_label ( Region : ImageLabel : Type, Width, Height : ) 将区域 Region 转换为一幅 Lable 图像 ImageLabel。 Type 为 imagelabel 的类型。 Width, Height 为 Region 的宽度和高度。 4、region_to_mean ( Regions, Image : ImageMean : : ) 绘制 ImageMean 图像,将其灰度值设置为 Regions 和 Image 的平均灰度值。 相关例子: [c-sharp] view plaincopyprint? 1. * 读取图像 2. read_image (Image, 'G:/Halcon/机器视觉 /images/bin_switch/bin_switch_2.png') 3. * 复制图像 4. copy_image (Image, DupImage) 5. * 区域生长算法
6. regiongrowing (Image, Regions, 3, 3, 1, 100) 7. * 生成 ImageMean 8. region_to_mean (Regions, Image, ImageMean) 9. * 将 Region 转换为二进制图像 10. region_to_bin (Regions, BinImage, 255, 0, 512, 512) 11. * 将 Region 转换为 Label 图像 12. region_to_label (Regions, ImageLabel, 'int4', 512, 512)
实验结果:
* 读取图像 read_image (Image, 'G:/Halcon/机器视觉/images/bin_switch/bin_switch_2.png' * 复制图像 copy_image (Image, DupImage) * 区域生长算法 regiongrowing (Image, Regions, 3, 3, 1, 100) * 生成ImageMean region_to_mean (Regions, Image, ImageMean) * 将Region转换为二进制图像 region_to_bin (Regions, BinImage, 255, 0, 512, 512) * 将Region转换为Label图像 region_to_label (Regions, ImageLabel, 'int4', 512, 512)
Halcon 学习之四:有关图像生成的函数
1、copy_image ( Image : DupImage : : ) 复制 image 图像 2、region_to_bin ( Region : BinImage : ForegroundGray, BackgroundGray,Width, Height : ) 将区域 Region 转换为一幅二进制图像 BinImage。 ForegroundGray, BackgroundGray 分别为前景色灰度值和背景色灰度值。 Width, Height 为 Region 的宽度和高度。 3、region_to_label ( Region : ImageLabel : Type, Width, Height : ) 将区域 Region 转换为一幅 Lable 图像 ImageLabel。 Type 为 imagelabel 的类型。 Width, Height 为 Region 的宽度和高度。 4、region_to_mean ( Regions, Image : ImageMean : : ) 绘制 ImageMean 图像,将其灰度值设置为 Regions 和 Image 的平均灰度值。 相关例子: [c-sharp] view plaincopyprint? 1. * 读取图像 2. read_image (Image, 'G:/Halcon/机器视觉 /images/bin_switch/bin_switch_2.png') 3. * 复制图像 4. copy_image (Image, DupImage) 5. * 区域生长算法