Halcon裁剪图片reduce_domain与crop_domain

dev_close_window()
dev_update_off ()
dev_open_file_dialog ('read_image', 'default', 'default', Selection)
read_image (Image, Selection)
get_image_size (Image, Width, Height)
dev_open_window_fit_image (Image, 0, 0, -1, -1, WindowHandle)
dev_display (Image)

draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2)
gen_rectangle1 (ROI_0,Row1, Column1, Row2, Column2)
reduce_domain (Image, ROI_0, ImageReduced)
crop_domain(ImageReduced, ImagePart)
write_image(ImagePart, 'jpeg 100', 0, 'd:/pcb1.jpg')

(0)

相关推荐