title: Centering an image using OpenCV and Python
body: <p>Our program collects a series of images like the one shown:</p>
  
  <p><a href="https://i.stack.imgur.com/8rz33.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8rz33.png" alt="Character"></a></p>
  
  <p>Now I need to center the 'H' to  the center of a 50x50 image (so that it may be fed to a ML algorithm), how do I proceed? </p>
  
  <p>EDIT: All the input data would be similar to the image given and would be in gray scale.</p>