Zivid C++ API 2.18.0+1b44dbef-1
Zivid Namespace Reference

The main Zivid namespace. All Zivid code is found here. More...

Namespaces

namespace  Calibration
namespace  CaptureAssistant
namespace  DataModel
namespace  Detail
namespace  Experimental
namespace  Firmware
 Interface for verifying and configuring firmware.
namespace  Presets
namespace  Projection
namespace  Version
 Get version information for the library.
namespace  Visualization

Classes

class  Application
 Manager class for Zivid. More...
class  Array1D
 One-dimensional container of data. More...
class  Array2D
 Two-dimensional container of data. More...
struct  BoundingBox
 Defines a 2D rectangular bounding box in image coordinates. More...
class  Camera
 Interface to one Zivid camera. More...
class  CameraAddress
 A hostname or IPv4 address identifying a specific Zivid camera for direct connection. More...
class  CameraCalibration
 Camera Calibration data model. More...
class  CameraExtrinsics
 Extrinsic parameters describing the pose of a camera in 3D space, expressed as a rotation quaternion and a translation vector. More...
class  CameraHealth
 Result of running the camera's health checks. Each check has a Status (severity) and a Value (the underlying measurement, when available). The Overall field aggregates the worst severity across all populated checks. More...
class  CameraInfo
 Information about camera model, serial number etc. More...
class  CameraIntrinsics
 Information about the intrinsic parameters of the camera (OpenCV model) More...
class  CameraState
 Information about camera connection state, temperatures, etc. More...
struct  ColorBGR
 Color with 8-bit blue, green and red channels (no alpha) More...
struct  ColorBGR_SRGB
 Color with 8-bit blue, green and red channels (no alpha) in the sRGB color space. More...
struct  ColorBGRA
 Color with 8-bit blue, green, red and alpha channels. More...
struct  ColorBGRA_SRGB
 Color with 8-bit blue, green, red and alpha channels in the sRGB color space. More...
struct  ColorBGRABase
struct  ColorBGRBase
struct  ColorRGB
 Color with 8-bit red, green and blue channels (no alpha) More...
struct  ColorRGB_SRGB
 Color with 8-bit red, green and blue channels (no alpha) in the sRGB color space. More...
struct  ColorRGBA
 Color with 8-bit red, green, blue and alpha channels. More...
struct  ColorRGBABase
struct  ColorRGBAf
 Color with 32-bit red, green, blue and alpha channels. More...
struct  ColorRGBBase
struct  ColorSRGB
 Color with 8-bit red, green, blue and alpha channels in the sRGB color space. More...
class  ComputeDevice
 Contains information about the compute device used by Zivid::Application. More...
struct  CUDAContextPtr
 Wrapper for user-provided CUDA context pointer (CUcontext) More...
struct  CUDADevicePointer
 Wrapper for a CUDA device pointer. More...
struct  CUDAStreamPtr
 Wrapper for user-provided CUDA stream for synchronization. More...
class  DeviceArray
 Reference-counted handle to data on a GPU device. More...
class  DeviceArrayView
 Non-owning view of a device buffer. More...
struct  Disparity
 Disparity value. More...
class  Exception
 A common base class for all Zivid exceptions. More...
class  Frame
 A frame captured by a Zivid camera. More...
class  Frame2D
 A 2D frame captured by a Zivid camera. More...
class  Frame2DStreamStatistics
 Streaming performance statistics for Frame2DGrabber. More...
class  FrameInfo
 Various information for a frame. More...
class  Image
 A 2-dimensional image. More...
class  Mask
 A mask for filtering point cloud data. More...
class  Matrix
 A fixed size matrix in row major order. More...
class  NetworkConfiguration
 Network configuration of a camera. More...
struct  NormalXYZ
 Normal vector with three coordinates as float. More...
struct  OpenCLCommandQueuePtr
 Wrapper for user-provided OpenCL command queue for synchronization. More...
struct  OpenCLContextPtr
 Wrapper for user-provided OpenCL context pointer (cl_context) More...
struct  OpenCLMemPointer
 Wrapper for an OpenCL memory object (cl_mem) More...
class  PointCloud
 Point cloud with x, y, z, RGB color and SNR laid out on a 2D grid. More...
