title: how to analyze min max loc returned by opencv's cvMatchTemplate?
body: <p>I am trying to detect objects in image on an iphone app.</p>
  
  <p>I am using the cvMatchTemplate function, I manage to see some patterns returned by the cvMatchTemplate function (I chose CV_TM_CCOEFF_NORMED).</p>
  
  <p>Positive Results (result image is 163x371):</p>
  
  <p><a href="http://encryptedpixel.files.wordpress.com/2011/07/photo-13-7-11-11-52-19-am.jpeg" rel="nofollow noreferrer">http://encryptedpixel.files.wordpress.com/2011/07/photo-13-7-11-11-52-19-am.jpeg</a></p>
  
  <p>cvMinMaxLoc returns: min (102,244) max(11,210)
  The min point is making some sense here, the position of the dark spot is really 102,244 in the result image of 163x371</p>
  
  <p>Negative Results:</p>
  
  <p><img src="https://i.stack.imgur.com/bHiHS.jpg" alt="enter image description here"></p>
  
  <p>cvMinMaxLoc returns: min (114,370) max(0,0)
  This is not making sense, there is totally no results, why is there still a min point at 114,370? </p>
  
  <p>I need to know how to analyze these results programatically so that I can say "Hey I found the object!" in objectiveC for iPhone app?</p>
  
  <p>Thanks!</p>