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

Allied vision 1800 U-500m USB3 camera could not continually get frame #115

Open AdamWuy opened 2 years ago

AdamWuy commented 2 years ago

Hi I have a USB3 camera connected with USB2 port PC, the frame are always liking this: FrameStatus.Complete FrameStatus.Incomplete FrameStatus.Incomplete FrameStatus.Complete FrameStatus.Incomplete FrameStatus.Incomplete FrameStatus.Complete FrameStatus.Incomplete FrameStatus.Incomplete

My python code:

import cv2
import time
from vimba import *

for i in range(10):
   time.sleep(1)
   with Vimba.get_instance() as vimba:
      cams = vimba.get_all_cameras()
      with cams[0] as cam:
           frame = cam.get_frame()
           print(frame)

Why this camera could not get complete frames continuously? if it is USB2 port problem, why Vimba viewer has no problem

Teresa-AlliedVision commented 2 years ago

Hello Adam, the problem is the USB 2 connection. The camera is too fast for the connection, the packets are not processed fast enough and if the camera doesn't get the go ahead from the host to send more the packets are dropped, which leads to incomplete frames. Our recommended fix is to use a USB-3 card, best with Renesas or Intel chip. As a hot fix you can lower the throughput limit of the camera.