Skip to content

Group CCamera

Modules > CCamera

The functions in this section provide access to information, objects, and functionality of cameras. This includes nodemap retrieval, acquisition and init commands, event handler registration, and camera property retrieval.

Public Functions

Type Name
spinCameraBeginAcquisition (spinCamera hCamera)
spinCameraDeInit (spinCamera hCamera)
spinCameraDiscoverMaxPacketSize (spinCamera hCamera, unsigned int * pMaxPacketSize)
spinCameraEndAcquisition (spinCamera hCamera)
spinCameraForceIP ()
spinCameraGetAccessMode (spinCamera hCamera, spinAccessMode * pAccessMode)
spinCameraGetDeviceID (spinCamera hCamera, char * pBuf, size_t * pBufLen)
spinCameraGetDeviceSerialNumber (spinCamera hCamera, char * pBuf, size_t * pBufLen)
spinCameraGetGuiXml (spinCamera hCamera, char * pBuf, size_t * pBufLen)
spinCameraGetNextImage (spinCamera hCamera, spinImage * phImage)
spinCameraGetNextImageEx (spinCamera hCamera, uint64_t grabTimeout, spinImage * phImage)
spinCameraGetNextImageSync (spinCamera hCamera, uint64_t grabTimeout, spinImageList * phImageList)
spinCameraGetNodeMap (spinCamera hCamera, spinNodeMapHandle * phNodeMap)
spinCameraGetTLDeviceNodeMap (spinCamera hCamera, spinNodeMapHandle * phNodeMap)
spinCameraGetTLStreamNodeMap (spinCamera hCamera, spinNodeMapHandle * phNodeMap)
spinCameraGetUniqueID (spinCamera hCamera, char * pBuf, size_t * pBufLen)
spinCameraInit (spinCamera hCamera)
spinCameraIsInitialized (spinCamera hCamera, bool8_t * pbInit)
spinCameraIsStreaming (spinCamera hCamera, bool8_t * pbIsStreaming)
spinCameraIsValid (spinCamera hCamera, bool8_t * pbValid)
spinCameraReadPort (spinCamera hCamera, uint64_t iAddress, void * pBuffer, size_t iSize)
spinCameraRegisterDeviceEventHandler (spinCamera hCamera, spinDeviceEventHandler hDeviceEventHandler)
spinCameraRegisterDeviceEventHandlerEx (spinCamera hCamera, spinDeviceEventHandler hDeviceEventHandler, const char * pName)
spinCameraRegisterImageEventHandler (spinCamera hCamera, spinImageEventHandler hImageEventHandler)
spinCameraRegisterImageEventHandlerEx (spinCamera hCamera, spinImageEventHandler hImageEventHandler, uint64_t streamIndex)
spinCameraRegisterImageListEventHandler (spinCamera hCamera, spinImageListEventHandler hImageListEventHandler)
spinCameraRelease (spinCamera hCamera)
spinCameraUnregisterDeviceEventHandler (spinCamera hCamera, spinDeviceEventHandler hDeviceEventHandler)
spinCameraUnregisterImageEventHandler (spinCamera hCamera, spinImageEventHandler hImageEventHandler)
spinCameraUnregisterImageListEventHandler (spinCamera hCamera, spinImageListEventHandler hImageListEventHandler)
spinCameraWritePort (spinCamera hCamera, uint64_t iAddress, void * pBuffer, size_t iSize)

Public Functions Documentation

function spinCameraBeginAcquisition

spinCameraBeginAcquisition (
    spinCamera hCamera
) 

Has a camera start acquiring images

See also: spinError

Parameters:

  • hCamera The camera to begin acquiring images

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraDeInit

spinCameraDeInit (
    spinCamera hCamera
) 

Deinitializes a camera, greatly reducing functionality

See also: spinError

Parameters:

  • hCamera The camera to deinitialize

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraDiscoverMaxPacketSize

spinCameraDiscoverMaxPacketSize (
    spinCamera hCamera,
    unsigned int * pMaxPacketSize
) 

Returns the largest packet size that can be safely used on the interface that device is connected to.

See also: spinError

Parameters:

  • hCamera The camera to check
  • pMaxPacketSize The maximum packet size returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraEndAcquisition

spinCameraEndAcquisition (
    spinCamera hCamera
) 

Has a camera stop acquiring images

See also: spinError

Parameters:

  • hCamera The camera to stop acquiring images

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraForceIP

spinCameraForceIP () 

Forces the camera to be on the same subnet as its corresponding interface.

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraGetAccessMode

