matchTemplate unsatisfying results (OpenCV 3.4.1/C++)
Hey guys!
I try to find two markers (kinda like ) on a white peace of paper showing in a live webcam feed. In a basic test without the webcam, just using two static pictures and if the marker is the same size in the comparing picture i get good results. If i change the size of the marker in the picture i'd like matchTemplate to find, it won't work. So i guess there is a size problem i have to solve first.
There are a few matchTemplate examples out there but non of them work if the marker image differs.
Since i don't really know where to start or if it is even possible to use matchTemplate this way, i hope some one here can point me in the right direction or maybe got an alternative to matchTemplate.
Thanks!
"showing in a live webcam feed" -- note , that template matching is not invariant to scaling / rotation / perspective.
(it's probably the wrong tool for your job)
please have a look at aruco markers , those will work much better here.
Thank you for your comment. I did look into aruco markers yesterday but they look like overkill for my little project. I just try to accomplish to find two markers on a paper and draw a rectangle between them. At least it sounds simple and all 2d based.