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

Interface to one Zivid camera More...

#include <Zivid/Camera.h>

Public Member Functions

ZIVID_CORE_EXPORT Camera ()
 Constructor More...
 
ZIVID_CORE_EXPORT ~Camera ()
 Destructor More...
 
ZIVID_CORE_EXPORT Camera (const Camera &other) noexcept
 Copy constructor More...
 
ZIVID_CORE_EXPORT Cameraoperator= (const Camera &other) noexcept
 Copy assignment More...
 
ZIVID_CORE_EXPORT Camera (Camera &&other) noexcept
 Move constructor More...
 
ZIVID_CORE_EXPORT Cameraoperator= (Camera &&other) noexcept
 Move assignment operator More...
 
ZIVID_CORE_EXPORT Cameraconnect ()
 Connect to the camera More...
 
ZIVID_CORE_EXPORT void disconnect ()
 Disconnect from the camera and free all resources associated with it More...
 
ZIVID_CORE_EXPORT void closeAperture ()
 Close the camera's aperture More...
 
ZIVID_CORE_EXPORT CameraState state () const
 Get the current camera state More...
 
ZIVID_CORE_EXPORT Frame capture (const Settings &settings)
 Capture a single frame More...
 
ZIVID_CORE_EXPORT Frame2D capture (const Settings2D &settings2D)
 Capture a single 2D frame More...
 
ZIVID_CORE_EXPORT CameraInfo info () const
 Get information about camera model, serial number etc. More...
 
ZIVID_CORE_EXPORT void writeUserData (const std::vector< uint8_t > &data)
 Write user data to camera. The total number of writes supported depends on camera model and size of data. More...
 
ZIVID_CORE_EXPORT std::vector< uint8_t > userData () const
 Read user data from camera More...
 
ZIVID_CORE_EXPORT std::string toString () const
 Get string representation of the camera info More...
 
ZIVID_CORE_EXPORT bool operator== (const Camera &other) const
 Check if two camera instances represent the same device More...
 
ZIVID_CORE_EXPORT bool operator!= (const Camera &other) const
 Check if two camera instances represent different devices More...
 

Detailed Description

Interface to one Zivid camera

See Settings and Settings2D for a list of settings that can be configured in the camera. Capture frames by calling capture.

Constructor & Destructor Documentation

◆ Camera() [1/3]

ZIVID_CORE_EXPORT Zivid::Camera::Camera ( )

Constructor

◆ ~Camera()

ZIVID_CORE_EXPORT Zivid::Camera::~Camera ( )

Destructor

◆ Camera() [2/3]

ZIVID_CORE_EXPORT Zivid::Camera::Camera ( const Camera other)
noexcept

Copy constructor

◆ Camera() [3/3]

ZIVID_CORE_EXPORT Zivid::Camera::Camera ( Camera &&  other)
noexcept

Move constructor

Member Function Documentation

◆ capture() [1/2]

ZIVID_CORE_EXPORT Frame Zivid::Camera::capture ( const Settings settings)

Capture a single frame

Parameters
settingsSettings to use for the capture
Returns
A frame containing a 3D point cloud and metadata

This method returns right after the acquisition of the images is complete, and the camera has stopped projecting patterns. Therefore, after this method has returned, the camera can be moved, or objects in the scene can be moved, or a capture from another camera with overlapping field of view can be triggered, without affecting the point cloud.

When this method returns, there may still be remaining data to transfer from the camera to the PC, and the processing of the final point cloud will not be completed yet. Transfer and processing will continue in the background. When you call a method on the returned Frame object that requires the capture to be finished, for example Frame::pointCloud(), the method will block until the point cloud is available. If an exception occurs during capture but after the acquisition was completed (and this method returned), then that exception is instead thrown when you access the Frame object.

capture can be called from multiple threads at the same time. However, all the capture commands will be queued (first in, first out). If several captures are queued, the next capture will not begin until the previous capture has completed all acquisition, transfer and processing.

Note that these remarks apply for both 3D and 2D capture.

◆ capture() [2/2]

ZIVID_CORE_EXPORT Frame2D Zivid::Camera::capture ( const Settings2D settings2D)

Capture a single 2D frame

Parameters
settings2DSettings2D to use for the capture
Returns
A frame containing a 2D image and metadata

This method returns right after the acquisition of the images is complete, and the camera has stopped projecting patterns. For more information, see the remarks section of capture(const Settings &settings) above. Those remarks apply for both 2D and 3D capture.

◆ closeAperture()

ZIVID_CORE_EXPORT void Zivid::Camera::closeAperture ( )

Close the camera's aperture

The aperture will be opened again on the next call to capture.

◆ connect()

ZIVID_CORE_EXPORT Camera & Zivid::Camera::connect ( )

Connect to the camera

◆ disconnect()

ZIVID_CORE_EXPORT void Zivid::Camera::disconnect ( )

Disconnect from the camera and free all resources associated with it

◆ info()

ZIVID_CORE_EXPORT CameraInfo Zivid::Camera::info ( ) const

Get information about camera model, serial number etc.

◆ operator!=()

ZIVID_CORE_EXPORT bool Zivid::Camera::operator!= ( const Camera other) const

Check if two camera instances represent different devices

◆ operator=() [1/2]

ZIVID_CORE_EXPORT Camera & Zivid::Camera::operator= ( Camera &&  other)
noexcept

Move assignment operator

◆ operator=() [2/2]

ZIVID_CORE_EXPORT Camera & Zivid::Camera::operator= ( const Camera other)
noexcept

Copy assignment

◆ operator==()

ZIVID_CORE_EXPORT bool Zivid::Camera::operator== ( const Camera other) const

Check if two camera instances represent the same device

◆ state()

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

Get the current camera state

Returns
The current camera state

◆ toString()

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

Get string representation of the camera info

Returns
Camera info as string

◆ userData()

ZIVID_CORE_EXPORT std::vector< uint8_t > Zivid::Camera::userData ( ) const

Read user data from camera

◆ writeUserData()

ZIVID_CORE_EXPORT void Zivid::Camera::writeUserData ( const std::vector< uint8_t > &  data)

Write user data to camera. The total number of writes supported depends on camera model and size of data.


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