2014-06-18 15:25:06 -0600 | commented answer | Matching template on video I tried to put : vector<Point> res; res.size() == 0; before : if ( match_centers.size() > 0 ) drawMatch(object,frame,match_centers); But, it does not work :( |
2014-06-18 14:05:18 -0600 | commented answer | Matching template on video Thank you for your response, How i can reset the vector to size 0 ? I tried with res.size() == 0 but same problem ... i think res is the name of my vector but i'am not sure. Thank you again! |
2014-06-18 13:23:25 -0600 | asked a question | Matching template on video Hi all, I am a beginner in c + + and opencv, I try to apply this algorithm : http://answers.opencv.org/answers/18440/revisions/ to an object to be detected in a video, I change the code : by this : In my modified code i try to match template in the video frame by frame trough the loop for, it work perfectly, the rectangle select the object to match when the object appear in the video, "my object is an ads sometime is appearing and sometime no". The problem, when the object to match is not in the video the algorithme continues to draw rectangles i think because : draw Match(object,frame,match_centers); is in the loop, any ideas how i can fix that ? Some image for more details : 1 - Video without algorithme applied : 2 - Here The code is looking for the template to match, as you see algorithm draw many rectangles and the object is not yet display, "I want to remove it" : 3 - Here the code is work and the object is matched : Best regards! |