struct  PointXY
 Point with two coordinates as float. More...
struct  PointXYZ
 Point with three coordinates as float. More...
struct  PointXYZColorBGRA
 Struct which contains XYZ point and BGRA color packed together. More...
struct  PointXYZColorBGRA_SRGB
 Struct which contains XYZ point and BGRA color in the sRGB color space packed together. More...
struct  PointXYZColorRGBA
 Struct which contains XYZ point and RGBA color packed together. More...
struct  PointXYZColorRGBA_SRGB
 Struct which contains XYZ point and RGBA color in the sRGB color space packed together. More...
struct  PointXYZW
 Point with four coordinates as float. More...
struct  PointZ
 Point with Z coordinate. More...
class  Range
 Class describing a range of values for a given type T. More...
class  Resolution
 Class describing a resolution with a width and a height. More...
class  SceneConditions
 A description of the ambient conditions detected by the camera. More...
class  Settings
 Settings used when capturing a 3D capture or 2D+3D capture with a Zivid camera. More...
class  Settings2D
 Settings used when capturing 2D images with a Zivid camera. More...
struct  SNR
 Signal-to-Noise ratio (SNR) More...
struct  StreamOrQueue
 A user CUDA stream or OpenCL command queue, selected by which member is populated. More...
class  UnorganizedPointCloud
 Point cloud with x, y, z, RGB color and SNR laid out as a linear list of only valid points. More...
struct  VectorXYZ
 Vector with three coordinates as float. More...

Typedefs

using ColorRGBA_SRGB = ColorSRGB
 Color with 8-bit red, green, blue and alpha channels in the sRGB color space.
using Matrix3x3 = Matrix<float, 3, 3>
 Matrix of size 3x3 containing floats.
using Matrix3x3d = Matrix<double, 3, 3>
 Matrix of size 3x3 containing doubles.
using Matrix4x4 = Matrix<float, 4, 4>
 Matrix of size 4x4 containing floats.
using Matrix4x4d = Matrix<double, 4, 4>
 Matrix of size 4x4 containing doubles.

Enumerations

enum class  ComputeBackend { cuda , opencl }
 GPU compute backend type. More...
enum class  FrameFileType { frame , frame2D }
 The type of frame stored in a .zdf file. More...

Functions

template<typename T>
std::ostream & operator<< (std::ostream &stream, const Array1D< T > &array)
 Serialize array information to a stream.
template<typename T>
Array1D< T >::ConstIterator cbegin (const Array1D< T > &array)
 Iterator to the beginning of the array.
template<typename T>
Array1D< T >::ConstIterator begin (const Array1D< T > &array)
 Iterator to the beginning of the array.
template<typename T>
Array1D< T >::ConstIterator cend (const Array1D< T > &array)
 Iterator to the end of the array.
template<typename T>
Array1D< T >::ConstIterator end (const Array1D< T > &array)
 Iterator to the end of the array.
template<typename T>
std::ostream & operator<< (std::ostream &stream, const Array2D< T > &array)
 Serialize array information to a stream.
template<typename T>
Array2D< T >::ConstIterator cbegin (const Array2D< T > &array)
 Iterator to the beginning of the array.
template<typename T>
Array2D< T >::ConstIterator begin (const Array2D< T > &array)
 Iterator to the beginning of the array.
template<typename T>
Array2D< T >::ConstIterator cend (const Array2D< T > &array)
 Iterator to the end of the array.
template<typename T>
Array2D< T >::ConstIterator end (const Array2D< T > &array)
 Iterator to the end of the array.
ZIVID_UTILS_EXPORT std::ostream & operator<< (std::ostream &stream, const BoundingBox &boundingBox)
 Serialize the value to a stream.
ZIVID_CORE_EXPORT std::ostream & operator<< (std::ostream &stream, const Camera &camera)
 Serialize the value to a stream.
ZIVID_CORE_EXPORT std::ostream & operator<< (std::ostream &os, const CameraAddress &address)
 Append the address to a stream.
