title: What is formula to convert a "uint8 RGB pixel" to "uint8 grayscale pixel" value?
body: <p>I was using the following equation to convert an RGB image to a grayscale image, however it doesn't seem to be working properly.</p>
  
  <pre><code>gray_pixel = (r_pixel + g_pixel + b_pixel) / 3
  </code></pre>