read_image (Image1, '1.png') //相对路径(图片要和工程文件在一个文件夹内)
*read_image (Image1, 'C:/Users/86173/Desktop/HalconLen/1.png')//绝对路径
get_image_size(Image1, Width, Height) //获取图片大小信息
dev_close_window()
dev_open_window(0, 0, Width, Height, 'black', WindowHandle)//建立和图片大小一致的图框
dev_display(Image1)
get_image_time(Image1, MSecond, Second, Minute, Hour, Day, YDay, Month, Year) //获取图片时间信息
get_image_type(Image1, Type)
get_image_pointer1(Image1, Pointer, Type1, Width1, Height1) //获图片指针(内存地址)
*操作员将 3 通道图像转换为 三个具有相同定义域的单通道图像。 不会为输出图像分配新的存储空间。 相反,创建的图像包含对现有图像的引用 输入图像通道。decompose3
decompose3(Image1, Image11, Image2, Image3)
compose3(Image11, Image11, Image11, MultiChannelImage)
*将 RGB 图像转换为灰度 图像。RGB图像的三个通道作为三个通道传递 单独的图像
rgb1_to_gray(MultiChannelImage, GrayImage) //变为单通道灰度图片
rgb3_to_gray(GrayImage, GrayImage, GrayImage, ImageGray)
*将图像从 RGB 颜色转换 space 转换为任意颜色空间 (ColorSpace).这 图像的三个通道作为三个单独的图像传递 输入和输出
trans_from_rgb(ImageGray, ImageGray, ImageGray, ImageResult1, ImageResult2, ImageResult3, 'hsv')
HalconLen3-图片属性
于 2024-04-17 15:20:38 首次发布