Spinnaker SDK C++
4.2.0.21
 
 

 
Loading...
Searching...
No Matches
Camera Control

Functions and classes for controlling the camera. More...

Functions

bool ConfigureCameraStreams (CameraPtr pCam, StreamTransmitFlags &streamTransmitFlags)
 Configures the camera streams.
 
bool GetFloatValueFromNode (INodeMap &nodeMap, const gcstring &nodeName, float &nodeVal)
 Gets a float value from a specified node.
 
bool GetMaxFloatValueFromNode (INodeMap &nodeMap, const gcstring &nodeName, float &nodeVal)
 Gets the max float value for a specified node.
 
bool EnableAutoExposure (CameraPtr pCam)
 Enables automatic exposure.
 
bool GetExposureTime (CameraPtr pCam, double &exposureTime)
 Retrieves the current exposure time.
 
bool GetBooleanValueFromNode (INodeMap &nodeMap, const gcstring &nodeName, bool &nodeVal)
 Gets a boolean value from a specified node.
 
bool GetIntValueFromNode (INodeMap &nodeMap, const gcstring &nodeName, int64_t &nodeVal)
 Gets an integer value from a specified node.
 
bool GetMaxIntValueFromNode (INodeMap &nodeMap, const gcstring &nodeName, int64_t &nodeVal)
 Gets the max integer value for a specified node.
 
bool GetEnumValueFromNode (INodeMap &nodeMap, const gcstring &nodeName, int64_t &enumVal)
 Gets an enumerated (int) value from a specified node.
 
bool GetEnumAsStringValueFromNode (INodeMap &nodeMap, const gcstring &nodeName, int64_t &nodeValAsInt, gcstring &nodeValAsStr)
 Gets an enumerated string value from a specified node.
 
bool GetStringValueFromNode (INodeMap &nodeMap, const gcstring &nodeName, string &nodeVal)
 Gets a string value from a specified node.
 
bool SetBooleanValueToNode (INodeMap &nodeMap, const gcstring &nodeName, bool isChecked)
 Sets a boolean value to a specified node.
 
bool SetIntValueToNode (INodeMap &nodeMap, const gcstring &nodeName, int64_t nodeVal)
 Sets an integer value to a specified node.
 
bool SetFloatValueToNode (INodeMap &nodeMap, const gcstring &nodeName, float nodeVal)
 Sets a double value to a specified node.
 
bool SetEnumValueToNode (INodeMap &nodeMap, const gcstring &nodeName, const int64_t nodeVal, NodeMapType nodeMapType=NodeMapType_Camera)
 Sets an enumerated value to a specified node.
 
bool SetEnumAsStringValueToNode (INodeMap &nodeMap, const gcstring &nodeName, gcstring nodeEnumValAsStr)
 Sets an enumerated string value to a specified node.
 
bool SetStringValueToNode (INodeMap &nodeMap, const gcstring &nodeName, string &nodeVal)
 Sets a string value to a specified node.
 
bool ConfigureGVCPHeartbeat (CameraPtr pCam, bool doEnable)
 Configures the GVCP heartbeat setting.
 
bool DisableGVCPHeartbeat (CameraPtr pCam)
 Disables the GVCP heartbeat.
 
bool PrintDeviceInfo (INodeMap &nodeMap)
 Prints device information using a specific node map.
 
bool ResetGVCPHeartbeat ()
 Resets the GVCP heartbeat to its default state.
 
bool SetExposureTime (CameraPtr pCam, double exposureTime)
 Sets the exposure time.
 
bool EnableAutoGain (CameraPtr pCam)
 Enables automatic gain control.
 
bool GetGainValue (CameraPtr pCam, double &gainValue)
 Retrieves the current gain value.
 
bool SetGainValue (CameraPtr pCam, double gainValue)
 Sets the gain value.
 
bool SetAutoWhiteBalance (CameraPtr pCam, double redValue, double blueValue)
 Sets the Automatic White Balance (AWB) using specified red and blue values.
 
bool EnableAutoWhiteBalance (CameraPtr pCam)
 Enables Automatic White Balance (AWB).
 
