2016-06-28 02:10:30 -0600 | asked a question | Check if There's Matching or Not Hello everyone, I'm working on a Image Processing project on Java for mobile devices. In application, there're some dialogs/buttons which I try to find with image recognition and click on. But, if there's NOT a matching, OpenCV template matching function still finds a match. I've tried to fix this based on minMaxVal but I could't make it. So here's my question: How should I prevent it to find not existing matches? How should I do thresholding? I'm using Canny edge detector and here's my code: |
2016-06-27 09:32:29 -0600 | commented question | Quit if There's No Match I did some research about thresholding and they say I need to specify a threshold value between 0 and 1 then compare it with maxValue (for TM_CCOEFF). But my maxValue is always over 1.0 if there's match or not. How should I specify threshold / minMaxValue ?? minMaxLoc is not useful for me, I have a long test run and every image's location is different. |
2016-06-20 09:56:36 -0600 | commented question | matchTemplate gives wrong result when object does not exist. I have same problem. I'm using Canny edge detector, COLOR_BGR2GRAY and TM_CCOEFF_NORMED. But it always finds a match. |
2016-06-20 09:56:24 -0600 | answered a question | matchTemplate gives wrong result when object does not exist. I have same problem. I'm using Canny edge detector, COLOR_BGR2GRAY and TM_CCOEFF_NORMED. But it always finds a match. |
2016-06-20 05:13:24 -0600 | commented question | Quit if There's No Match I'm using OpenCV template-matching algorithm (TM_CCOEFF or TM_CCOEFF_NORMED). Actually I don't know well how should I change thresholds. I mean I've tried threshold and adaptive_threshold but obviously I couldn't make it. |
2016-06-20 02:42:46 -0600 | asked a question | Quit if There's No Match Hello everyone, I'm working on a image-processing project with Java, Appium on mobile devices. In the code, I'm using Canny edge detector for template matching. But if there's no templae in image, it always finds a match. What I want to do is; if there's no matching, the code should give an exception. Are there any controls about it? |