title: My goal is to crop the image with a rectangle and save the crop in grayscale, but I can't understand the error in the code
body: <pre><code>import cv2
  
  path = r'C:\Users\Dell\JB\ocrprints\house.png'
  
  imagem = cv2.Imread(path, cv2.IMREAD_GRAYSCALE)
  
  cv2.rectangle(imagem,(384,0),(510,128),(0,255,0),3)
  
  cv2.imshow(&quot;Final&quot;, imagem)
  
  cv2.imwrite(&quot;Final.png&quot;, imagem)    
  
  cv2.waitKey(0)
  </code></pre>
  <p>Give this error</p>
  <blockquote>
  <p>#Erro File &quot;c:\Users\Dell\JB\ocrprints\captura.py&quot;, line 5, in      imagem = cv2.Imread(path, cv2.IMREAD_GRAYSCALE) AttributeError: module 'cv2.cv2' has no attribute 'Imread'</p>
  </blockquote>