bool PrintDeviceInfo (CameraPtr pCam)
 Prints device information using a specific node map.
 

Detailed Description

Functions and classes for controlling the camera.

Function Documentation

◆ ConfigureCameraStreams()

bool ConfigureCameraStreams ( CameraPtr  pCam,
StreamTransmitFlags streamTransmitFlags 
)

Configures the camera streams.

Parameters
doSetTransmittedStreamsFlag to set stream enable variable.
Returns
True if configuration is successful, false otherwise.

◆ ConfigureGVCPHeartbeat()

bool ConfigureGVCPHeartbeat ( CameraPtr  pCam,
bool  doEnable 
)

Configures the GVCP heartbeat setting.

Parameters
doEnableEnable or disable GVCP heartbeat.
Returns
True if successful, false otherwise.

◆ DisableGVCPHeartbeat()

bool DisableGVCPHeartbeat ( CameraPtr  pCam)

Disables the GVCP heartbeat.

Returns
True if successful, false otherwise.

◆ EnableAutoExposure()

bool EnableAutoExposure ( CameraPtr  pCam)

Enables automatic exposure.

Returns
True if successful, false otherwise.

◆ EnableAutoGain()

bool EnableAutoGain ( CameraPtr  pCam)

Enables automatic gain control.

Returns
True if successful, false otherwise.

◆ EnableAutoWhiteBalance()

bool EnableAutoWhiteBalance ( CameraPtr  pCam)

Enables Automatic White Balance (AWB).

Returns
True if successful, false otherwise.

◆ GetBooleanValueFromNode()

bool GetBooleanValueFromNode ( INodeMap &  nodeMap,
const gcstring nodeName,
bool &  nodeVal 
)

Gets a boolean value from a specified node.

Parameters
nodeNameNode name.
nodeValReference to store the retrieved value.
Returns
True if successful, false otherwise.

◆ GetEnumAsStringValueFromNode()

bool GetEnumAsStringValueFromNode ( INodeMap &  nodeMap,
const gcstring nodeName,
int64_t &  nodeValAsInt,
gcstring nodeValAsStr 
)

Gets an enumerated string value from a specified node.

Parameters
nodeNameNode name.
nodeValAsIntReference to store the integer value of the node.
nodeValAsStrReference to store the string value of the node.
Returns
True if successful, false otherwise.

◆ GetEnumValueFromNode()

bool GetEnumValueFromNode ( INodeMap &  nodeMap,
const gcstring nodeName,
int64_t &  enumVal 
)

Gets an enumerated (int) value from a specified node.

Parameters
nodeNameNode name.
enumValReference to store the retrieved value.
Returns
True if successful, false otherwise.

◆ GetExposureTime()

bool GetExposureTime ( CameraPtr  pCam,
double &  exposureTime 
)

Retrieves the current exposure time.

Parameters
exposureTimeReference to store the exposure time.
Returns
True if successful, false otherwise.

◆ GetFloatValueFromNode()

bool GetFloatValueFromNode ( INodeMap &  nodeMap,
const gcstring nodeName,
float &  nodeVal 
)

Gets a float value from a specified node.

Parameters
nodeNameNode name.
nodeValReference to store the retrieved value.
Returns
True if successful, false otherwise.

◆ GetGainValue()

bool GetGainValue ( CameraPtr  pCam,
double &  gainValue 
)

Retrieves the current gain value.

Parameters
gainValueReference to store the gain value.
Returns
True if successful, false otherwise.

◆ GetIntValueFromNode()

bool GetIntValueFromNode ( INodeMap &  nodeMap,
const gcstring nodeName,
int64_t &  nodeVal 
)

Gets an integer value from a specified node.

Parameters
nodeNameNode name.
nodeValReference to store the retrieved value.
Returns
True if successful, false otherwise.

◆ GetMaxFloatValueFromNode()

bool GetMaxFloatValueFromNode ( INodeMap &  nodeMap,
const gcstring nodeName,
float &  nodeVal 
)

Gets the max float value for a specified node.

Parameters
nodeNameNode name.
nodeValReference to store the retrieved max value.
Returns
True if successful, false otherwise.

◆ GetMaxIntValueFromNode()

