title: Follow image contour using marching square in Python
body: <p>I am new to Python and would be grateful if anyone can point me the right direction or better still some examples. </p>
  
  <p>I am trying to write a program to convert image (jpeg or any image file) into gcode or x/y coordinate. Instead of scanning x and y direction, I need to follow the contour of objects in the image. For example, a doughnut with outer circle and inner circle, or a face with face outline and inner contour of organs.</p>
  
  <p>I know there is something called marching square, but not sure how to do it in python? </p>
  
  <p>Thank you.</p>