convert_image_type (Image1, ImageConverted, 'real')//转换图像像素格式 //设置RGB颜色值 gen_image_proto(Image1,rim,200) gen_image_proto(Image1,gim,0) gen_image_proto(Image1,bim,10) //将颜色值合并 compose3 (rim, gim, bim, MultiChannelImage) //将图像颜色值拆分 decompose3 (MultiChannelIm...
Halcon算子之gen_image_proto gen_image_proto — Create an image with a specified constant gray value. 可以创建一个常量的灰度图 gen_image_proto(Image : ImageCleared : Grayval : ) 1. Halcon算子之scale_image_max scale_image_max — Maximum gray value spreading in the value range 0 to 255. s...
gen_image_proto creates an output image ImageCleared with the constant gray value Grayval. If the input image is of type direction, gray values in result image that are not in the value range that is valid for direction images are set to the value 255 to mark them as invalid. Image...
gen_image_proto (ImageReduced2, ImageCleared, DetectMean) endif reduce_domain (ImageCleared, RegionDifference, ImageReduced1) *4.将待测图与新生成的灰度值图像做差值(图4),可以找到待测图和模板图灰度值有差异的区域 abs_diff_image (ImageReduced2, ImageReduced1, ImageAbsDiff, 1) invert_image (Ima...
gen_image_proto (ImageReduced, ImageCleared, 128) paint_region (Region, ImageCleared, ImageResult1, 255, 'fill') 方法3:(推荐)xld->region->image *无效set_system ('init_new_image', 'false') gen_region_contour_xld (ObjectSelected, Region, 'filled') ...
Halcon Image相关操作 1.创建空白图像 创建单通道图像 gen_image_const( : Image : Type, Width, Height : ) 创建一个具有特定灰度值的图像 gen_image_proto(Image : ImageCleared : Grayval : ) 2.合并通道 1gen_image_const(Image,'byte',512,512)2gen_image_proto(Image,ImageCleared1,255)3gen_image...
gen_image_proto 生成一张和输入图像一样长宽的指定灰度值的单通道图像 语法: 代码语言:javascript 复制 gen_image_proto(Image:ImageCleared:Grayval:) 示例: 代码语言:javascript 复制 gen_image_proto(ImageGrayRamp,ImageCleared,128) 不论输入图像通道数为多少,输出图像均为单通道。
write_image (Image, 'bmp', 0, 'E:/Org.bmp') 例2:图像剪贴,将一个图贴在另一个之上。 *创建空白图像,将得到的区域贴到上面 get_image_size (ImageReduced, Width1, Height1) gen_image_proto (ImageReduced, ImageCleared, 128) paint_region (Region, ImageCleared, ImageResult1, 255, 'fill')...
gen_image_proto (Image, ImageCleared, 32) overpaint_gray (ImageCleared, ImageReduced) gen_image_const (Image1, 'byte', 512, 512) overpaint_region (Image1, Circle, 255, 'fill') * /* Copy a circular part of the image into the image : */ read_image (Image2, 'G:/Halcon/...
HALCON 算子函数——Chapter 7 : Image 7.1 Access 1. get_grayval 功能:获取一个图像目标的灰度值。 2. get_image_pointer1 功能:获取一个通道的指针。 3. get_image_pointer1_rect 功能:获取图像数据指针和输入图像区域内最小矩形内部的图像数据。