Main Content

Use Advanced Property Support with Point Grey Camera

Use advanced property support with Point Grey cameras to change properties while the acquisition is running. Additionally, when changing the value of a property, you also dynamically update the constraint values of other properties that depend on it.

Change Properties While the Acquisition Is Running

You can change the value of the video source property of a Point Grey camera while image acquisition is running. This ability is useful for device-specific properties that you want to change dynamically, such as brightness, exposure, or frame rate. In this example, start acquisition from the videoinput object and then set the Exposure property.

Create the videoinput object using the Point Grey adaptor and get the video source.

vid = videoinput(“pointgrey”);
src = vid.Source;

Set the number of frames per trigger on the source.

vid.FramesPerTrigger = Inf;

Start acquiring frames.

start(vid)

View the Exposure property information to determine whether the property can be changed while acquisition is running.

propinfo(src,"Exposure")
ans = 

  struct with fields:

               Type: 'double'
         Constraint: 'bounded'
    ConstraintValue: [-7.5850 2.4136]
       DefaultValue: -0.0614
           ReadOnly: 'never'
     DeviceSpecific: 1
         Accessible: 1
Since ReadOnly is 'never', you can change this property during acquisition. The current value is -0.0614 and the maximum and minimum constraints are [-7.5850 2.4136].

Change the value of the Exposure property during the acquisition.

src.Exposure = 2;
Previously, changing the exposure after starting the acquisition resulted in an error.

Stop the image acquisition when you are done.

stop(vid)

Note

This workflow is not supported in the Image Acquisition Explorer. While the acquisition is running, you can not change a property on the Device Properties tab.

Update Property Constraints Dynamically

If you change a property that results in a change of possible values, or constraint change, for another property, the constraint values of the other property are updated dynamically. Consider a Point Grey camera that has a region of interest that is already set to [0 0 612 512]. The values limit the FrameRate property to a specific minimum and maximum value, depending on the ROIPosition value. Changing the region of interest to a lower value increases the FrameRate property constraints. In this example, you set ROIPosition to [0 0 320 240], and you call propinfo on the FrameRate property to show the updated property constraint values.

Create the videoinput object using the Point Grey adaptor and get the video source.

vid = videoinput(“pointgrey”);
src = vid.Source;

View the region of interest.

vid.ROIPosition
ans =

     0     0   612   512

View the FrameRate property information.

propinfo(src,"FrameRate")
ans = 

  struct with fields:

               Type: 'double'
         Constraint: 'bounded'
    ConstraintValue: [1 29]
       DefaultValue: 2.5000
           ReadOnly: 'never'
     DeviceSpecific: 1
         Accessible: 1
The minimum and maximum values for this property are [1 29].

Set the ROIPosition property to [0 0 320 240] and view the FrameRate property again to see the updated values.

vid.ROIPosition = [0 0 320 240];
propinfo(src,"FrameRate")
ans = 

  struct with fields:

               Type: 'double'
         Constraint: 'bounded'
    ConstraintValue: [1 34]
       DefaultValue: 2.5000
           ReadOnly: 'never'
     DeviceSpecific: 1
         Accessible: 1
The minimum and maximum values are now [1 34] because the region of interest is lowered.

See Also

Related Topics