read_image (Image, 'small_ic') get_image_pointer1 (Image, Pointer, Type, Width, Height) dev_close_window () dev_open_window (0, 0, Width*5, Height*5, 'black', WindowHandle) dev_display (Image) gray_histo (Image, Image, AbsoluteHisto, RelativeHisto) Sigma := 2 MinThresh := 0 while (|MinThresh|#3) histo_to_thresh (AbsoluteHisto, Sigma, MinThresh, MaxThresh) Sigma := Sigma+0.2 endwhile dev_set_colored (12) threshold (Image, Region, MinThresh, MaxThresh)