Halcom 发表于 2020-2-12 17:31:31

图像像素聚类分割

图像像素聚类分割:采用2幅图像,求解直方图特征,进行特征聚类分割
* 采用2个通道图像,对彩色图像进行像素聚类分割
read_image (Image, 'ic')
dev_close_window ()
get_image_size (Image, Width, Height)
dev_open_window (0, 0, Width, Height, 'white', WindowID)
* 彩色图像三个通道
decompose3 (Image, Red, Green, Blue)
* 选择一个区域,分割该区域
gen_rectangle1 (Pattern, 362, 276, 371, 298)
* Calculate the histogram of two-channel gray value images
histo_2dim (Pattern, Red, Blue, Histo2Dim)
threshold (Histo2Dim, Features, 1, 255)
* Close a region with a circular structuring element
closing_circle (Features, FeaturesClosed, 11.5)
dev_set_draw ('fill')
dev_set_part (0, 0, 511, 511)
dev_display (Red)
class_2dim_sup (Red, Blue, FeaturesClosed, RegionClass2Dim)


页: [1]
查看完整版本: 图像像素聚类分割