1. 程式人生 > >兩幅圖片逐個畫素對比篩選不同的區域

兩幅圖片逐個畫素對比篩選不同的區域

check_difference — Compare two images pixel by pixel.


dev_close_window ()

read_image (Traffic1, 'traffic1')
read_image (Traffic2, 'traffic2')
get_image_size (Traffic1, Width, Height)
dev_open_window (0, 0, 2*Width, 2*Height, 'black', WindowHandle)
set_display_font (WindowHandle, 16, 'mono', 'true', 'false')
dev_display (Traffic2)
dev_set_draw ('margin')
dev_set_color ('blue')

check_difference (Traffic1, Traffic2, Selected1, 'diff_outside', -255, 15, 0, 0, 0)