Zivid C++ API 2.13.1+18e79e79-1
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.
 
ZIVID_CORE_EXPORT Frame (const std::string &fileName)
 Creates a frame by loading data from a file.
 
ZIVID_CORE_EXPORT PointCloud pointCloud () const
 Get the point cloud.
 
ZIVID_CORE_EXPORT CameraState state () const
 Get the camera state data at the time of the frame capture.
 
ZIVID_CORE_EXPORT Settings settings () const
 Get the settings used to capture this frame.
 
ZIVID_CORE_EXPORT FrameInfo info () const
 Get information collected at the time of the frame capture.
 
ZIVID_CORE_EXPORT CameraInfo cameraInfo () const
 Get information about the camera used to capture the frame.
 
ZIVID_CORE_EXPORT void save (const std::string &fileName) const
 Save the frame to file.
 
ZIVID_CORE_EXPORT void load (const std::string &fileName)
 Load a frame from a Zivid data file.
 
ZIVID_CORE_EXPORT std::string toString () const
 Get string representation of the frame.
 
ZIVID_CORE_EXPORT Frame clone () const
 Returns a clone of the frame. The clone will include a copy of all of the point cloud data on the compute device memory. This means that the returned frame will not be affected by subsequent modifications on the original frame or point cloud.
 

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.

◆ clone()

ZIVID_CORE_EXPORT Frame Zivid::Frame::clone ( ) const

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

This function incurs a performance cost due to the copying of the compute device memory. When performance is important we recommend to avoid using this method, and instead modify the existing frame or point cloud.

◆ 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: