Skip to content

imaqdx camera server makes model-specific assumptions #31

Open
@philipstarkey

Description

@philipstarkey

Original report (archived issue) by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


I was setting up a Point Grey Flea 3 camera with the imaqdx camera server, and a bunch of the attributes have different names than what the server assumes.

I'm not 100% sure how to go about fixing this, but I'm told perhaps some sub-part of the attribute string is universal, so perhaps the correct attribute can be found for a particular model by looking at all attributes and looking for that sub-part.

Here's the changes I had to make to get it working. The exposure time attribute has no parts of the string in common with what the server was previously assuming it to be, though I haven't confirmed I can actually change the exposure time with this attribute, haven't gotten that far yet.

Anyhow flagging this as inadequate, we need a better solution, hopefully something better than hard-coding attribute lists by camera model.

@@ -312,7 +316,7 @@
 
         # Set the camera properties
         timeout_attr = 'AcquisitionAttributes::Timeout'
-        exposure_attr = 'CameraAttributes::Controls::Exposure::ExposureTimeAbs'
+        exposure_attr = 'CameraAttributes::Shutter::Value'
         if timeout_attr not in imaqdx_properties:
             # Set acquisition timeout to fixed value
             print('Setting {} to {:.3f}s'.format(timeout_attr, stop_time + 5))
@@ -329,11 +333,11 @@
 
         # Get the camera properties
         self.exposure_time = self.camera.get_attribute(exposure_attr)
-        self.width = self.camera.get_attribute('CameraAttributes::ImageFormat::Width')
-        self.height = self.camera.get_attribute('CameraAttributes::ImageFormat::Height')
+        self.width = self.camera.get_attribute('AcquisitionAttributes::Width')
+        self.height = self.camera.get_attribute('AcquisitionAttributes::Height')
         self.binning_horizontal = self.camera.get_attribute('CameraAttributes::ImageMode::BinningHorizontal')
         self.binning_vertical = self.camera.get_attribute('CameraAttributes::ImageMode::BinningVertical')
-        self.pixel_format = self.camera.get_attribute('CameraAttributes::ImageFormat::PixelFormat')
+        self.pixel_format = self.camera.get_attribute('AcquisitionAttributes::PixelFormat')
 
 
         print(f'Configuring camera for {self.n_images} images.')

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmajor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions