title: How to detect circlular region in images and centre it with Python?
body: <p>I have a figure flame of the form shown below:</p>
  
  <p><a href="https://i.stack.imgur.com/3JxQ8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3JxQ8.png" alt="enter image description here"></a></p>
  
  <p>I am trying to detect the outer edge of the camera's view and centre the figure so that circular view of the flame is exactly at the centre of the plot. As the position of the circle might change with the image capture date. Sometimes it might be at the upper half, sometimes lower half, etc.</p>
  
  <p>Are there any modules in Python that can detect the view and centre it?</p>
  
  <p><strong>Reproducible code</strong></p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import matplotlib.image as mpimg
  img=mpimg.imread('flame.png')
  lum_img = img[:,:,0]
  img_plot = plt.imshow(lum_img)
  img_plot.set_cmap('jet')
  plt.axis('Off')
  plt.show()
  </code></pre>