Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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!

click to hide/show revision 2
retagged

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!