Topics related to Allied Vision’s USB3 Vision cameras.
I am using an Alvium 1800u 240c camera which supposedly can handle 173fps at full resolution in Mono8 but I am not able to get this fps on my machine. Apart from that, I am trying to use vimba python api to grab a video stream out of the camera and for that purpose I am setting manually the video fps based on the number given by VimbaViewer when I adjust the camera parameters. The problem is that I am having a strobsocopic effect in the outputed video whereas the process I am filming is at a much lower speed than the FPS of the camera can handle. Are there any insights on what is happening? Plus I would like to know what are the 3 fps that VimbaViwer shows when the camera is freerunning rcv, cam and dis? Thank you!
The Alvium runs at moderate speed of 200MB/s on default, max. 450MB/s.
The DeviceLinkThroughputLimit feature controls the nominal bandwidth of the frame transfer in bytes per second, precisely the line read out.
The maximum specified frame rate at 8-bit pixel format can be achieved with a value of 450.000.000, according to the max. USB3 data rate.
The default value of 200.000.000 cuts the frame rate by half to avoid dropped frames in case of host performance weakness.
For full bandwidth simply disable the DeviceLinkThroughputLimitMode.
Set AcquisitionFrameRate to control the frame rate independently from the throughput.
Please see the feature reference: https://cdn.alliedvision.com/fileadmin/content/documents/products/cameras/various/features/Alvium_Features_Reference.pdf
The counters at the VimbaViewer status bar indicate certain frame rates:
Rcv - received, some frames might be dropped due to host performance issue
Cam - how fast the camera runs
Dis - displayed by the viewer, limited to 30 fps on default, could be disabled by View->Options
Hi I am running into a problem of camera unstability when I try to use two cameras in SW triggering mode.
The cameras I am using are two Alviums 1800 U-240c and 1800 U-500c. I am using the following code snippet to grab a frame each time I get a SW signal which seems to work fine but and fails sporadically with Frame Incomplete Error. Is it a HW related problem or am I misusing the API?
class FrameHandler:
def __init__(self, handler):
super(FrameHandler, self).__init__()
self.handler = handler
def __call__(self, cam: Camera, frame: Frame):
if frame.get_status() == FrameStatus.Complete:
# convert frame to opencv format
t0 = time.time()
frame.convert_pixel_format(PixelFormat.Bgr8)
print("conversion time took", time.time()-t0)
# push frame to next stage
self.handler(frame.as_opencv_image())
else:
print(f'ERR -- FrameHandler incomplete error')
self.handler(None)
cam.queue_frame(frame)
print("Frame grabbed !")
class VimbaCamera(BaseCamera):
def __init__(self, id, info, settings):
super(VimbaCamera, self).__init__(id, info, settings)
self.camera = None
self.config_file = settings["config_file"]
with Vimba.get_instance() as vimba:
try:
print("camera id =", self.info["id"])
self.camera = vimba.get_camera_by_id(self.info["id"])
print("camera succesfully created !")
except Exception as e:
print(f'ERR -- Camera ({self.info["id"]}) creation error: {e}')
def setup(self):
with Vimba.get_instance() as vimba:
with self.camera:
print("setting up the camera")
try :
self.camera.load_settings(self.config_file, PersistType.All)
print("Loading camera settings from config file")
except Exception as e:
print(e)
self.camera.TriggerSelector.set('FrameStart')
self.camera.TriggerActivation.set('RisingEdge')
self.camera.TriggerSource.set('Software')
self.camera.TriggerMode.set('On')
def open(self):
if not self.is_open:
try :
#setup camera
self.setup()
self.is_open = True
except Exception as e:
print(f'ERR -- Camera open() error: {e}')
def close(self):
if self.is_open:
try :
self.camera.stop_streaming()
self.is_open = False
except Exception as e :
print(f'ERR -- Camera close() error: {e}')
def trigger(self):
t0 = time.time()
with Vimba.get_instance() as vimba:
with self.camera:
print("context invocation took ", time.time()-t0)
_handler = FrameHandler(self.handler)
self.camera.start_streaming(handler=_handler)
print("trigger issued")
self.camera.TriggerSoftware.run()
time.sleep(1)
Thank you for your answer !
When using Vimba SDK to retrieve camera timestamp by accessing ulong AVT.VmbAPINET.Frame.Timestamp, it is desirable to be able to convert it to real time in seconds instead of camera ticks. However, the available resources only show how to do this by using camera tick frequency in Ethernet AVT cameras, but not in USB cameras. What would be the correct alternative to that in USB models?
The timestamp of USB cameras is given in Nanoseconds as well. TickFrequency=1GHz.
Hi!
I am using an Allied Vision Alvium 1800 U-052 camera with the Vimba SDK. I would like to be able to save the exposure and gain used when capturing the image. I cannot find a way to do this. Is there a way to do this?
Those Chunk Data will be available for Alvium USB cameras with firmware v13 in Oct '23.
Requiring Vimba X as successor for Vimba6: