Zivid C++ API 2.14.0+e4a0c4a9-1
Zivid::Frame2D Class Reference

A 2D frame captured by a Zivid camera. More...

#include <Zivid/Frame2D.h>

Public Member Functions

ZIVID_CORE_EXPORT Frame2D ()
 Construct a new empty 2d frame.
 
ZIVID_CORE_EXPORT Image< ColorRGBAimageRGBA () const
 Get color (RGBA) image from the frame.
 
ZIVID_CORE_EXPORT Image< ColorBGRAimageBGRA () const
 Get color (BGRA) image from the frame.
 
ZIVID_CORE_EXPORT Image< ColorSRGBimageSRGB () const
 Get color (sRGB) image from the frame.
 
ZIVID_CORE_EXPORT Settings2D settings () const
 Get the settings used to capture this frame.
 
ZIVID_CORE_EXPORT CameraState state () const
 Get the camera state data at the time of the capture.
 
ZIVID_CORE_EXPORT FrameInfo info () const
 Get information collected at the time of the capture.
 
ZIVID_CORE_EXPORT CameraInfo cameraInfo () const
 Get information about the camera used to capture the frame.
 
ZIVID_CORE_EXPORT std::string toString () const
 Get string representation of the frame.
 
ZIVID_CORE_EXPORT Frame2D clone () const
 Returns a clone of the frame. The clone will include a copy of all of the frame data. This means that the returned frame will not be affected by subsequent modifications on the original frame.
 

Detailed Description

A 2D frame captured by a Zivid camera.

Contains a 2D image as well as metadata, settings and state of the API at the time of capture.

Note that if this Frame2D object was returned from a call to Camera::capture, then there may still be remaining data transfer and processing going on in the background. When you call a method on the Frame2D object that requires the capture to be finished, for example Frame2D::imageRGBA(), the method will block until the image is available.

Constructor & Destructor Documentation

◆ Frame2D()

ZIVID_CORE_EXPORT Zivid::Frame2D::Frame2D ( )

Construct a new empty 2d frame.

Member Function Documentation

◆ cameraInfo()

ZIVID_CORE_EXPORT CameraInfo Zivid::Frame2D::cameraInfo ( ) const

Get information about the camera used to capture the frame.

This method returns instantly, even if the capture is still in-progress.

◆ clone()

ZIVID_CORE_EXPORT Frame2D Zivid::Frame2D::clone ( ) const

Returns a clone of the frame. The clone will include a copy of all of the frame data. This means that the returned frame will not be affected by subsequent modifications on the original frame.

This function incurs a performance cost due to the copying of the data. When performance is important we recommend to avoid using this method, and instead modify the existing frame.

◆ imageBGRA()

ZIVID_CORE_EXPORT Image< ColorBGRA > Zivid::Frame2D::imageBGRA ( ) const

Get color (BGRA) image from the frame.

The format of each pixel is given by ColorBGRA.

This format holds linear color values, which are suitable as input to computer vision algorithms. For showing colors on a display for viewing, consider using the ColorSRGB format.

If the image is not yet available because the capture is still in-progress, then this method will block until the image is available.

◆ imageRGBA()

ZIVID_CORE_EXPORT Image< ColorRGBA > Zivid::Frame2D::imageRGBA ( ) const

Get color (RGBA) image from the frame.

The format of each pixel is given by ColorRGBA.

This format holds linear color values, which are suitable as input to computer vision algorithms. For showing colors on a display for viewing, consider using the ColorSRGB format.

If the image is not yet available because the capture is still in-progress, then this method will block until the image is available.

◆ imageSRGB()

ZIVID_CORE_EXPORT Image< ColorSRGB > Zivid::Frame2D::imageSRGB ( ) const

Get color (sRGB) image from the frame.

The sRGB color space is suitable for showing an image on a display for human viewing. It is easier to see details in darker areas of an image in sRGB, than in linear RGB, as more of the dynamic range is dedicated to darker colors. This format is assumed by default by most monitors and should be used when displaying an image.

The format of each pixel is given by ColorSRGB. If the image is not yet available because the capture is still in-progress, then this method will block until the image is available.

◆ info()

ZIVID_CORE_EXPORT FrameInfo Zivid::Frame2D::info ( ) const

Get information collected at the time of the capture.

If the capture is still in-progress, then this method will block until the capture completes.

◆ settings()

ZIVID_CORE_EXPORT Settings2D Zivid::Frame2D::settings ( ) const

Get the settings used to capture this frame.

This method returns instantly, even if the capture is still in-progress.

◆ state()

ZIVID_CORE_EXPORT CameraState Zivid::Frame2D::state ( ) const

Get the camera state data at the time of the capture.

If the capture is still in-progress, then this method will block until the capture completes.

◆ toString()

ZIVID_CORE_EXPORT std::string Zivid::Frame2D::toString ( ) const

Get string representation of the frame.

Returns
Frame info as string

If the capture is still in-progress, then this method will block until the capture completes.


The documentation for this class was generated from the following file: