read image(lmage,lena.jpg )
get_image_size(lmage,Width,Height)dev_closewindow()
dev_open_window_fit_size(0,0,Height,Height,-1,-1,WindowHandle)dev display(Image)
rgbl to_gray(lmage,Graylmage)
*计算图像的灰度值分布
gray_histo(Graylmage,Graylmage,AbsoluteHisto,RelativeHisto)*获得灰度直方图
gen_region_histo(Region,RelativeHisto,255,255,1)
gen_region_histo(: Region: Histogram,Row,Column,Scale:)作用:得到直方图。
Region:需要输人的区域。
Histogram:灰度分布
Row:直方图中心行坐标、
Column:直方图中心列坐标。
Scale:直方图比例。
threshold (Image, Regions, 21, 255)
erosion_circle (Regions, RegionErosion, 5)
fill_up_shape (RegionErosion, RegionFillUp, 'area', 1, 3000)
reduce_domain (Image, RegionFillUp, ImageReduced)
derivate_gauss (ImageReduced, DerivGauss, 3, 'xx')
mean_image (DerivGauss, ImageMean, 1, 40)
threshold (ImageMean, Regions1, 0.7, 5)
connection (Regions1, ConnectedRegions)
select_shape (ConnectedRegions, SelectedRegions, 'area', 'and', 250, 1500)