Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A convenience function equivalent to calling ap_GrabFrame() followed by ap_SaveFrame(), but saving the caller the effort of allocating and releasing memory for the image. This function is therefore similar to the Grab button on DevWareX.

int ap_GetFrameData(AP_HANDLE apbase, const char *szItem)

Parameters

apbase – Device handle.
szItem – Name of a data item.

Return Value

Value of the data item.

Remarks

Get the value of an item of frame-related data associated with the image frame returned from the most recent call to ap_GrabFrame().

The following data items are supported:

- "frameLength" Same as the return value from the last ap_GrabFrame() call.
- "cyclingContext" If the sensor is automatically switching between contexts on each frame, this is the context index that the last frame is for. Context indexes start from 0 and only include the contexts that are actively cycling.
If the sensor is not automatically switching contexts, this returns 0.
- "contextWidth" The image format width for the context.
- "contextHeight" The image format height for the context.
- "frameNumber" Frame counter from the demo board. Depends on the type of Demo board. On Demo3 this counts frames sent to the host.
- "frameTime" Frame time from the demo board. Depends on the type of Demo board. On Demo3 this is the time between frames in microseconds.
- "frameLines" Number of pixel rows from the demo board. Depends on the type of Demo board.
- "linePixels" Number of pixels per row from the demo board. Depends on the type of Demo board.
- "gpio" State of Demo board GPIO pins when the frame was captured. Depends on the type of Demo board.

int ap_GetState(AP_HANDLE apbase, const char *szState)

...