spinCameraGetAccessMode (
    spinCamera hCamera,
    spinAccessMode * pAccessMode
) 

Retrieves the access mode of a camera (as an enum, spinAccessMode)

See also: spinError

See also: spinAccessMode

Parameters:

  • hCamera The camera of the access mode to retrieve
  • pAccessMode The access mode enum pointer in which the access mode is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraGetDeviceID

spinCameraGetDeviceID (
    spinCamera hCamera,
    char * pBuf,
    size_t * pBufLen
) 

Retrieves a unique identifier for a camera

See also: spinError

Parameters:

  • hCamera The camera of the unique identifier
  • pBuf The c-string character buffer in which the unique identifier is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraGetDeviceSerialNumber

spinCameraGetDeviceSerialNumber (
    spinCamera hCamera,
    char * pBuf,
    size_t * pBufLen
) 

Retrieves a manufacturer specific serial number that identifies the camera

See also: spinError

Parameters:

  • hCamera The camera handle identified by the serial number
  • pBuf The c-string character buffer in which the device serial number is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraGetGuiXml

spinCameraGetGuiXml (
    spinCamera hCamera,
    char * pBuf,
    size_t * pBufLen
) 

Retrieves the GUI XML from a camera

See also: spinError

Parameters:

  • hCamera The camera of the GUI XML to retrieve
  • pBuf The c-string character buffer in which the GUI XML is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraGetNextImage

spinCameraGetNextImage (
    spinCamera hCamera,
    spinImage * phImage
) 

Retrieves an image from a camera

See also: spinError

Parameters:

  • hCamera The camera of the image to retrieve
  • phImage The image handle pointer in which the image is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraGetNextImageEx

spinCameraGetNextImageEx (
    spinCamera hCamera,
    uint64_t grabTimeout,
    spinImage * phImage
) 

Retrieves an image from a camera; manually set the timeout in milliseconds

See also: spinError

Parameters:

  • hCamera The camera of the image to retrieve
  • grabTimeout A 64bit value that represents a timeout in milliseconds
  • phImage The image handle pointer in which the image is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraGetNextImageSync

spinCameraGetNextImageSync (
    spinCamera hCamera,
    uint64_t grabTimeout,
    spinImageList * phImageList
) 

If a camera supports one or more streams, this function gets one image from each of the camera's streams, and returns the images in a list. This function will block for the specified timeout period until an image arrives on all the streams.

See also: spinCameraInit()

See also: spinCameraBeginAcquisition()

See also: spinCameraEndAcquisition()

Parameters:

  • hCamera The camera of the image to retrieve
  • grabTimeout A 64bit value that represents a timeout in milliseconds

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraGetNodeMap

spinCameraGetNodeMap (
    spinCamera hCamera,
    spinNodeMapHandle * phNodeMap
) 

Retrieves the GenICam nodemap from a camera

See also: spinError

Parameters:

  • hCamera The camera from which the nodemap is retrieved
  • phNodeMap The nodemap handle pointer in which the nodemap is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraGetTLDeviceNodeMap

spinCameraGetTLDeviceNodeMap (
    spinCamera hCamera,
    spinNodeMapHandle * phNodeMap
) 

Retrieves the transport layer device nodemap from a camera

See also: spinError

Parameters:

  • hCamera The camera from which the transport layer device nodemap is retrieved
  • phNodeMap The nodemap handle pointer in which the nodemap is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraGetTLStreamNodeMap

spinCameraGetTLStreamNodeMap (
    spinCamera hCamera,
    spinNodeMapHandle * phNodeMap
) 

Retrieves the transport layer stream nodemap from a camera

See also: spinError

Parameters:

  • hCamera The camera from which the transport layer streaming nodemap is retrieved
  • phNodeMap The nodemap handle pointer in which the nodemap is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraGetUniqueID

spinCameraGetUniqueID (
    spinCamera hCamera,
    char * pBuf,
    size_t * pBufLen
) 

Retrieves a unique identifier for a camera

See also: spinError

Deprecated

Use spinCameraGetDeviceID() instead.

Parameters:

  • hCamera The camera of the unique identifier
  • pBuf The c-string character buffer in which the unique identifier is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraInit

spinCameraInit (
    spinCamera hCamera
) 

Initializes a camera, allowing for much more interaction

See also: spinError

Parameters:

  • hCamera The camera to initialize

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraIsInitialized

spinCameraIsInitialized (
    spinCamera hCamera,
    bool8_t * pbInit
) 

Checks whether a camera is currently initialized

See also: spinError

Parameters:

  • hCamera The camera to check
  • pbInit The boolean pointer to return whether or not the camera is initialized

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraIsStreaming

