First align the vertices of the two images, and then do a diff on the pixels to get a new image containing the RGB difference. Normalize this new image, and then use the edge detection algorithm to outline the image outline in the new image. Finally, find the envelope of the outline. This envelope is to find the areas that need to be clicked.
The easiest way.
Assuming that the two images have the same length and width, read the pixels directly from the upper left corner and store them into an RGB two-dimensional array. Compare the differences between the two arrays, the similarities are marked in white, and the opposite is marked in black. Generate a picture from this two-dimensional array, and the black parts are the parts with differences.
University graduate student did something similar. In fact, direct subtraction of two images will result in a lot of noise and requires some processing. There are many methods of noise reduction: blurring->binarization, leaving some color blocks, using the connected component marking algorithm to integrate these blocks, and then processing the bounding box, which can be output to other modules. .
Difference the image according to the RGB brightness value, then convert the difference image into a grayscale image, and then use the erosion and expansion algorithm to amplify the different points. If you know OpenCV, you can do this with just a few functions.
First align the vertices of the two images, and then do a diff on the pixels to get a new image containing the RGB difference. Normalize this new image, and then use the edge detection algorithm to outline the image outline in the new image. Finally, find the envelope of the outline. This envelope is to find the areas that need to be clicked.
It’s simpler, cut the large image into a unit of 5 pixels, and then compare the binary value of each small image~
The easiest way.
Assuming that the two images have the same length and width, read the pixels directly from the upper left corner and store them into an RGB two-dimensional array. Compare the differences between the two arrays, the similarities are marked in white, and the opposite is marked in black. Generate a picture from this two-dimensional array, and the black parts are the parts with differences.
It’s easy to find differences, just read the values of the two pictures and then subtract them
University graduate student did something similar. In fact, direct subtraction of two images will result in a lot of noise and requires some processing. There are many methods of noise reduction: blurring->binarization, leaving some color blocks, using the connected component marking algorithm to integrate these blocks, and then processing the bounding box, which can be output to other modules. .
Difference the image according to the RGB brightness value, then convert the difference image into a grayscale image, and then use the erosion and expansion algorithm to amplify the different points. If you know OpenCV, you can do this with just a few functions.
Experiment 4 of Yanyi’s digital image processing. . . Isn’t that the original poster!