# Revision history [back]

### Saving image in folder using imwrite

Hi all, I specified a path of a folder for saving images using imwrite.

cv2.imwrite("/home/aishu/ros_ws/baxter_right_cam.png", NewImg)


1) I am just curious as to how the imwrite() distinguishes between the image name and the path name. Does "/" tell the function that it should look for the folder?

2) I also tried this: cv2.imwrite("/baxter_right_cam.png", NewImg) Where would an image be saved if I pass on the above argument because I am not able to find this image.

Thank you!

 2 retagged Tetragramm 7376 ●13 ●37

### Saving image in folder using imwrite

Hi all, I specified a path of a folder for saving images using imwrite.

cv2.imwrite("/home/aishu/ros_ws/baxter_right_cam.png", NewImg)


1) I am just curious as to how the imwrite() distinguishes between the image name and the path name. Does "/" tell the function that it should look for the folder?

2) I also tried this: cv2.imwrite("/baxter_right_cam.png", NewImg) Where would an image be saved if I pass on the above argument because I am not able to find this image.

Thank you!