spinCameraIsStreaming (
    spinCamera hCamera,
    bool8_t * pbIsStreaming
) 

Checks whether a camera is currently acquiring images

See also: spinError

Parameters:

  • hCamera The camera to check
  • pbIsStreaming The boolean pointer to return whether or not the camera is currently streaming

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraIsValid

spinCameraIsValid (
    spinCamera hCamera,
    bool8_t * pbValid
) 

Checks whether a camera is still valid for use

See also: spinError

Parameters:

  • hCamera The camera to check
  • pbValid The boolean pointer to return whether or not the camera is valid

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraReadPort

spinCameraReadPort (
    spinCamera hCamera,
    uint64_t iAddress,
    void * pBuffer,
    size_t iSize
) 

function spinCameraRegisterDeviceEventHandler

spinCameraRegisterDeviceEventHandler (
    spinCamera hCamera,
    spinDeviceEventHandler hDeviceEventHandler
) 

Registers a universal device event handler (every device event type) to a camera

See also: spinError

Deprecated

Use spinNodeRegisterCallback() and spinNodeDeregisterCallback() for handling device node callbacks instead.

Parameters:

  • hCamera The camera on which to register the universal device event handler
  • hDeviceEventHandler The device event handler to register

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraRegisterDeviceEventHandlerEx

spinCameraRegisterDeviceEventHandlerEx (
    spinCamera hCamera,
    spinDeviceEventHandler hDeviceEventHandler,
    const char * pName
) 

Registers a specific device event handler (only one device event type) to a camera

See also: spinError

Deprecated

Use spinNodeRegisterCallback() and spinNodeDeregisterCallback() for handling device node callbacks instead.

Parameters:

  • hCamera The camera on which to register the specific device event handler
  • hDeviceEventHandler The device event handler to register
  • pName The name of the device event handler to register

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraRegisterImageEventHandler

spinCameraRegisterImageEventHandler (
    spinCamera hCamera,
    spinImageEventHandler hImageEventHandler
) 

Registers an image event handler to a camera

See also: spinError

Parameters:

  • hCamera The camera on which to register the image event handler
  • hImageEventHandler The image event handler to register

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraRegisterImageEventHandlerEx

spinCameraRegisterImageEventHandlerEx (
    spinCamera hCamera,
    spinImageEventHandler hImageEventHandler,
    uint64_t streamIndex
) 

Registers an image event handler to a camera Registers a specific stream handler for the camera given a stream index. The camera has to be initialized first with a call to spinCameraInit() before registering handlers for events.

See also: spinError

Parameters:

  • hCamera The camera on which to register the image event handler
  • hImageEventHandler The image event handler to register
  • streamIndex The index of the stream of where this handler will be registered to

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraRegisterImageListEventHandler

spinCameraRegisterImageListEventHandler (
    spinCamera hCamera,
    spinImageListEventHandler hImageListEventHandler
) 

Registers an image list event handler to a camera

See also: spinError

Parameters:

  • hCamera The camera on which to register the image event handler
  • hImageListEventHandler The image list event handler to register

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraRelease

spinCameraRelease (
    spinCamera hCamera
) 

Releases a camera

See also: spinError

Parameters:

  • hCamera The camera to release

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraUnregisterDeviceEventHandler

spinCameraUnregisterDeviceEventHandler (
    spinCamera hCamera,
    spinDeviceEventHandler hDeviceEventHandler
) 

Unregisters a device event handler from a camera

See also: spinError

Deprecated

Use spinNodeRegisterCallback() and spinNodeDeregisterCallback() for handling device node callbacks instead.

Parameters:

  • hCamera The camera from which to unregister the device event handler
  • hDeviceEventHandler The device event handler to unregister

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraUnregisterImageEventHandler

spinCameraUnregisterImageEventHandler (
    spinCamera hCamera,
    spinImageEventHandler hImageEventHandler
) 

Unregisters an image event handler from a camera

See also: spinError

Parameters:

  • hCamera The camera from which to unregister the image event handler
  • hImageEventHandler The image event handler to unregister

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraUnregisterImageListEventHandler

spinCameraUnregisterImageListEventHandler (
    spinCamera hCamera,
    spinImageListEventHandler hImageListEventHandler
) 

Unregisters an image list event handler from a camera

See also: spinError

Parameters:

  • hCamera The camera from which to unregister the image event handler
  • hImageEventHandler The image event handler to unregister

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinCameraWritePort

spinCameraWritePort (
    spinCamera hCamera,
    uint64_t iAddress,
    void * pBuffer,
    size_t iSize
)