Zivid C++ API 2.9.0+4dbba385-1
Defining the Future of 3D Machine Vision
Public Member Functions | List of all members
Zivid::Frame Class Reference

A frame captured by a Zivid camera More...

#include <Zivid/Frame.h>

Public Member Functions

ZIVID_CORE_EXPORT Frame ()
 Construct a new frame More...
 
ZIVID_CORE_EXPORT Frame (const std::string &fileName)
 Creates a frame by loading data from a file More...
 
ZIVID_CORE_EXPORT PointCloud pointCloud () const
 Get the point cloud More...
 
ZIVID_CORE_EXPORT CameraState state () const
 Get the camera state data at the time of the frame capture More...
 
ZIVID_CORE_EXPORT Settings settings () const
 Get the settings used to capture this frame More...
 
ZIVID_CORE_EXPORT FrameInfo info () const
 Get information collected at the time of the frame capture More...
 
ZIVID_CORE_EXPORT CameraInfo cameraInfo () const
 Get information about the camera used to capture the frame More...
 
ZIVID_CORE_EXPORT void save (const std::string &fileName) const
 Save the frame to file More...
 
ZIVID_CORE_EXPORT void load (const std::string &fileName)
 Load a frame from a Zivid data file More...
 
ZIVID_CORE_EXPORT std::string toString () const
 Get string representation of the frame More...
 

Detailed Description

A frame captured by a Zivid camera

Contains the point cloud (stored on compute device memory) as well as calibration data, settings and state used by the API at time of the frame capture. Use Frame::pointCloud() to access point cloud data.

Note that if this Frame 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 Frame object that requires the capture to be finished, for example Frame::pointCloud(), the method will block until the point cloud is available.

Constructor & Destructor Documentation

◆ Frame() [1/2]

ZIVID_CORE_EXPORT Zivid::Frame::Frame ( )

Construct a new frame

◆ Frame() [2/2]

ZIVID_CORE_EXPORT Zivid::Frame::Frame ( const std::string &  fileName)
explicit

Creates a frame by loading data from a file

Member Function Documentation

◆ cameraInfo()

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

Get information about the camera used to capture the frame

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

◆ info()

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

Get information collected at the time of the frame capture

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

◆ load()

ZIVID_CORE_EXPORT void Zivid::Frame::load ( const std::string &  fileName)

Load a frame from a Zivid data file

◆ pointCloud()

ZIVID_CORE_EXPORT PointCloud Zivid::Frame::pointCloud ( ) const

Get the point cloud

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

◆ save()

ZIVID_CORE_EXPORT void Zivid::Frame::save ( const std::string &  fileName) const

Save the frame to file

The file type is determined from the file extension. Supported extensions are .zdf, .ply (ordered), .xyz and .pcd. If the capture is still in-progress, then this method will block until the capture completes.

◆ settings()

ZIVID_CORE_EXPORT Settings Zivid::Frame::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::Frame::state ( ) const

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

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

◆ toString()

ZIVID_CORE_EXPORT std::string Zivid::Frame::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: