alliedvision / VmbPy

Python API of the Vimba X SDK
BSD 2-Clause "Simplified" License
24 stars 8 forks source link

How to check if camera is not busy #6

Open grfilimonov opened 1 year ago

grfilimonov commented 1 year ago

Hello,

I am working with Alvium USB3 158m connected to Jetson Xavier NX, JetPack 5.1

If my Python code crashes after I start streaming, then the green light on the camera still blinking. If I after try to run my code again, camera doesn't work properly until I start VimbaViewerX and press Play/Stop to stop blinking. After that I can run my code and it works properly.

How can I check before start streaming, that something is wrong with camera, and reset it? cam.is_streaming() returns False

My code is pretty standard:

with VmbSystem.get_instance () as vmb:

with vmb.get_camera_by_id(VMBPY_DEVICE_ID) as cam:

    handler = FrameProcessor()

    try:
        cam.start_streaming(handler=handler, buffer_count=10)
        handler.shutdown_event.wait()
    finally:
        cam.stop_streaming()
arunprakash-avt commented 1 year ago

During openning the camera ,please check the feature AcquisitionStatus. If this value is TRUE, please create a AcquisitionStop then the camera should be working.