Finding spot on an image - mathematical way?
问题 I need to find a predefined area on an image and replace it with the other image (by just embedding the latter). The predefined spot would be a variable size rectangle area filled with solid background of the previously agreed colour. Any advise on how do I achieve this? I guess I can find a first pixel of the specified colour by doing a loop and going through the image row by row, pixel by pixel, but I feel like that's not the most efficient solution. Since the spot is supposed to be rather