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)
东莞大凡
2024-08-11 广告
2024-08-11 广告
在东莞市大凡光学科技有限公司,我们利用Halcon标定板进行高精度相机标定。通过放置标定板于相机视野内,拍摄图像,并利用Halcon软件的标定算法,我们能够精确确定相机的内外参数,有效校正镜头畸变。这一过程确保了图像坐标与世界坐标间的精确对...
点击进入详情页
本回答由东莞大凡提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询