title: Choosing threshold values in Harris Corner Detection Algorithm
body: <p><img src="https://i.imgur.com/RNQuuDK.png" alt="Harris">
  Above is a representation of calculating corners in an image using Harris Corner Detection Algorithm . I have implemented up to step 5 , however , in step 6 , I can not decide how to set up the threshold for the values obtained in calculating <code>R = det(H) - k(trace(H))^2</code> .
  This screenshot has been taken from Robert Collins slides <a href="http://www.cse.psu.edu/~rcollins/CSE486/lecture06.pdf" rel="nofollow noreferrer">http://www.cse.psu.edu/~rcollins/CSE486/lecture06.pdf</a> , where he mentions of taking corners
  and setting up threshold values of <code>-1000 for edges and 10000 for corners</code> . Values in between doesn't have any significance . </p>
  
  <p>My question is he was subjective about his experiment and his choice of sample image , and for a particular image , values of <code>-10000 and 10000</code> worked . In real life , there would be no way of knowing what sort of image to expect , how would then the threshold value be chosen .</p>
  
  <p>P.S: I have tried with Matlab's <code>rice.png</code> , the threshold values are way off .</p>
  
  <p>Edit: I have looked at this question about Harris Corner  <a href="https://stackoverflow.com/questions/3862225/implementing-a-harris-corner-detector">Implementing a Harris corner detector</a>
  which says " Just collect all pixels that have a higher value than all other pixels in the 5x5 neighborhood around them". I want something more mathematical for to implement .</p>
  
  <p>Thanks.</p>