Find size of template in image cross correlation
1 回表示 (過去 30 日間)
古いコメントを表示
Dear All;
I am using image cross correlation to determine the displacement of moving object but i have trouble to determine the size of the template . each time i change the size of the template i got something different . how can i resolve this problem .
Best Regards
1 件のコメント
Tushar Sinha
2016 年 1 月 11 日
Hi Mustafa,
Could you please share a small example showing where exactly you are seeing the issue? Also, could you please clarify what you mean by changing the size of the template?
-Tushar
回答 (1 件)
Image Analyst
2016 年 1 月 11 日
Hopefully you're using normalized cross correlation, normxcorr2(), and not xcorr2(). It's a common misconception that regular correlation will locate a template. It can but it's not very robust. You can easily think of situations where the template won't be found, like where you have a dark template and bright other areas. And of course if you threshold the correlation then it's possible that there may be several possible areas that the template exists in the image. But you need to threshold because of the presence of noise - you can't just go for an exact match, though taking the highest value would get the location in most situations I believe. See my attached demo.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!