Closed campanelli-resonon closed 6 years ago
As a general note: Most features of a machine vision camera depend on each other. Manipulating one value could affect the limits of another.
In your program, I would modify the search routine to always fetch the min/max values from the device.
The underlying genicam model is caching stable values to optimize performance. [ The model automatically invalidates the cache if a value changes as a side effect of setting a feature ]
Due to the caches queries to features are cheap. A camera.ExposureTime.Min
doesn't result in a call to the camera device itself, but is answered from the object model.
@thiesmoeller Indeed, I think this issue is caused by improper ordering of my camera configuration. If I read and store these values after setting the windowing, etc., then I get a consistent value later. That said, I will consider a further refactor that will rely on the camera to provide these values in all cases. Thanks!
I'm using pypylon 1.3.1 with Anaconda Python 3.6.6 and Pylon 5.0.12.11830 64-bit on Windows 10.
I am seeing an issue when I query a USB Ace acA1920-155um camera for its minimum exposure time. I first configure an imager object that holds the camera object, which is created using:
Then I store the minimum exposure time using (camera opening and closing not shown):
Later, I rely on this value for a lower bound in a search routine, but when setting the exposure time to the stored minimum value (using
self.camera.ExposureTime.SetValue
) the camera raises an exception thatself.exposure_time_min
is too small. Here is the exception:This exception is only thrown the first time the program is run after plugging the camera in to the computer. It is not thrown subsequently, until it is plugged out and back in again. (Specifically, the initial minimum value is only returned as 20 us the first time, and 21 us subsequently, so my program only breaks on the first run after plugging in the camera.) This makes me think it is a bug somewhere in the Basler API, but perhaps the minimum exposure value is not truly fixed and changes depending on the circumstances?