OpenCV match template not scoring well

前端 未结 2 540
感情败类
感情败类 2021-01-15 18:30

I am trying to do some image matching using OpenCV and am using the cvMatchTemplate function.

I took a sample image and then cut part of it out as a template and the

相关标签:
2条回答
  • 2021-01-15 19:06

    I am facing a similar issue, and unfortunately this seem to be the case with pattern matching approach. In my case, for visually unmatched sections, the coeff sometimes is as high as 0.9 (out of max of 1) and the correct match only seem to happen for CV_TM_CCOEFF_NORMED. The only observation had was that for correct match, there seemed to be only 1 peak in the result matrix in the area of the actual match, but for incorrect matches, the intensity seemed to be high all over the map.

    0 讨论(0)
  • 2021-01-15 19:08

    While I would have expected a better score, that seems reasonable since correlation coefficients (non normalized) have a range of -1 to +1.

    You could try some of the other methods such as CV_TM_CCOEFF, CV_TM_SQDIFF and CV_TM_CCORR vs. their normalized versions to compare.

    0 讨论(0)
提交回复
热议问题