title: Opencv-Python-Resizing image
body: <p>Tryin'to resize the image but got an error saying.</p>
  <blockquote>
  <p><strong>TypeError</strong>: resize() missing 1 required positional argument: 'image'.</p>
  </blockquote>
  <pre><code>line 11, in &lt;module&gt; img = resize(img, width = 1280)
  </code></pre>
  <hr />
  <pre><code>import cv2
  import numpy as np
  from matplotlib import pyplot as plt
  
  def resize(self,image,window_height = 500):
      aspect_ratio = float(image.shape[1])/float(image.shape[0])
      window_width = window_height/aspect_ratio
      image = cv2.resize(image, (int(window_height),int(window_width)))
      return image
  
  img = cv2.imread('hr.jpg')
  img_resized = resize(img,window_height = 800)
  cv2.imshow(&quot;Resized&quot;,img_resized)
  cv2.waitKey(0)
  cv2.destroyAllWindows()
  </code></pre>