pymba icon indicating copy to clipboard operation
pymba copied to clipboard

Streaming with 'Continuous' mode disconnect camera in few seconds

Open oao112358 opened this issue 4 years ago • 1 comments

Hi, I'm trying to to use pymba with Manta G-419C(Gige).

For instance, when I do opencv_acquire_streaming_images.py in examples, and I use Vimba Viewer to confirm that camera is locked by python or not. I can get images in first few seconds(about 2 or 3 seconds), and the camera is actually locked by python. But after that, I fount that the camera is unlocked by Vimba Viewer, and my python cannot get other image anymore.

Then I will get Operation is invalid with the current access mode on camera.stop_frame_acquisition() or camera.disarm(). If I comment out these codes, python will close without any exception or error. So I guess that Operation is invalid with the current access mode is caused by python didn't get camera's control.

However, I can get streaming by Vimba Viewer and Matlab uninterrupted without any error. I really tried to search a solution on internet or other issue but I can't find any similar problem.

Thank you for your help!

oao112358 avatar Sep 16 '20 01:09 oao112358

VimbaViewer will take control of the camera if you press play/stop once. You have to close vimba viewer and reopen the cam in python. If you look at the official VimbaPython, it basically forces you to reopen the API and camera connection every time you want to send a command. I guess thats whats happening with MATLAB, too. It forcibly takes control of the cam.

I had this issue and solved it by calling the AcquisitionStop command feature directly.

rk-exxec avatar Oct 12 '20 09:10 rk-exxec