I am using this template in OpenCv's match template function by converting all images to grayscale.

enter image description here

Here are my result using sum of square differences,cross correlation and correlation coefficient.Both SSD and Cros Correlation method fails matching but correlation coefficient performs well.

Not in this case but in my prior experience I always find cross correlation method the most robust one.I didn't understand why here correlation coefficient method works better than others ?

enter image description here enter image description here enter image description here

  • $\begingroup$ What if you negate the images first? $\endgroup$ – Olli Niemitalo Nov 17 '15 at 17:01
  • $\begingroup$ why should I do this ? $\endgroup$ – Muhammet Ali Asan Nov 17 '15 at 17:34
  • $\begingroup$ I'm wondering if the white background has something to do with it. $\endgroup$ – Olli Niemitalo Nov 17 '15 at 17:53
  • $\begingroup$ If the correlation coefficient is not affected by white background,what is the reason behind it ? $\endgroup$ – Muhammet Ali Asan Nov 17 '15 at 18:11
  • $\begingroup$ There could be a difference in if/how subtraction of the mean and image normalization is done. $\endgroup$ – Olli Niemitalo Nov 17 '15 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.