title: Looking for C/C++ library calculating max of Gaussian curve using discrete values
body: <p>I have some discrete values and assumption, that these values lie on a Gaussian curve.
  There should be an algorithm for max-calculation using only 3 discrete values.
  Do you know any library or code in C/C++ implementing this calculation?</p>
  
  <p>Thank you!</p>
  
  <p>P.S.:
  The original task is auto-focus implementation. I move a (microscope) camera and capture the pictures in different positions. The position having most different colors should have best focus.</p>
  
  <p><strong>EDIT</strong>
  This was long time ago :-( 
  I'just wanted to remove this question, but left it respecting the good answer. </p>