Importing image

sir iam not able to acess the image from jupyter.
Can i know the syntax to bring the image to the jupyter that is stored in my pc .
left_image=cv2.read(‘C:\Users\dell\Pictures\Saved Pictures\top_left’)
i just tried the above syntax. iam getting the below error

SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape .please help me with this problem.

Hey @Shushma, you can read an image using opencv library as follows :

# You can give path to the 
# image as first argument 
img = cv2.imread('cc.jpg', 0)   

Hope this helps !
Happy Learning :slight_smile:

ModuleNotFoundError: No module named ‘cv2’ iam getting this error

Yeah so you need to first install opencv using the following command :

conda install -c conda-forge opencv

run the above command in anaconda prompt if using windows or terminal if using macOs

Hope this helps !
Happy Learning :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.