标签:
dev_open_file_dialog ('read_image', 'default', 'default', Selection)
read_image (Image, Selection)
** 1. 寻找彩色图像中亮度最大的通道
decompose3 (Image, ImageRed, ImageGreen, ImageBlue)
min_max_gray (ImageRed, ImageRed, 0.09, Min1, RMax1, Range1)
min_max_gray (ImageGreen, ImageGreen, 0.09, Min1, GMax1, Range1)
min_max_gray (ImageBlue, ImageBlue, 0.09, Min1, BMax1, Range1)
concat_obj (ImageRed, ImageGreen, ObjectsConcat)
concat_obj (ObjectsConcat, ImageBlue, ObjectsConcat)
* maxData:=[RMax1,GMax1,BMax1]
maxData:=[0,1,1]
tuple_max (maxData, Max1)
tuple_find (maxData, Max1, Indices)
if(|Indices|#1)
Indices:=Indices[|Indices|-1]
endif
select_obj (ObjectsConcat, ObjectSelected, Indices+1)
stop()
get_image_size (Image, Width1, Height1)
**2. 8bi