OpenCV (imread function)

import cv2
img = cv2.imread(‘self documents/sign.jpg’)
print(img.shape)

I have written this code in jupyter notebook. The image is saved on my desktop folder named self documents. The name of the image is sign. If i give the complete path, then it throws an error. But if I write it like this than when I am printing img.shape it is showing an error that object gas no attribute shape.

Hey @jhunthrasrishti, please run the following command in a new cell below your code and tell me the output :

import os
os.getcwd()

I just want to make sure that you are able to access your Desktop or not.

Thanks !
Happy Learning ! :slight_smile:

Hey i am facing the same issue but my desktop is accessible.
Now what to do

Hey @D18CRXPP0043, I would be really happy to help. I request you to create a new thread or doubt for your query ?..I will be able to understand the problem in a better way.

Thanks ! :+1:
Happy Learning ! :slightly_smiling_face:

make sure that image and python file are in the same folder ,then no need to write the complete path