template<typename T>
std::ostream & operator<< (std::ostream &stream, const ColorRGBABase< T > &color)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (ColorSRGB, 4)
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (ColorRGBA, 4)
template<typename T>
std::ostream & operator<< (std::ostream &stream, const ColorBGRABase< T > &color)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (ColorBGRA, 4)
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (ColorBGRA_SRGB, 4)
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (ColorRGBAf, 16)
template<typename T>
std::ostream & operator<< (std::ostream &stream, const ColorRGBBase< T > &color)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (ColorRGB, 3)
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (ColorRGB_SRGB, 3)
template<typename T>
std::ostream & operator<< (std::ostream &stream, const ColorBGRBase< T > &color)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (ColorBGR, 3)
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (ColorBGR_SRGB, 3)
ZIVID_CORE_EXPORT std::ostream & operator<< (std::ostream &stream, const ComputeDevice &computeDevice)
 Serialize the value to a stream.
ZIVID_CORE_EXPORT std::string toString (ComputeBackend backend)
 Get string representation of backend type.
ZIVID_CORE_EXPORT std::ostream & operator<< (std::ostream &stream, ComputeBackend backend)
 Serialize backend to stream.
ZIVID_CORE_EXPORT void synchronizeStream (StreamOrQueue streamOrQueue)
 Block the host thread until all work previously enqueued on streamOrQueue has completed.
template<typename ColorFormat, typename = std::enable_if_t<Detail::SupportedImageColorFormat<ColorFormat>::value>>
Image< ColorFormat > toImage (const DeviceArray< ColorFormat > &buffer, StreamOrQueue streamOrQueue)
 Enqueue a device-to-host copy and return as Image without synchronizing.
template<typename ColorFormat, typename = std::enable_if_t<Detail::SupportedImageColorFormat<ColorFormat>::value>>
Image< ColorFormat > toImage (const DeviceArrayView< ColorFormat > &buffer, StreamOrQueue streamOrQueue)
 Enqueue a device-to-host copy and return as Image without synchronizing.
ZIVID_UTILS_EXPORT std::ostream & operator<< (std::ostream &stream, const Zivid::Disparity &disparity)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (Disparity, 4)
ZIVID_UTILS_EXPORT std::string toString (const std::exception &exception)
 Get string representation of the exception.
ZIVID_CORE_EXPORT FrameFileType readFrameFileType (const std::string &fileName)
 Get the type of frame stored in a .zdf file.
ZIVID_UTILS_EXPORT std::ostream & operator<< (std::ostream &stream, const Mask &mask)
 Serialize the mask to a stream.
template<typename T, size_t rowCount, size_t colCount>
std::ostream & operator<< (std::ostream &stream, const Matrix< T, rowCount, colCount > &matrix)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (NormalXYZ, 12)
ZIVID_UTILS_EXPORT std::ostream & operator<< (std::ostream &stream, const PointXYZ &point)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (PointXYZ, 12)
ZIVID_UTILS_EXPORT std::ostream & operator<< (std::ostream &stream, const PointXYZW &point)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (PointXYZW, 16)
ZIVID_UTILS_EXPORT std::ostream & operator<< (std::ostream &stream, const PointZ &point)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (PointZ, 4)
ZIVID_UTILS_EXPORT std::ostream & operator<< (std::ostream &stream, const PointXY &point)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (PointXY, 8)
ZIVID_CORE_EXPORT std::ostream & operator<< (std::ostream &stream, const PointCloud &pointCloud)
 Serialize the value to a stream.
ZIVID_UTILS_EXPORT std::ostream & operator<< (std::ostream &stream, const PointXYZColorRGBA &pc)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (PointXYZColorRGBA, 16)
ZIVID_UTILS_EXPORT std::ostream & operator<< (std::ostream &stream, const PointXYZColorRGBA_SRGB &pc)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (PointXYZColorRGBA_SRGB, 16)
ZIVID_UTILS_EXPORT std::ostream & operator<< (std::ostream &stream, const PointXYZColorBGRA &pc)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (PointXYZColorBGRA, 16)
ZIVID_UTILS_EXPORT std::ostream & operator<< (std::ostream &stream, const PointXYZColorBGRA_SRGB &pc)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (PointXYZColorBGRA_SRGB, 16)
template<typename T>
std::ostream & operator<< (std::ostream &os, const Range< T > &range)
 Append the range to a stream.
