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 ?
-
$\begingroup$ What is the SSD? $\endgroup$– gmotreeAug 13, 2015 at 4:43
-
$\begingroup$ @gmotree Sum of Squared Differences. you can get more information over here: stackoverflow.com/questions/26011224/… $\endgroup$– ROS_OPENCVAug 13, 2015 at 8:20
1 Answer
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.