halcon怎样显示图像的直方图
1个回答
展开全部
有例子啊!
比如下面的例子代码
* Calculate the gray value distribution of two regions of an image
*
read_image (Image, 'fabrik')
dev_close_window ()
get_image_size (Image, Width, Height)
dev_open_window (0, 0, Width, Height, 'black', WindowID)
dev_display (Image)
dev_set_draw ('margin')
dev_set_color ('red')
* Create two rectangles parallel to the coordinate axes
gen_rectangle1 (Rectangle1, 351, 289, 407, 340)
dev_set_color ('green')
gen_rectangle1 (Rectangle2, 78, 178, 144, 244)
gray_histo (Rectangle1, Image, AbsoluteHisto1, RelativeHisto1)
gray_histo (Rectangle2, Image, AbsoluteHisto2, RelativeHisto2)
dev_set_color ('red')
* Convert a histogram created with gray_histo into a region
gen_region_histo (Histo1, AbsoluteHisto1, 255, 255, 1)
dev_set_color ('green')
gen_region_histo (Histo2, AbsoluteHisto2, 255, 255, 1)
比如下面的例子代码
* Calculate the gray value distribution of two regions of an image
*
read_image (Image, 'fabrik')
dev_close_window ()
get_image_size (Image, Width, Height)
dev_open_window (0, 0, Width, Height, 'black', WindowID)
dev_display (Image)
dev_set_draw ('margin')
dev_set_color ('red')
* Create two rectangles parallel to the coordinate axes
gen_rectangle1 (Rectangle1, 351, 289, 407, 340)
dev_set_color ('green')
gen_rectangle1 (Rectangle2, 78, 178, 144, 244)
gray_histo (Rectangle1, Image, AbsoluteHisto1, RelativeHisto1)
gray_histo (Rectangle2, Image, AbsoluteHisto2, RelativeHisto2)
dev_set_color ('red')
* Convert a histogram created with gray_histo into a region
gen_region_histo (Histo1, AbsoluteHisto1, 255, 255, 1)
dev_set_color ('green')
gen_region_histo (Histo2, AbsoluteHisto2, 255, 255, 1)
光点科技
2023-08-15 广告
2023-08-15 广告
通常情况下,我们会按照结构模型把系统产生的数据分为三种类型:结构化数据、半结构化数据和非结构化数据。结构化数据,即行数据,是存储在数据库里,可以用二维表结构来逻辑表达实现的数据。最常见的就是数字数据和文本数据,它们可以某种标准格式存在于文件...
点击进入详情页
本回答由光点科技提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询