ZIVID_UTILS_EXPORT std::ostream & operator<< (std::ostream &os, const Resolution &resolution)
 Append the resolution to a stream.
ZIVID_UTILS_EXPORT std::ostream & operator<< (std::ostream &stream, const Zivid::SNR &snr)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (SNR, 4)
ZIVID_CORE_EXPORT std::ostream & operator<< (std::ostream &stream, const UnorganizedPointCloud &unorganizedPointCloud)
 Serialize the value to a stream.
ZIVID_UTILS_EXPORT std::ostream & operator<< (std::ostream &stream, const VectorXYZ &point)
 Serialize the value to a stream.
 ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE (VectorXYZ, 12)

Detailed Description

The main Zivid namespace. All Zivid code is found here.

Typedef Documentation

◆ ColorRGBA_SRGB

Color with 8-bit red, green, blue and alpha channels in the sRGB color space.

The order of the members is r, g, b, a and each member is represented as an uint8_t. The members have values from 0 to 255.

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.

◆ Matrix3x3

using Zivid::Matrix3x3 = Matrix<float, 3, 3>

Matrix of size 3x3 containing floats.

◆ Matrix3x3d

using Zivid::Matrix3x3d = Matrix<double, 3, 3>

Matrix of size 3x3 containing doubles.

◆ Matrix4x4

using Zivid::Matrix4x4 = Matrix<float, 4, 4>

Matrix of size 4x4 containing floats.

◆ Matrix4x4d

using Zivid::Matrix4x4d = Matrix<double, 4, 4>

Matrix of size 4x4 containing doubles.

Enumeration Type Documentation

◆ ComputeBackend

enum class Zivid::ComputeBackend
strong

GPU compute backend type.

Enumerator
cuda 
opencl 

◆ FrameFileType

enum class Zivid::FrameFileType
strong

The type of frame stored in a .zdf file.

Enumerator
frame 
frame2D 

Function Documentation

◆ begin() [1/2]

template<typename T>
Array1D< T >::ConstIterator Zivid::begin ( const Array1D< T > & array)

Iterator to the beginning of the array.

◆ begin() [2/2]

template<typename T>
Array2D< T >::ConstIterator Zivid::begin ( const Array2D< T > & array)

Iterator to the beginning of the array.

◆ cbegin() [1/2]

template<typename T>
Array1D< T >::ConstIterator Zivid::cbegin ( const Array1D< T > & array)

Iterator to the beginning of the array.

◆ cbegin() [2/2]

template<typename T>
Array2D< T >::ConstIterator Zivid::cbegin ( const Array2D< T > & array)

Iterator to the beginning of the array.

◆ cend() [1/2]

template<typename T>
Array1D< T >::ConstIterator Zivid::cend ( const Array1D< T > & array)

Iterator to the end of the array.

◆ cend() [2/2]

template<typename T>
Array2D< T >::ConstIterator Zivid::cend ( const Array2D< T > & array)

Iterator to the end of the array.

◆ end() [1/2]

template<typename T>
Array1D< T >::ConstIterator Zivid::end ( const Array1D< T > & array)

Iterator to the end of the array.

◆ end() [2/2]

template<typename T>
Array2D< T >::ConstIterator Zivid::end ( const Array2D< T > & array)

Iterator to the end of the array.

◆ operator<<() [1/28]

ZIVID_CORE_EXPORT std::ostream & Zivid::operator<< ( std::ostream & os,
const CameraAddress & address )

Append the address to a stream.

◆ operator<<() [2/28]

template<typename T>
std::ostream & Zivid::operator<< ( std::ostream & os,
const Range< T > & range )

Append the range to a stream.

◆ operator<<() [3/28]

ZIVID_UTILS_EXPORT std::ostream & Zivid::operator<< ( std::ostream & os,
const Resolution & resolution )

Append the resolution to a stream.

◆ operator<<() [4/28]

ZIVID_CORE_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
ComputeBackend backend )

Serialize backend to stream.

◆ operator<<() [5/28]

template<typename T>
std::ostream & Zivid::operator<< ( std::ostream & stream,
const Array1D< T > & array )

Serialize array information to a stream.

