To compare grayscale images, I'm using SSD like the difference between the two corresponding pixels and then choose the minimum. But when it comes to RGB images, how should it works ?
There are many ways to do that.
- First, you could compute SSD scores for multiple channels and average them.
- Another way is to directly convert the color image to gray, so that you only could compute the final SSD in a single pass.
- Finally, there are methods to perform template matching not using plain intensities, but the gradients. By computing the color gradient from the color structure tensor (e.g. as in here), you could leverage RGB information.