* 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')
//创建平行坐标轴的矩形
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')
//直方图转换成区域
gen_region_histo (Histo1, AbsoluteHisto1, 255, 255, 1)
dev_set_color ('green')
gen_region_histo (Histo2, AbsoluteHisto2, 255, 255, 1)