* In this example a fill level check for the
* pharmaceutical industry is demonstrated. The task is
* to check for the fill level of each single nose drop ampoule.* To do so, we first locate each ampoule head by applying
* shape-based matching, then we find the fill level
* by measuring the gray level change using a 1D Measuring.**1 绘图设置
dev_close_window ()
dev_update_off ()
read_image (Image,'ampoules/ampoules_01')
get_image_size (Image, Width, Height)
dev_open_window_fit_image (Image,0,0,-1,-1, WindowHandle)
dev_set_line_width (2)
dev_set_draw ('margin')
set_display_font (WindowHandle,16,'mono','true','false')** Create a model for the ampoule head to align the measure handle
*2 创建形状模板
gen_rectangle1 (Rectangle,230,280,317,330)
reduce_domain (Image, Rectangle, ImageModel)
create_shape_model (ImageModel,'auto',0,0,'auto','auto','use_polarity'