使用二维像素分类分割图像。
* Segment an image using two-dimensional pixel classification.
*
* 使用二维像素分类分割图像。
* For interactive mode set this variable to 1
* 对于交互模式,将此变量设置为1
Interactive := 0
read_image (Image, 'ic')
dev_close_window ()
get_image_size (Image, Width, Height)
dev_open_window (0, 0, Width, Height, 'white', WindowID)
* Convert a three-channel image into three images
decompose3 (Image, Red, Green, Blue)
dev_display (Red)
dev_set_color ('red')
if (Interactive)
draw_region (Pattern, WindowID)
else
gen_rectangle1 (Pattern, 362, 276, 371, 298)
endif
* Calculate the histogram of two-channel gray value images
* 计算双通道灰度图像的直方图
* 函数原型:histo_2dim(Regions,ImageCol,ImageRow:Histo2Dim ::)
* 运算符histo_2dim计算区域内两个图像的二维直方图。通道1(ImageCol)的灰度值被解释为行索引,
* 通道2(ImageRow)的灰度值被解释为列索引。输出图像His