Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

save camera attributes

I would like to save and load camera attributes for my PointGrey GrassHopper3 USB3 camera.  Should be simple, MAX has the functionality and it also appears you can use IMAQdx Read Attributes and IMAQdx Write Attributes, all save as *.icd file.

What is happening in practice is that MAX and IMAQdx Write Attributes only write a small subset of all the attributes. *.icd file copied below, the attributes have emotions!

 

I can see all the attributes in MAX but they are not saved to file by MAX.  If I powercycle the camera I lose the settings.

How do I save and load the cameras settings without writing my own code to Read a File and Write to each attribute via a Property Node?

 

MAX_Camera_Attributes.jpg

 

[NIIMAQ_HEADER]
Type = 2
Version = 8

[CAMERA_DATA]
AcquisitionAttributes::AdvancedGenicam::CommandTimeout = "100"
AcquisitionAttributes::AdvancedGenicam::EventQueueDepth = "50"
AcquisitionAttributes::AdvancedGenicam::EventsEnabled = "true"
AcquisitionAttributes::AdvancedUSB3Vision::DesiredMaximumPayloadTransferSize = "4294967295"
AcquisitionAttributes::Bayer::Algorithm = "Bilinear"
AcquisitionAttributes::Bayer::GainB = "1"
AcquisitionAttributes::Bayer::GainG = "1"
AcquisitionAttributes::Bayer::GainR = "1"
AcquisitionAttributes::Bayer::Pattern = "Use hardware value"
AcquisitionAttributes::BitsPerPixel = "Use hardware value"
AcquisitionAttributes::ChunkDataDecoding::ChunkDataDecodingEnabled = "false"
AcquisitionAttributes::ChunkDataDecoding::MaximumChunkCopySize = "64"
AcquisitionAttributes::IgnoreFirstFrame = "false"
AcquisitionAttributes::ImageDecoderCopyMode = "Auto"
AcquisitionAttributes::IncompleteBufferMode = "Ignore"
AcquisitionAttributes::OutputImageType = "Auto"
AcquisitionAttributes::OverwriteMode = "Get Newest"
AcquisitionAttributes::PixelSignedness = "Signed"
AcquisitionAttributes::ReceiveTimestampMode = "None"
AcquisitionAttributes::ShiftPixelBits = "false"
AcquisitionAttributes::SwapPixelBytes = "false"
AcquisitionAttributes::Timeout = "5000"
CameraAttributes::AcquisitionControl::AcquisitionFrameRateEnabled = "true"
CameraAttributes::DigitalIOControl::LineSelector = "Line 0"
CameraAttributes::DigitalIOControl::LineDebouncerTimeRaw = "0"
CameraAttributes::DigitalIOControl::LineSelector = "Line 1"
CameraAttributes::DigitalIOControl::LineSelector = "Line 2"
CameraAttributes::DigitalIOControl::LineDebouncerTimeRaw = "0"
CameraAttributes::DigitalIOControl::LineSelector = "Line 3"
CameraAttributes::DigitalIOControl::LineDebouncerTimeRaw = "0"
CameraAttributes::DigitalIOControl::LineSelector = "Line 0"
CameraAttributes::ImageFormatControl::OnBoardColorProcessEnabled = "true"
CameraAttributes::ImageFormatControl::PixelFormat = "Mono 8"

0 Kudos
Message 1 of 9
(7,109 Views)

Hi bmann2000,

 

Could you please confirm which version of MAX you are using?

 

Thanks,

 

Tom-S

Applications Engineering

National Instruments

0 Kudos
Message 2 of 9
(7,053 Views)

MAX version 5.6.  I'm developing with LV2013.  LabVIEW 2015 is also available to me.

0 Kudos
Message 3 of 9
(7,047 Views)

I would first recommend updating your version of MAX to 15.0, which you should be able to do if you have access to the latest LabVIEW version.

 

MAX cannot be downloaded directly, but it is part of the system configuration which can be downloaded at the following link:

 

http://www.ni.com/download/ni-system-configuration-15.0.0/5454/en/

 

I've tested saving camera configurations with NI MAX 2015 this morning, and the save button did save all the camera attributes, even when I close MAX and unplugged the camera.

 

I hope this helps,

 

TomS

 

 

0 Kudos
Message 4 of 9
(7,035 Views)

Hi Tom, I updated to MAX 15.0 but the same problem persists.

I've also noticed that MAX will warn of out of range parameters when saving, the parameter name is displayed e.g. Attribute Value is out of range  "CameraAttributes::AcquisitionControl:AcquisitionFrameRate"

when you open the *.icd file the parameter is not there, this applies if the parameter is within range or out of range.

 

I would imagine that MAX reads attribute names and values from the camera.  I've used the example VI "Grab and Attributes Setup.vi" this VI appears to take the attributes from the camera, but again if you use IMAQdx Write Attributes.vi, it writes the same short list of attributes as MAX.

 

I'm starting to wonder if only the variables listed in the *.icd file are available to change.  However, I can edit "Gain" on the fly during the Grab and watch the image get darker/lighter, but Gain is not written to the *.icd file.  This suggests all the visible attributes are available but not written to file for some reason.

 

 

 

 

0 Kudos
Message 5 of 9
(7,020 Views)

Hi,

 

On my camera (i'm using a microsoft lifecam) I'm finding when I write attributes in MAX and save they are updated on the .icd file, and I dont get any errors, or anything out of range.

 

This sounds like it may be that MAX has limited functionality with you camera, meaning that it cant control all of the parameters. Without having the exact model of camera, theres not much more I can advise.

 

TomS

0 Kudos
Message 6 of 9
(7,013 Views)

Okay, thanks for your help, I'll raise a support ticket with NI, use my SSP for once.

0 Kudos
Message 7 of 9
(7,009 Views)

I am having the same issue - did you ever resolve this?

0 Kudos
Message 8 of 9
(3,882 Views)

For GenICam cameras (GigE, USB3), the camera's XML file specifies which attributes can/should be persisted. You can find this file on disk at C:\Users\Public\Documents\National Instruments\NI-IMAQdx\Data\XML.

 

If you search the word "Streamable" you will find things like this:

 

<Enumeration Name="GainAuto" NameSpace="Standard">
<ToolTip>Gain Auto is the 'automatic' counterpart of the manual gain feature.</ToolTip>
<Description>The gain auto function automatically adjusts the Auto Gain Raw parameter value within set limits, until a target average gray value for the pixel data from Auto Function AOI1 is reached.</Description>
<DisplayName>Gain Auto</DisplayName>
<pIsImplemented>N100</pIsImplemented>
<pIsAvailable>N101</pIsAvailable>
<Streamable>Yes</Streamable>

 

IMAQdx respects the camera's list of attributes that are to be persisted. If it's not in the icd file, then the camera vendor didn't mark it as streamable.

 

If you don't want to write all the other attributes to the camera each time, you should explore whether or not the camera has the user sets feature. Many cameras will allow you to save different configurations to non-volatile memory so that they'll power on with these settings by default.

 

Hope this helps,

Katie

Message 9 of 9
(3,877 Views)