I am using the function cv.matchTemplate
to try to find template matches.
result = cv.matchTemplate(img, templ, match_method)
After I run the function I have a bunch of answers in list result
. I want to filter the list to find the best n matches. The data in result
just a large array of numbers so I don't know what criteria to filter based on. Using extremes = cv.minMaxLoc(result, None)
filters the result list in an undesired way before converting them to locations.
The match_method is cv.TM_SQDIFF
. I want to:
- filter the results down to the best matches
- Use the results to obtain the locations
How can I acheive this?