bool GetMaxIntValueFromNode ( INodeMap &  nodeMap,
const gcstring nodeName,
int64_t &  nodeVal 
)

Gets the max integer value for a specified node.

Parameters
nodeNameNode name.
nodeValReference to store the retrieved max value.
Returns
True if successful, false otherwise.

◆ GetStringValueFromNode()

bool GetStringValueFromNode ( INodeMap &  nodeMap,
const gcstring nodeName,
string &  nodeVal 
)

Gets a string value from a specified node.

Parameters
nodeNameNode name.
nodeValReference to store the retrieved value.
Returns
True if successful, false otherwise.

◆ PrintDeviceInfo() [1/2]

bool PrintDeviceInfo ( CameraPtr  pCam)

Prints device information using a specific node map.

Parameters
pCamReference to the camera.
Returns
Status code of the operation.

◆ PrintDeviceInfo() [2/2]

bool PrintDeviceInfo ( INodeMap &  nodeMap)

Prints device information using a specific node map.

Parameters
nodeMapReference to the node map.
Returns
Status code of the operation.

◆ ResetGVCPHeartbeat()

bool ResetGVCPHeartbeat ( )

Resets the GVCP heartbeat to its default state.

Returns
True if successful, false otherwise.

◆ SetAutoWhiteBalance()

bool SetAutoWhiteBalance ( CameraPtr  pCam,
double  redValue,
double  blueValue 
)

Sets the Automatic White Balance (AWB) using specified red and blue values.

Parameters
redValueThe red balance value to set.
blueValueThe blue balance value to set.
Returns
True if successful, false otherwise.

◆ SetBooleanValueToNode()

bool SetBooleanValueToNode ( INodeMap &  nodeMap,
const gcstring nodeName,
bool  isChecked 
)

Sets a boolean value to a specified node.

Parameters
nodeNameNode name.
isCheckedValue to set.
Returns
True if successful, false otherwise.

◆ SetEnumAsStringValueToNode()

bool SetEnumAsStringValueToNode ( INodeMap &  nodeMap,
const gcstring nodeName,
gcstring  nodeEnumValAsStr 
)

Sets an enumerated string value to a specified node.

Parameters
nodeNameNode name.
nodeEnumValAsStrString value to set.
Returns
True if successful, false otherwise.
Examples
StereoGPIO.cpp.

◆ SetEnumValueToNode()

bool SetEnumValueToNode ( INodeMap &  nodeMap,
const gcstring nodeName,
const int64_t  nodeVal,
NodeMapType  nodeMapType = NodeMapType_Camera 
)

Sets an enumerated value to a specified node.

Parameters
nodeMapReference to the node map.
nodeNameNode name.
nodeValValue to set.
nodeMapTypeType of the node map.
Returns
True if successful, false otherwise.

◆ SetExposureTime()

bool SetExposureTime ( CameraPtr  pCam,
double  exposureTime 
)

Sets the exposure time.

Parameters
exposureTimeExposure time to set.
Returns
True if successful, false otherwise.

◆ SetFloatValueToNode()

bool SetFloatValueToNode ( INodeMap &  nodeMap,
const gcstring nodeName,
float  nodeVal 
)

Sets a double value to a specified node.

Parameters
nodeNameNode name.
nodeValValue to set.
Returns
True if successful, false otherwise.

◆ SetGainValue()

bool SetGainValue ( CameraPtr  pCam,
double  gainValue 
)

Sets the gain value.

Parameters
gainValueGain value to set.
Returns
True if successful, false otherwise.

◆ SetIntValueToNode()

bool SetIntValueToNode ( INodeMap &  nodeMap,
const gcstring nodeName,
int64_t  nodeVal 
)

Sets an integer value to a specified node.

Parameters
nodeNameNode name.
nodeValValue to set.
Returns
True if successful, false otherwise.

◆ SetStringValueToNode()

bool SetStringValueToNode ( INodeMap &  nodeMap,
const gcstring nodeName,
string &  nodeVal 
)

Sets a string value to a specified node.

Parameters
nodeNameNode name.
nodeValValue to set.
Returns
True if successful, false otherwise.