morefigs / pymba

Python wrapper for Allied Vision's Vimba C API
MIT License
105 stars 84 forks source link

Use ExposureAuto and GainAuto #68

Closed PedroSilva0 closed 5 years ago

PedroSilva0 commented 6 years ago

I would like to adapt the live display example to use AutoGain and AutoExposure in "Continuous" mode, but when I set those features to "Continuous" the live display doesn't adapt to lighting changes. I would like to know if this is a limitation of Pymba or if I need to do extra modifications instead of only changing those two features values to "Continuous"?

morefigs commented 6 years ago

There are a few different parameters that can affect e.g. automatic gain, see page 64 and onwards here: https://www.alliedvision.com/fileadmin/content/documents/products/cameras/various/features/GigE_Features_Reference.pdf.

It's been a while, but you should be able to set those sorts of things by setting camera attributes.

ghost commented 6 years ago

I tried to set as below:

self.camera = self.vimba.getCamera(self.cameraIds[0])
self.camera.openCamera()
self.camera.AcquisitionMode = 'Continuous'
self.camera.ExposureAuto = 'Continuous'

Two situations were happened. Overexposure or underexposed. I don't know why...