◆ operator<<() [6/28]

template<typename T>
std::ostream & Zivid::operator<< ( std::ostream & stream,
const Array2D< T > & array )

Serialize array information to a stream.

◆ operator<<() [7/28]

ZIVID_UTILS_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const BoundingBox & boundingBox )

Serialize the value to a stream.

◆ operator<<() [8/28]

ZIVID_CORE_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const Camera & camera )

Serialize the value to a stream.

◆ operator<<() [9/28]

template<typename T>
std::ostream & Zivid::operator<< ( std::ostream & stream,
const ColorBGRABase< T > & color )

Serialize the value to a stream.

◆ operator<<() [10/28]

template<typename T>
std::ostream & Zivid::operator<< ( std::ostream & stream,
const ColorBGRBase< T > & color )

Serialize the value to a stream.

◆ operator<<() [11/28]

template<typename T>
std::ostream & Zivid::operator<< ( std::ostream & stream,
const ColorRGBABase< T > & color )

Serialize the value to a stream.

◆ operator<<() [12/28]

template<typename T>
std::ostream & Zivid::operator<< ( std::ostream & stream,
const ColorRGBBase< T > & color )

Serialize the value to a stream.

◆ operator<<() [13/28]

ZIVID_CORE_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const ComputeDevice & computeDevice )

Serialize the value to a stream.

◆ operator<<() [14/28]

ZIVID_UTILS_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const Mask & mask )

Serialize the mask to a stream.

◆ operator<<() [15/28]

template<typename T, size_t rowCount, size_t colCount>
std::ostream & Zivid::operator<< ( std::ostream & stream,
const Matrix< T, rowCount, colCount > & matrix )

Serialize the value to a stream.

◆ operator<<() [16/28]

ZIVID_CORE_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const PointCloud & pointCloud )

Serialize the value to a stream.

◆ operator<<() [17/28]

ZIVID_UTILS_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const PointXY & point )

Serialize the value to a stream.

◆ operator<<() [18/28]

ZIVID_UTILS_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const PointXYZ & point )

Serialize the value to a stream.

◆ operator<<() [19/28]

ZIVID_UTILS_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const PointXYZColorBGRA & pc )

Serialize the value to a stream.

◆ operator<<() [20/28]

ZIVID_UTILS_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const PointXYZColorBGRA_SRGB & pc )

Serialize the value to a stream.

◆ operator<<() [21/28]

ZIVID_UTILS_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const PointXYZColorRGBA & pc )

Serialize the value to a stream.

◆ operator<<() [22/28]

ZIVID_UTILS_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const PointXYZColorRGBA_SRGB & pc )

Serialize the value to a stream.

◆ operator<<() [23/28]

ZIVID_UTILS_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const PointXYZW & point )

Serialize the value to a stream.

◆ operator<<() [24/28]

ZIVID_UTILS_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const PointZ & point )

Serialize the value to a stream.

◆ operator<<() [25/28]

ZIVID_CORE_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const UnorganizedPointCloud & unorganizedPointCloud )

Serialize the value to a stream.

◆ operator<<() [26/28]

ZIVID_UTILS_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const VectorXYZ & point )

Serialize the value to a stream.

◆ operator<<() [27/28]

ZIVID_UTILS_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const Zivid::Disparity & disparity )

Serialize the value to a stream.

◆ operator<<() [28/28]

ZIVID_UTILS_EXPORT std::ostream & Zivid::operator<< ( std::ostream & stream,
const Zivid::SNR & snr )

Serialize the value to a stream.

◆ readFrameFileType()

ZIVID_CORE_EXPORT FrameFileType Zivid::readFrameFileType ( const std::string & fileName)

Get the type of frame stored in a .zdf file.

This function reads only the file header and does not load the full frame data.

Parameters
fileNamePath to the .zdf file
Returns
The type of frame stored in the file

◆ synchronizeStream()

ZIVID_CORE_EXPORT void Zivid::synchronizeStream ( StreamOrQueue streamOrQueue)

Block the host thread until all work previously enqueued on streamOrQueue has completed.

Parameters
streamOrQueueThe CUDA stream or OpenCL command queue to synchronize on.

