Ask Your Question

Revision history [back]

imwrite write on usb drive

Hi, I'm trying to write, in Python, an image on a USB drive using "imwrite" function. This is my code:

       _, img = camera.read()
        if (Camera.flag > 0):
            print("saved!")
            global img_counter
            img_name = "snapshot/opencv_frame_{}.png".format(img_counter)
        cv2.imwrite(img_name,img)

In this way I write an image in a folder. If I put:

  img_name = "/mnt/usbdrive/imgtest/opencv_frame_{}.png".format(img_counter)

like path (obviously after the mounting), the image is not saved on usb drive.

Any idea?

imwrite write on usb drive

Hi, I'm trying to write, in Python, an image on a USB drive using "imwrite" function. This is my code:

       _, img = camera.read()
        if (Camera.flag > 0):
            print("saved!")
        global img_counter
        img_name = "snapshot/opencv_frame_{}.png".format(img_counter)
    cv2.imwrite(img_name,img)

In this way I write an image in a folder. If I put:

  img_name = "/mnt/usbdrive/imgtest/opencv_frame_{}.png".format(img_counter)

like path (obviously after the mounting), the image is not saved on usb drive.

Any idea?

imwrite write on usb drive

Hi, I'm trying to write, in Python, an image on a USB drive using "imwrite" function. This is my code:

       _, img = camera.read()
       print("saved!")
       global img_counter
       img_name = "snapshot/opencv_frame_{}.png".format(img_counter)
    cv2.imwrite(img_name,img)

In this way I write an image in a folder. If I put:

  img_name = "/mnt/usbdrive/imgtest/opencv_frame_{}.png".format(img_counter)

like path (obviously after the mounting), the image is not saved on usb drive.

Any idea?