halcon 学习:图像读取与保存、查看类型、图像大小、转为灰度、分割与合并通道、获取图像指针、

2023-05-16

halcon 学习:
图像读取与保存、
查看类型、图像大小、转为灰度、
分割与合并通道、
获取图像指针、

read_image(Image, 'F:/xue_xi/2.1.1黑白图.bmp')
*图像大小
get_image_size (Image, Width, Height)
*图像类型(byte类型 80~255)
get_image_type (Image, Type)
*获取图像指针, 为了遍历图像内的每个数值
get_image_pointer1 (Image, Pointer, Type1, Width1, Height1)
*转换图像类型   byte类型转换为:'direction'
convert_image_type (Image, ImageConverted, 'direction')


*-----------------------------------------------------------------
read_image(Image, 'F:/xue_xi/彩色图.jpg')
*分割彩色图片通道
decompose3 (Image, ImageR, ImageG, ImageB)

*合并彩色图片通道
compose3(ImageR, ImageR, ImageR, MultiChannelImage)
*--------------------------------------------------------------

*转换为灰度图
rgb1_to_gray (Image, GrayImage)
*保存图像
write_image(GrayImage, 'bmp', 0, 'F:/xue_xi/1.bmp')
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

halcon 学习:图像读取与保存、查看类型、图像大小、转为灰度、分割与合并通道、获取图像指针、 的相关文章

随机推荐