Equivalent to cudaStreamSynchronize on CUDA builds and clFinish on OpenCL builds.

The sync-free host-side accessors on DeviceArray and DeviceArrayView (copyToHost, toArray2D, toArray1D, and the free toImage(buffer, streamOrQueue) overloads) enqueue the device-to-host copy on the provided stream/queue and return immediately. Call synchronizeStream on the same stream/queue before reading the resulting host buffer, Array2D, Array1D, or Image.

For callers who do not want to manage the stream/queue themselves, prefer the parameterless host accessors on Frame2D and PointCloud (e.g. imageRGBA(), copyPointsXYZ()) - those use the SDK's internal stream/queue and synchronize before returning.

◆ toImage() [1/2]

template<typename ColorFormat, typename = std::enable_if_t<Detail::SupportedImageColorFormat<ColorFormat>::value>>
Image< ColorFormat > Zivid::toImage ( const DeviceArray< ColorFormat > & buffer,
StreamOrQueue streamOrQueue )

Enqueue a device-to-host copy and return as Image without synchronizing.

Parameters
bufferDeviceArray to copy from
streamOrQueueThe CUDA stream / OpenCL command queue to enqueue the D2H copy on
Returns
Image whose host memory is NOT safe to read until streamOrQueue is synchronized

Only valid for color formats: ColorRGBA, ColorRGBA_SRGB, ColorBGRA, ColorBGRA_SRGB.

Enqueues the D2H copy on streamOrQueue and returns immediately. The caller must synchronize streamOrQueue (e.g. via Zivid::synchronizeStream) before reading the returned Image's data. For a synchronously-copied Image use the parameterless host accessor on the originating Frame2D (e.g. Frame2D::imageRGBA()) instead.

◆ toImage() [2/2]

template<typename ColorFormat, typename = std::enable_if_t<Detail::SupportedImageColorFormat<ColorFormat>::value>>
Image< ColorFormat > Zivid::toImage ( const DeviceArrayView< ColorFormat > & buffer,
StreamOrQueue streamOrQueue )

Enqueue a device-to-host copy and return as Image without synchronizing.

Parameters
bufferDeviceArrayView to copy from
streamOrQueueThe CUDA stream / OpenCL command queue used when the view was filled
Returns
Image whose host memory is NOT safe to read until streamOrQueue is synchronized

Only valid for color formats: ColorRGBA, ColorRGBA_SRGB, ColorBGRA, ColorBGRA_SRGB.

Enqueues the D2H copy on streamOrQueue and returns immediately. The caller must synchronize streamOrQueue (e.g. via Zivid::synchronizeStream) before reading the returned Image's data. For a synchronously-copied Image use the parameterless host accessor on the originating Frame2D.

◆ toString() [1/2]

ZIVID_CORE_EXPORT std::string Zivid::toString ( ComputeBackend backend)

Get string representation of backend type.

◆ toString() [2/2]

ZIVID_UTILS_EXPORT std::string Zivid::toString ( const std::exception & exception)

Get string representation of the exception.

Returns
The exceptions as a string, potential nested exceptions are included as well

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [1/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( ColorBGR ,
3  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [2/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( ColorBGR_SRGB ,
3  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [3/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( ColorBGRA ,
4  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [4/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( ColorBGRA_SRGB ,
4  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [5/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( ColorRGB ,
3  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [6/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( ColorRGB_SRGB ,
3  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [7/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( ColorRGBA ,
4  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [8/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( ColorRGBAf ,
16  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [9/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( ColorSRGB ,
4  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [10/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( Disparity ,
4  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [11/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( NormalXYZ ,
12  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [12/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( PointXY ,
8  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [13/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( PointXYZ ,
12  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [14/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( PointXYZColorBGRA ,
16  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [15/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( PointXYZColorBGRA_SRGB ,
16  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [16/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( PointXYZColorRGBA ,
16  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [17/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( PointXYZColorRGBA_SRGB ,
16  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [18/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( PointXYZW ,
16  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [19/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( PointZ ,
4  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [20/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( SNR ,
4  )

◆ ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE() [21/21]

Zivid::ZIVID_STATIC_ASSERT_DATA_FORMAT_TYPE ( VectorXYZ ,
12  )