title: OpenCV - Adjusting photo with skew angle (tilt)
body: <p>I have a camera pointing at a Zen Garden from above. However, the camera is fixed on the side rather than directly above the plate. As a result, the image looks like this (note the skewed shape of the rectangle): 
  <a href="https://i.stack.imgur.com/KQ9qk.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/KQ9qk.jpg" alt="enter image description here"></a></p>
  
  <p>Is there a way to process the image so that the sand area can look more or less like a perfect square? </p>
  
  <pre><code>cap = cv2.VideoCapture(0)
  while True:
      ret, img = cap.read()
      img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) 
      img = cv2.flip(img,0)
      cv2.imshow('Cropping', img)
      if cv2.waitKey(500) &amp; 0xff == 27:
          cv2.destroyAllWindows()
          break
  </code></pre>
  
  <p>Many thanks.</p>