Lots of people have complained about
cv::matchTemplate () because it is not a rotation invariant function, which means it is not practical.
Therefore, I improved and combined this function with a search strategy, and create a project.Also, this project passed some cases in real world assembly lines.
Details and the source code of this project
The formula of similarity is as followed:
Some practical tests:
It can also used as OCR
If you think my project useful and practical, give me a star on github
I am doing researching on scale invariant version, perhaps next month can get a positive result.
If you have any test data that can verify scale issue, please contact me.
what does the code even do with the pyramid?
all I can tell from the code is that it tries
matchTemplate on a number of rotated versions of the template. that shouldn’t be fast at all, considering a single
matchTemplate call on any usefully large image takes a while.
and please stop posting that stuff to every thread you can find.
how hard would it be, to seperate the algorithm from the gui app ?
as it is now, only VS users can even build it
Using SIMD version of image convolution to replace matchTemplate () with parameter CV_TM_CCORR
For many cases, it significantly speed up the process. (For small template, it is slight slow)
See this commit
@den8017981 Could you explain about this formular:
double dAngleStep = atan (2.0 / max (pTemplData->vecPyramid[iTopLayer].cols, pTemplData->vecPyramid[iTopLayer].rows)) * R2D;
This image can explain, just a little math.
@den8017981 Could you explain more about this function:
void CMatchToolDlg::MatchTemplate() - SIMD: inline int IM_Conv_SIMD()
@ use this document provided by intel as a reference