Have somebody working code for matchTemplate with mask?
Here is a link: https://stackoverflow.com/questions/1... I have a problem with multiplating matrix. If element is 255 multiplated by 255 it will be still 255, becouse it is higher value of matrix element.
OpenCV have no template matching with mask, but it can be done follows steps:
result = matchTemplate(I^2, W, method=2) - matchTemplate(I, 2*W*T, method=2) + as.scalar(sum(W*T^2))
Here I need to multiply matrix per-elements, but I can not do it with simple mul() becouse it cv::Mat can not store values more then maximal values (255 for example). When I multiply 255 by 255 it still stay 255. This is a problem.
this link is worthy to try object-localization-using-color
"OpenCV have no template matching with mask,"
simply not true
Great. How does mask work? the black {0,0,0} is ignored and non - black is compared?
exactly...
btw, the downvote is for: you asked on 2 different sites, and obviously NEVER cared to look at the docs.