alliedvision / VimbaPython

Old Allied Vision Vimba Python API. The successor to this API is VmbPy
BSD 2-Clause "Simplified" License
93 stars 40 forks source link

Frames missed and frame status if incomplete for 1800 U-2050c #166

Open imihassan opened 1 year ago

imihassan commented 1 year ago

I am trying to capture and save images from USB3 alied vision camera 1800 U-2050c. I am using asynchronous_grab_opencv.py file example to capture and save the images. The code is behaving not normal. When the code starts, it is capturing and storing images but after few seconds it misses few frames. I changed the buffer_count to 100 and missed frames are decreased but still there are. For each missed frame it waits for 1 to 4 seconds.

After continuous running for half an hour, it continuously start missing the frames and does not capture any image.

The computer system I am using is industrial computer nuvo-7160gc having i7 processor and 16 GB ram and SSD for storage and Nvme for OS. USB cable is industrial standard cable from 1st vision. I am not providing power to the camera seperately. It is being powered by USB.

The sample code is as below

if frame.get_status() == FrameStatus.Complete:
            print('{} acquired {}'.format(cam, frame), flush=True)

            msg = 'Stream from \'{}\'. Press <Enter> to stop stream.'
            img = frame.as_opencv_image()

            name = getDateStamp()

            cv2.imwrite(f"{pathSave}/{name}_{str(self.cntr).zfill(6)}.jpg",img)
cam.queue_frame(frame)
arunprakash-avt commented 1 year ago

Thank you for raising this issue. The below issue is because of the USB performance. I would request you to reduce the DeviceLinkThrougputLimit value to 380 MByte/s, such that you do not have incomplete frames.