Zivid
1.0.1+3607.8a7510c4
Zivid API
|
Interface to one Zivid camera More...
#include <Camera.h>
Public Types | |
using | FrameCallback = std::function< void(Frame)> |
Callback for frames More... | |
using | StateCallback = std::function< void(CameraState)> |
Callback for state More... | |
Public Member Functions | |
ZIVID_API | Camera () |
Constructor More... | |
ZIVID_API | ~Camera () |
Destructor More... | |
ZIVID_API | Camera (const Camera &other) noexcept |
Copy constructor More... | |
ZIVID_API Camera & | operator= (const Camera &other) noexcept |
Copy assignment More... | |
ZIVID_API | Camera (Camera &&other) noexcept |
Move constructor More... | |
ZIVID_API Camera & | operator= (Camera &&other) noexcept |
Move assignment operator More... | |
ZIVID_API Camera & | connect () |
Connect to the camera More... | |
ZIVID_API Camera & | connect (const Settings &settings) |
Connect to the camera More... | |
ZIVID_API void | disconnect () |
Disconnect from the camera and free all resources associated with it More... | |
ZIVID_API void | setSettings (Settings settings) |
Update the camera settings More... | |
ZIVID_API Settings | settings () const |
Get the current camera settings More... | |
ZIVID_API DeviceCloud | allocateDeviceCloud () |
Allocate a new point cloud on the Compute device More... | |
ZIVID_API CameraState | state () const |
Get the current camera state More... | |
ZIVID_API void | setComputeDevice (ComputeDevice device) |
Connect the camera to a given Compute device More... | |
ZIVID_API void | setFrameCallback (FrameCallback callback) |
Set a callback that is executed every time a new frame is ready More... | |
ZIVID_API void | startLive () |
Start live (continuous) capturing of frames More... | |
ZIVID_API void | stopLive () |
Stop live (continuous) capturing of frames More... | |
ZIVID_API Frame | capture () |
Capture a single frame More... | |
ZIVID_API Frame | capture (DeviceCloud &deviceCloud) |
Capture a single frame using a device cloud that has been previously allocated More... | |
ZIVID_API ComputeDevice | computeDevice () |
Get Compute device More... | |
ZIVID_API std::string | modelName () const |
Get the model name More... | |
ZIVID_API CameraRevision | revision () const |
Get the camera revision More... | |
ZIVID_API SerialNumber | serialNumber () const |
Get the serial number of the Zivid camera More... | |
ZIVID_API std::string | firmwareVersion () const |
Get the camera's firmware version More... | |
ZIVID_API std::string | toString () const |
Get string representation of the camera info More... | |
ZIVID_API bool | operator== (const Camera &other) const |
check if two camera instances represent the same device More... | |
ZIVID_API bool | operator!= (const Camera &other) const |
check if two camera instances represent the different devices More... | |
Interface to one Zivid camera
See Settings for a list of settings that can be configured in the camera. Capture snapshots by calling capture() or start continuous frame recording by using startLive.
using Zivid::Camera::FrameCallback = std::function<void(Frame)> |
Callback for frames
using Zivid::Camera::StateCallback = std::function<void(CameraState)> |
Callback for state
ZIVID_API Zivid::Camera::Camera | ( | ) |
Constructor
ZIVID_API Zivid::Camera::~Camera | ( | ) |
Destructor
|
noexcept |
Copy constructor
|
noexcept |
Move constructor
ZIVID_API DeviceCloud Zivid::Camera::allocateDeviceCloud | ( | ) |
Allocate a new point cloud on the Compute device
Allocates a point cloud on the currently active ComputeDevice with dimensions that matches with the camera resolution.
ZIVID_API Frame Zivid::Camera::capture | ( | ) |
Capture a single frame
ZIVID_API Frame Zivid::Camera::capture | ( | DeviceCloud & | deviceCloud | ) |
Capture a single frame using a device cloud that has been previously allocated
deviceCloud | A pre-allocated device cloud to capture into |
ZIVID_API ComputeDevice Zivid::Camera::computeDevice | ( | ) |
Get Compute device
ZIVID_API Camera& Zivid::Camera::connect | ( | ) |
Connect to the camera
ZIVID_API void Zivid::Camera::disconnect | ( | ) |
Disconnect from the camera and free all resources associated with it
ZIVID_API std::string Zivid::Camera::firmwareVersion | ( | ) | const |
Get the camera's firmware version
ZIVID_API std::string Zivid::Camera::modelName | ( | ) | const |
Get the model name
ZIVID_API bool Zivid::Camera::operator!= | ( | const Camera & | other | ) | const |
check if two camera instances represent the different devices
ZIVID_API bool Zivid::Camera::operator== | ( | const Camera & | other | ) | const |
check if two camera instances represent the same device
ZIVID_API CameraRevision Zivid::Camera::revision | ( | ) | const |
Get the camera revision
ZIVID_API SerialNumber Zivid::Camera::serialNumber | ( | ) | const |
Get the serial number of the Zivid camera
ZIVID_API void Zivid::Camera::setComputeDevice | ( | ComputeDevice | device | ) |
Connect the camera to a given Compute device
The camera will produce point clouds on the supplied Compute device. In order to enable fast visualization of point clouds on the Compute device, a Compute device that supports visualization is typically created by CloudVisualizer.
device | A Compute device |
ZIVID_API void Zivid::Camera::setFrameCallback | ( | FrameCallback | callback | ) |
Set a callback that is executed every time a new frame is ready
See also startLive which triggers live grabbing and executes the supplied callback function for every new frame
callback | New frame callback |
ZIVID_API void Zivid::Camera::setSettings | ( | Settings | settings | ) |
Update the camera settings
settings | New settings for the camera |
ZIVID_API Settings Zivid::Camera::settings | ( | ) | const |
Get the current camera settings
ZIVID_API void Zivid::Camera::startLive | ( | ) |
Start live (continuous) capturing of frames
The system will capture frames continuously until stopped
ZIVID_API CameraState Zivid::Camera::state | ( | ) | const |
Get the current camera state
ZIVID_API void Zivid::Camera::stopLive | ( | ) |
Stop live (continuous) capturing of frames
This call will block until live mode stops
ZIVID_API std::string Zivid::Camera::toString | ( | ) | const |
Get string representation of the camera info