Settings2D

Capture settings for the 2D-only pipeline.

class Settings2D

Settings used when capturing 2D images with a Zivid camera.

Public Functions

Settings2D()

Default constructor.

explicit Settings2D(const std::string &fileName)

Construct Settings2D by loading from file.

std::string serialize() const

Serialize to a string.

See also fromSerialized. The returned string is formatted in YAML, and is compatible with the contents of files saved using save.

template<typename ...Args>
inline explicit Settings2D(Args&&... args)

Constructor taking variadic number of arguments.

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing Settings2D then invoking set(args).

The provided arguments must be descendants of Settings2D. These types can be provided:

template<typename ...Args>
inline void set(Args&&... args)

Set multiple arguments.

The method invokes set(arg) with each of the provided arguments.

The provided arguments must be descendants of Settings2D. These types can be provided:

template<typename ...Args>
inline Settings2D copyWith(Args&&... args) const

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this Settings2D object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of Settings2D. These types can be provided:

inline const Acquisitions &acquisitions() const

Get Acquisitions.

inline Acquisitions &acquisitions()

Get Acquisitions.

inline Settings2D &set(const Acquisitions &value)

Set Acquisitions.

inline const Diagnostics &diagnostics() const

Get Diagnostics.

inline Diagnostics &diagnostics()

Get Diagnostics.

inline Settings2D &set(const Diagnostics &value)

Set Diagnostics.

inline Settings2D &set(const Diagnostics::Enabled &value)

Set Diagnostics::Enabled.

inline const Processing &processing() const

Get Processing.

inline Processing &processing()

Get Processing.

inline Settings2D &set(const Processing &value)

Set Processing.

inline Settings2D &set(const Processing::Color &value)

Set Processing::Color.

inline Settings2D &set(const Processing::Color::Balance &value)

Set Processing::Color::Balance.

inline Settings2D &set(const Processing::Color::Balance::Blue &value)

Set Processing::Color::Balance::Blue.

inline Settings2D &set(const Processing::Color::Balance::Green &value)

Set Processing::Color::Balance::Green.

inline Settings2D &set(const Processing::Color::Balance::Red &value)

Set Processing::Color::Balance::Red.

inline Settings2D &set(const Processing::Color::Experimental &value)

Set Processing::Color::Experimental.

inline Settings2D &set(const Processing::Color::Experimental::Mode &value)

Set Processing::Color::Experimental::Mode.

inline Settings2D &set(const Processing::Color::Gamma &value)

Set Processing::Color::Gamma.

inline const Sampling &sampling() const

Get Sampling.

inline Sampling &sampling()

Get Sampling.

inline Settings2D &set(const Sampling &value)

Set Sampling.

inline Settings2D &set(const Sampling::Color &value)

Set Sampling::Color.

inline Settings2D &set(const Sampling::Interval &value)

Set Sampling::Interval.

inline Settings2D &set(const Sampling::Interval::Duration &value)

Set Sampling::Interval::Duration.

inline Settings2D &set(const Sampling::Interval::Enabled &value)

Set Sampling::Interval::Enabled.

inline Settings2D &set(const Sampling::Pixel &value)

Set Sampling::Pixel.

template<typename F>
inline void forEach(const F &f) const

Run the given function on each direct member with the value of the member as parameter.

template<typename F>
inline void forEach(const F &f)

Run the given function on each direct member with the value of the member as parameter.

bool operator==(const Settings2D &other) const

Equality operator.

bool operator!=(const Settings2D &other) const

Inequality operator.

std::string toString() const

Get the value as string.

void save(const std::string &fileName) const

Save to the given file.

void load(const std::string &fileName)

Load from the given file.

Public Static Functions

static Settings2D fromSerialized(const std::string &value)

Construct a new Settings2D instance from a previously serialized string.

See also serialize.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group

The type of this node.

static constexpr const char *path = {""}

The full path for this value.

static constexpr const char *name = {"Settings2D"}

The name of this value.

static constexpr const char * description  {R"description(Settingsused when capturing 2D images with a Zivid camera.)description"}

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Settings2D &value)

Operator to send the value as string to a stream.

class Acquisition

Settings for one 2D acquisition.

When capturing 2D HDR, all 2D acquisitions must have the same Aperture setting. Use Exposure Time or Gain to control the exposure instead.

Public Functions

Acquisition()

Default constructor.

template<typename ...Args>
inline explicit Acquisition(Args&&... args)

Constructor taking variadic number of arguments.

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing Acquisition then invoking set(args).

The provided arguments must be descendants of Acquisition. These types can be provided:

template<typename ...Args>
inline void set(Args&&... args)

Set multiple arguments.

The method invokes set(arg) with each of the provided arguments.

The provided arguments must be descendants of Acquisition. These types can be provided:

template<typename ...Args>
inline Acquisition copyWith(Args&&... args) const

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this Acquisition object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of Acquisition. These types can be provided:

inline const Aperture &aperture() const

Get Aperture.

inline Aperture &aperture()

Get Aperture.

inline Acquisition &set(const Aperture &value)

Set Aperture.

inline const Brightness &brightness() const

Get Brightness.

inline Brightness &brightness()

Get Brightness.

inline Acquisition &set(const Brightness &value)

Set Brightness.

inline const ExposureTime &exposureTime() const

Get ExposureTime.

inline ExposureTime &exposureTime()

Get ExposureTime.

inline Acquisition &set(const ExposureTime &value)

Set ExposureTime.

inline const Gain &gain() const

Get Gain.

inline Gain &gain()

Get Gain.

inline Acquisition &set(const Gain &value)

Set Gain.

template<typename F>
inline void forEach(const F &f) const

Run the given function on each direct member with the value of the member as parameter.

template<typename F>
inline void forEach(const F &f)

Run the given function on each direct member with the value of the member as parameter.

bool operator==(const Acquisition &other) const

Equality operator.

bool operator!=(const Acquisition &other) const

Inequality operator.

std::string toString() const

Get the value as string.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group

The type of this node.

static constexpr const char *path = {"Acquisition"}

The full path for this value.

static constexpr const char *name = {"Acquisition"}

The name of this value.

static constexpr const char * description   = { R"description(Settingsfor one 2D acquisition.When capturing 2D HDR, all 2Dacquisitions must have the same Aperturesetting. Use Exposure TimeorGainto control the exposure instead.)description" }

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Acquisition &value)

Operator to send the value as string to a stream.

class Aperture

Aperture setting for the camera.

Specified as an f-number (the ratio of lens focal length to the effective aperture diameter).

When capturing 2D HDR, all 2D acquisitions must have the same Aperture setting. Use Exposure Time or Gain to control the exposure instead.

Public Types

using ValueType = double

The type of the underlying value.

Public Functions

Aperture() = default

Default constructor.

inline explicit constexpr Aperture(double value)

Constructor.

double value() const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

bool hasValue() const

Check if the value is set.

void reset()

Reset the node to unset state.

std::string toString() const

Get the value as string.

inline bool operator==(const Aperture &other) const

Comparison operator.

inline bool operator!=(const Aperture &other) const

Comparison operator.

inline bool operator<(const Aperture &other) const

Comparison operator.

inline bool operator>(const Aperture &other) const

Comparison operator.

inline bool operator<=(const Aperture &other) const

Comparison operator.

inline bool operator>=(const Aperture &other) const

Comparison operator.

Public Static Functions

static inline constexpr Range<double> validRange()

The range of valid values for Aperture.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue

The type of this node.

static constexpr const char *path = {"Acquisition/Aperture"}

The full path for this value.

static constexpr const char *name = {"Aperture"}

The name of this value.

static constexpr const char * description  {R"description(Aperturesetting for the camera. Specified as an f-number (the ratio of lens focal length tothe effectiveaperturediameter).When capturing 2D HDR, all 2Dacquisitions must have the same Aperturesetting. Use Exposure TimeorGainto control the exposure instead.)description"}

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Aperture &value)

Operator to serialize the value to a stream.

class Brightness

Brightness controls the light output from the projector.

Brightness above 1.0 may be needed when the distance between the camera and the scene is large, or in case of high levels of ambient lighting.

When brightness is above 1.0 the duty cycle of the camera (the percentage of time the camera can capture) will be reduced. The duty cycle in boost mode is 50%. The duty cycle is calculated over a 10 second period. This limitation is enforced automatically by the camera. Calling capture when the duty cycle limit has been reached will cause the camera to first wait (sleep) for a duration of time to cool down, before capture will start.

Public Types

using ValueType = double

The type of the underlying value.

Public Functions

Brightness() = default

Default constructor.

inline explicit constexpr Brightness(double value)

Constructor.

double value() const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

bool hasValue() const

Check if the value is set.

void reset()

Reset the node to unset state.

std::string toString() const

Get the value as string.

inline bool operator==(const Brightness &other) const

Comparison operator.

inline bool operator!=(const Brightness &other) const

Comparison operator.

inline bool operator<(const Brightness &other) const

Comparison operator.

inline bool operator>(const Brightness &other) const

Comparison operator.

inline bool operator<=(const Brightness &other) const

Comparison operator.

inline bool operator>=(const Brightness &other) const

Comparison operator.

Public Static Functions

static inline constexpr Range<double> validRange()

The range of valid values for Brightness.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue

The type of this node.

static constexpr const char *path = {"Acquisition/Brightness"}

The full path for this value.

static constexpr const char *name = {"Brightness"}

The name of this value.

static constexpr const char * description  {R"description(Brightness controls the light output from the projector.  Brightnessabove 1.0 may be needed when the distance between the camera and the scene is large,or in case of high levels of ambient lighting.Whenbrightnessis above 1.0 the duty cycle of the camera (the percentage of time the cameracan capture) will be reduced. The duty cycle in boost mode is 50%. The duty cycle is calculatedover a 10 second period. This limitation is enforced automatically by the camera. Calling capturewhen the duty cycle limit has been reached will cause the camera to first wait (sleep) for aduration of time to cool down, before capture will start.)description"}

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Brightness &value)

Operator to serialize the value to a stream.

class ExposureTime

Exposure time for the image.

Public Types

using ValueType = std::chrono::microseconds

The type of the underlying value.

Public Functions

ExposureTime() = default

Default constructor.

inline explicit constexpr ExposureTime(std::chrono::microseconds value)

Constructor.

std::chrono::microseconds value() const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

bool hasValue() const

Check if the value is set.

void reset()

Reset the node to unset state.

std::string toString() const

Get the value as string.

inline bool operator==(const ExposureTime &other) const

Comparison operator.

inline bool operator!=(const ExposureTime &other) const

Comparison operator.

inline bool operator<(const ExposureTime &other) const

Comparison operator.

inline bool operator>(const ExposureTime &other) const

Comparison operator.

inline bool operator<=(const ExposureTime &other) const

Comparison operator.

inline bool operator>=(const ExposureTime &other) const

Comparison operator.

Public Static Functions

static inline constexpr Range<std::chrono::microseconds> validRange()

The range of valid values for ExposureTime.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue

The type of this node.

static constexpr const char *path = {"Acquisition/ExposureTime"}

The full path for this value.

static constexpr const char *name = {"ExposureTime"}

The name of this value.

static constexpr const char * description   = { R"description(Exposure time for the image.)description" }

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const ExposureTime &value)

Operator to serialize the value to a stream.

class Gain

Analog gain in the camera.

Public Types

using ValueType = double

The type of the underlying value.

Public Functions

Gain() = default

Default constructor.

inline explicit constexpr Gain(double value)

Constructor.

double value() const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

bool hasValue() const

Check if the value is set.

void reset()

Reset the node to unset state.

std::string toString() const

Get the value as string.

inline bool operator==(const Gain &other) const

Comparison operator.

inline bool operator!=(const Gain &other) const

Comparison operator.

inline bool operator<(const Gain &other) const

Comparison operator.

inline bool operator>(const Gain &other) const

Comparison operator.

inline bool operator<=(const Gain &other) const

Comparison operator.

inline bool operator>=(const Gain &other) const

Comparison operator.

Public Static Functions

static inline constexpr Range<double> validRange()

The range of valid values for Gain.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue

The type of this node.

static constexpr const char *path = {"Acquisition/Gain"}

The full path for this value.

static constexpr const char *name = {"Gain"}

The name of this value.

static constexpr const char * description   = { R"description(Analog gain in the camera.)description" }

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Gain &value)

Operator to serialize the value to a stream.

class Acquisitions

List of acquisitions used for 2D capture.

Public Types

using ValueType = std::vector<Settings2D::Acquisition>

The type of the underlying value.

using Iterator = std::vector<Settings2D::Acquisition>::iterator

Iterator type for Acquisitions.

using ConstIterator = std::vector<Settings2D::Acquisition>::const_iterator

Constant iterator type for Acquisitions.

Public Functions

Acquisitions() = default

Default constructor.

inline explicit Acquisitions(std::vector<Settings2D::Acquisition> value)

Constructor.

inline explicit Acquisitions(std::initializer_list<Settings2D::Acquisition> value)

Constructor.

const std::vector<Settings2D::Acquisition> &value() const

Get the value.

std::string toString() const

Get the value as string.

std::size_t size() const noexcept

Get the size of the list.

bool isEmpty() const noexcept

Check if the list is empty.

template<typename ...Args>
inline void emplaceBack(Args&&... args)

Appends a new element to the end of the list.

The new element is constructed in-place. The provided arguments Args are forwarded to the constructor of Settings2D::Acquisition. Invoking this method may invalidate all references to elements in the list.

Settings2D::Acquisition &at(std::size_t pos)

Returns a reference to the element at position pos in the list.

This function checks that pos is within the bounds (from 0 to size - 1). If pos is not within bounds an exception is thrown.

const Settings2D::Acquisition &at(std::size_t pos) const

Returns a const reference to the element at position pos in the list.

This function checks that pos is within the bounds (from 0 to size - 1). If pos is not within bounds an exception is thrown.

Settings2D::Acquisition &operator[](std::size_t pos)

Returns a reference to the element at position pos in the list.

pos must be within the bounds (from 0 to size - 1). No bounds checking is performed. at(size_t) will check the bounds and throw an exception if pos it out of bounds.

const Settings2D::Acquisition &operator[](std::size_t pos) const

Returns a const reference to the element at position pos in the list.

pos must be within the bounds (from 0 to size - 1). No bounds checking is performed. at(size_t) const will check the bounds and throw an exception if pos it out of bounds.

template<typename F>
inline void forEach(const F &f)

Run the given function on each element in the list.

template<typename F>
inline void forEach(const F &f) const

Run the given function on each element in the list.

Iterator begin() noexcept

Returns an iterator to the first element of the list.

Iterator end() noexcept

Returns an iterator to the element following the last element of the list.

ConstIterator begin() const noexcept

Returns a constant iterator to the first element of the list.

ConstIterator end() const noexcept

Returns a constant iterator to the element following the last element of the list.

ConstIterator cbegin() const noexcept

Returns a constant iterator to the first element of the list.

ConstIterator cend() const noexcept

Returns a constant iterator to the element following the last element of the list.

inline bool operator==(const Acquisitions &other) const

Comparison operator.

inline bool operator!=(const Acquisitions &other) const

Comparison operator.

Public Static Functions

static inline constexpr Range<ValueType::size_type> validSize()

The valid sizes for Acquisitions.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafDataModelList

The type of this node.

static constexpr const char *path = {"Acquisitions"}

The full path for this value.

static constexpr const char *name = {"Acquisitions"}

The name of this value.

static constexpr const char * description  {R"description(List ofacquisitionsused for 2D capture.)description"}

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Acquisitions &value)

Operator to serialize the value to a stream.

class Diagnostics

When Diagnostics is enabled, additional diagnostic data is recorded during capture and included when saving the frame to a .zdf file.

This enables Zivid’s Customer Success team to provide better assistance and more thorough troubleshooting.

Enabling Diagnostics increases the capture time and the RAM usage. It will also increase the size of the .zdf file. It is recommended to enable Diagnostics only when reporting issues to Zivid’s support team.

Public Functions

Diagnostics()

Default constructor.

template<typename ...Args>
inline explicit Diagnostics(Args&&... args)

Constructor taking variadic number of arguments.

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing Diagnostics then invoking set(args).

The provided arguments must be descendants of Diagnostics. These types can be provided:

template<typename ...Args>
inline void set(Args&&... args)

Set multiple arguments.

The method invokes set(arg) with each of the provided arguments.

The provided arguments must be descendants of Diagnostics. These types can be provided:

template<typename ...Args>
inline Diagnostics copyWith(Args&&... args) const

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this Diagnostics object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of Diagnostics. These types can be provided:

inline const Enabled &isEnabled() const

Get Enabled.

inline Enabled &isEnabled()

Get Enabled.

inline Diagnostics &set(const Enabled &value)

Set Enabled.

template<typename F>
inline void forEach(const F &f) const

Run the given function on each direct member with the value of the member as parameter.

template<typename F>
inline void forEach(const F &f)

Run the given function on each direct member with the value of the member as parameter.

bool operator==(const Diagnostics &other) const

Equality operator.

bool operator!=(const Diagnostics &other) const

Inequality operator.

std::string toString() const

Get the value as string.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group

The type of this node.

static constexpr const char *path = {"Diagnostics"}

The full path for this value.

static constexpr const char *name = {"Diagnostics"}

The name of this value.

static constexpr const char * description  {R"description(WhenDiagnosticsis enabled, additional diagnostic data is recorded during capture and included when savingtheframeto a .zdf file. This enables Zivid's Customer Success team to provide better assistance and morethorough troubleshooting.EnablingDiagnosticsincreases the capture time and the RAM usage. It will also increase the size of the.zdf file. It is recommended to enableDiagnosticsonly when reporting issues to Zivid's support team.)description"}

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Diagnostics &value)

Operator to send the value as string to a stream.

class Enabled

Enable or disable diagnostics.

Public Types

using ValueType = bool

The type of the underlying value.

Public Functions

Enabled() = default

Default constructor.

inline explicit constexpr Enabled(bool value)

Constructor.

bool value() const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

bool hasValue() const

Check if the value is set.

void reset()

Reset the node to unset state.

std::string toString() const

Get the value as string.

inline bool operator==(const Enabled &other) const

Comparison operator.

inline bool operator!=(const Enabled &other) const

Comparison operator.

Public Static Functions

static inline std::set<bool> validValues()

All valid values of Enabled.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue

The type of this node.

static constexpr const char *path = {"Diagnostics/Enabled"}

The full path for this value.

static constexpr const char *name = {"Enabled"}

The name of this value.

static constexpr const char * description   = { R"description(Enable or disable diagnostics.)description" }

The description for this value.

static const Enabled yes

On/enabled.

static const Enabled no

Off/disabled.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)

Operator to serialize the value to a stream.

class Processing

2D processing settings.

Public Functions

Processing()

Default constructor.

template<typename ...Args>
inline explicit Processing(Args&&... args)

Constructor taking variadic number of arguments.

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing Processing then invoking set(args).

The provided arguments must be descendants of Processing. These types can be provided:

template<typename ...Args>
inline void set(Args&&... args)

Set multiple arguments.

The method invokes set(arg) with each of the provided arguments.

The provided arguments must be descendants of Processing. These types can be provided:

template<typename ...Args>
inline Processing copyWith(Args&&... args) const

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this Processing object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of Processing. These types can be provided:

inline const Color &color() const

Get Color.

inline Color &color()

Get Color.

inline Processing &set(const Color &value)

Set Color.

inline Processing &set(const Color::Balance &value)

Set Color::Balance.

inline Processing &set(const Color::Balance::Blue &value)

Set Color::Balance::Blue.

inline Processing &set(const Color::Balance::Green &value)

Set Color::Balance::Green.

inline Processing &set(const Color::Balance::Red &value)

Set Color::Balance::Red.

inline Processing &set(const Color::Experimental &value)

Set Color::Experimental.

inline Processing &set(const Color::Experimental::Mode &value)

Set Color::Experimental::Mode.

inline Processing &set(const Color::Gamma &value)

Set Color::Gamma.

template<typename F>
inline void forEach(const F &f) const

Run the given function on each direct member with the value of the member as parameter.

template<typename F>
inline void forEach(const F &f)

Run the given function on each direct member with the value of the member as parameter.

bool operator==(const Processing &other) const

Equality operator.

bool operator!=(const Processing &other) const

Inequality operator.

std::string toString() const

Get the value as string.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group

The type of this node.

static constexpr const char *path = {"Processing"}

The full path for this value.

static constexpr const char *name = {"Processing"}

The name of this value.

static constexpr const char * description   = { R"description(2D processing settings.)description" }

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Processing &value)

Operator to send the value as string to a stream.

class Color

Color settings.

Public Functions

Color()

Default constructor.

template<typename ...Args>
inline explicit Color(Args&&... args)

Constructor taking variadic number of arguments.

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing Color then invoking set(args).

The provided arguments must be descendants of Color. These types can be provided:

template<typename ...Args>
inline void set(Args&&... args)

Set multiple arguments.

The method invokes set(arg) with each of the provided arguments.

The provided arguments must be descendants of Color. These types can be provided:

template<typename ...Args>
inline Color copyWith(Args&&... args) const

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this Color object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of Color. These types can be provided:

inline const Balance &balance() const

Get Balance.

inline Balance &balance()

Get Balance.

inline Color &set(const Balance &value)

Set Balance.

inline Color &set(const Balance::Blue &value)

Set Balance::Blue.

inline Color &set(const Balance::Green &value)

Set Balance::Green.

inline Color &set(const Balance::Red &value)

Set Balance::Red.

inline const Experimental &experimental() const

Get Experimental.

inline Experimental &experimental()

Get Experimental.

inline Color &set(const Experimental &value)

Set Experimental.

inline Color &set(const Experimental::Mode &value)

Set Experimental::Mode.

inline const Gamma &gamma() const

Get Gamma.

inline Gamma &gamma()

Get Gamma.

inline Color &set(const Gamma &value)

Set Gamma.

template<typename F>
inline void forEach(const F &f) const

Run the given function on each direct member with the value of the member as parameter.

template<typename F>
inline void forEach(const F &f)

Run the given function on each direct member with the value of the member as parameter.

bool operator==(const Color &other) const

Equality operator.

bool operator!=(const Color &other) const

Inequality operator.

std::string toString() const

Get the value as string.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group

The type of this node.

static constexpr const char *path = {"Processing/Color"}

The full path for this value.

static constexpr const char *name = {"Color"}

The name of this value.

static constexpr const char * description   = { R"description(Color settings.)description" }

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Color &value)

Operator to send the value as string to a stream.

class Balance

Color balance settings.

Public Functions

Balance()

Default constructor.

template<typename ...Args>
inline explicit Balance(Args&&... args)

Constructor taking variadic number of arguments.

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing Balance then invoking set(args).

The provided arguments must be descendants of Balance. These types can be provided:

template<typename ...Args>
inline void set(Args&&... args)

Set multiple arguments.

The method invokes set(arg) with each of the provided arguments.

The provided arguments must be descendants of Balance. These types can be provided:

template<typename ...Args>
inline Balance copyWith(Args&&... args) const

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this Balance object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of Balance. These types can be provided:

inline const Blue &blue() const

Get Blue.

inline Blue &blue()

Get Blue.

inline Balance &set(const Blue &value)

Set Blue.

inline const Green &green() const

Get Green.

inline Green &green()

Get Green.

inline Balance &set(const Green &value)

Set Green.

inline const Red &red() const

Get Red.

inline Red &red()

Get Red.

inline Balance &set(const Red &value)

Set Red.

template<typename F>
inline void forEach(const F &f) const

Run the given function on each direct member with the value of the member as parameter.

template<typename F>
inline void forEach(const F &f)

Run the given function on each direct member with the value of the member as parameter.

bool operator==(const Balance &other) const

Equality operator.

bool operator!=(const Balance &other) const

Inequality operator.

std::string toString() const

Get the value as string.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group

The type of this node.

static constexpr const char *path = {"Processing/Color/Balance"}

The full path for this value.

static constexpr const char *name = {"Balance"}

The name of this value.

static constexpr const char * description   = { R"description(Color balance settings.)description" }

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Balance &value)

Operator to send the value as string to a stream.

class Blue

Digital gain applied to blue channel.

Public Types

using ValueType = double

The type of the underlying value.

Public Functions

Blue() = default

Default constructor.

inline explicit constexpr Blue(double value)

Constructor.

double value() const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

bool hasValue() const

Check if the value is set.

void reset()

Reset the node to unset state.

std::string toString() const

Get the value as string.

inline bool operator==(const Blue &other) const

Comparison operator.

inline bool operator!=(const Blue &other) const

Comparison operator.

inline bool operator<(const Blue &other) const

Comparison operator.

inline bool operator>(const Blue &other) const

Comparison operator.

inline bool operator<=(const Blue &other) const

Comparison operator.

inline bool operator>=(const Blue &other) const

Comparison operator.

Public Static Functions

static inline constexpr Range<double> validRange()

The range of valid values for Blue.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue

The type of this node.

static constexpr const char *path = {"Processing/Color/Balance/Blue"}

The full path for this value.

static constexpr const char *name = {"Blue"}

The name of this value.

static constexpr const char * description  {R"description(Digital gain applied tobluechannel.)description"}

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Blue &value)

Operator to serialize the value to a stream.

class Green

Digital gain applied to green channel.

Public Types

using ValueType = double

The type of the underlying value.

Public Functions

Green() = default

Default constructor.

inline explicit constexpr Green(double value)

Constructor.

double value() const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

bool hasValue() const

Check if the value is set.

void reset()

Reset the node to unset state.

std::string toString() const

Get the value as string.

inline bool operator==(const Green &other) const

Comparison operator.

inline bool operator!=(const Green &other) const

Comparison operator.

inline bool operator<(const Green &other) const

Comparison operator.

inline bool operator>(const Green &other) const

Comparison operator.

inline bool operator<=(const Green &other) const

Comparison operator.

inline bool operator>=(const Green &other) const

Comparison operator.

Public Static Functions

static inline constexpr Range<double> validRange()

The range of valid values for Green.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue

The type of this node.

static constexpr const char *path = {"Processing/Color/Balance/Green"}

The full path for this value.

static constexpr const char *name = {"Green"}

The name of this value.

static constexpr const char * description  {R"description(Digital gain applied togreenchannel.)description"}

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Green &value)

Operator to serialize the value to a stream.

class Red

Digital gain applied to red channel.

Public Types

using ValueType = double

The type of the underlying value.

Public Functions

Red() = default

Default constructor.

inline explicit constexpr Red(double value)

Constructor.

double value() const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

bool hasValue() const

Check if the value is set.

void reset()

Reset the node to unset state.

std::string toString() const

Get the value as string.

inline bool operator==(const Red &other) const

Comparison operator.

inline bool operator!=(const Red &other) const

Comparison operator.

inline bool operator<(const Red &other) const

Comparison operator.

inline bool operator>(const Red &other) const

Comparison operator.

inline bool operator<=(const Red &other) const

Comparison operator.

inline bool operator>=(const Red &other) const

Comparison operator.

Public Static Functions

static inline constexpr Range<double> validRange()

The range of valid values for Red.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue

The type of this node.

static constexpr const char *path = {"Processing/Color/Balance/Red"}

The full path for this value.

static constexpr const char *name = {"Red"}

The name of this value.

static constexpr const char * description  {R"description(Digital gain applied toredchannel.)description"}

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Red &value)

Operator to serialize the value to a stream.

class Experimental

Experimental color settings. These may be renamed, moved or deleted in the future.

Public Functions

Experimental()

Default constructor.

template<typename ...Args>
inline explicit Experimental(Args&&... args)

Constructor taking variadic number of arguments.

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing Experimental then invoking set(args).

The provided arguments must be descendants of Experimental. These types can be provided:

template<typename ...Args>
inline void set(Args&&... args)

Set multiple arguments.

The method invokes set(arg) with each of the provided arguments.

The provided arguments must be descendants of Experimental. These types can be provided:

template<typename ...Args>
inline Experimental copyWith(Args&&... args) const

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this Experimental object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of Experimental. These types can be provided:

inline const Mode &mode() const

Get Mode.

inline Mode &mode()

Get Mode.

inline Experimental &set(const Mode &value)

Set Mode.

template<typename F>
inline void forEach(const F &f) const

Run the given function on each direct member with the value of the member as parameter.

template<typename F>
inline void forEach(const F &f)

Run the given function on each direct member with the value of the member as parameter.

bool operator==(const Experimental &other) const

Equality operator.

bool operator!=(const Experimental &other) const

Inequality operator.

std::string toString() const

Get the value as string.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group

The type of this node.

static constexpr const char *path = {"Processing/Color/Experimental"}

The full path for this value.

static constexpr const char *name = {"Experimental"}

The name of this value.

static constexpr const char * description  {R"description(Experimental colorsettings. These may be renamed, moved or deleted in the future.)description"}

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)

Operator to send the value as string to a stream.

class Mode

This setting controls how the color image is computed.

automatic is the default option. It performs tone mapping for HDR captures, but not for single-acquisition captures. Use this mode with a single acquisition if you want to have the most control over the colors in the image.

toneMapping uses all the acquisitions to create one merged and normalized color image. For HDR captures the dynamic range of the captured images is usually higher than the 8-bit color image range. toneMapping will map the HDR color data to the 8-bit color output range by applying a scaling factor. toneMapping can also be used for single-acquisition captures to normalize the captured color image to the full 8-bit output. Note that when using toneMapping mode the color values can be inconsistent over repeated captures if you move, add or remove objects in the scene. For the most control over the colors in the single-acquisition case, select the automatic mode.

Public Types

enum class ValueType

The type of the underlying value.

Values:

enumerator automatic
enumerator toneMapping

Public Functions

Mode() = default

Default constructor.

inline explicit constexpr Mode(ValueType value)

Constructor.

ValueType value() const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

bool hasValue() const

Check if the value is set.

void reset()

Reset the node to unset state.

std::string toString() const

Get the value as string.

inline bool operator==(const Mode &other) const

Comparison operator.

inline bool operator!=(const Mode &other) const

Comparison operator.

Public Static Functions

static inline std::set<ValueType> validValues()

All valid values of Mode.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue

The type of this node.

static constexpr const char *path = {"Processing/Color/Experimental/Mode"}

The full path for this value.

static constexpr const char *name = {"Mode"}

The name of this value.

static constexpr const char * description  {R"description(This setting controls how thecolorimage is computed.`automatic` is the default option. It performs tone mapping for HDR captures, but not forsingle-acquisition captures. Use thismodewith a single acquisition if you want to havethe most control over the colors in the image.`toneMapping` uses all the acquisitions to create one merged and normalized colorimage. ForHDR captures the dynamic range of the captured images is usually higher than the 8-bitcolor image range. `toneMapping` will map the HDR color data to the 8-bit coloroutput range byapplying a scaling factor. `toneMapping` can also be used for single-acquisition captures tonormalize the capturedcolor image to the full 8-bit output. Note that when using `toneMapping` mode the colorvalues can be inconsistent over repeated captures if you move, add or removeobjects in the scene. For the most control over the colors in the single-acquisition case,select the `automatic` mode.)description"}

The description for this value.

static const Mode automatic

automatic

static const Mode toneMapping

toneMapping

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)

Operator to serialize ValueType to a stream.

inline friend std::ostream &operator<<(std::ostream &stream, const Mode &value)

Operator to serialize the value to a stream.

class Gamma

Gamma applied to the color values.

Gamma less than 1 makes the colors brighter, while gamma greater than 1 makes the colors darker.

Public Types

using ValueType = double

The type of the underlying value.

Public Functions

Gamma() = default

Default constructor.

inline explicit constexpr Gamma(double value)

Constructor.

double value() const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

bool hasValue() const

Check if the value is set.

void reset()

Reset the node to unset state.

std::string toString() const

Get the value as string.

inline bool operator==(const Gamma &other) const

Comparison operator.

inline bool operator!=(const Gamma &other) const

Comparison operator.

inline bool operator<(const Gamma &other) const

Comparison operator.

inline bool operator>(const Gamma &other) const

Comparison operator.

inline bool operator<=(const Gamma &other) const

Comparison operator.

inline bool operator>=(const Gamma &other) const

Comparison operator.

Public Static Functions

static inline constexpr Range<double> validRange()

The range of valid values for Gamma.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue

The type of this node.

static constexpr const char *path = {"Processing/Color/Gamma"}

The full path for this value.

static constexpr const char *name = {"Gamma"}

The name of this value.

static constexpr const char * description  {R"description(Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gammagreater than 1 makes the colors darker.)description"}

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Gamma &value)

Operator to serialize the value to a stream.

class Sampling

Sampling settings.

Public Functions

Sampling()

Default constructor.

template<typename ...Args>
inline explicit Sampling(Args&&... args)

Constructor taking variadic number of arguments.

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing Sampling then invoking set(args).

The provided arguments must be descendants of Sampling. These types can be provided:

template<typename ...Args>
inline void set(Args&&... args)

Set multiple arguments.

The method invokes set(arg) with each of the provided arguments.

The provided arguments must be descendants of Sampling. These types can be provided:

template<typename ...Args>
inline Sampling copyWith(Args&&... args) const

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this Sampling object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of Sampling. These types can be provided:

inline const Color &color() const

Get Color.

inline Color &color()

Get Color.

inline Sampling &set(const Color &value)

Set Color.

inline const Interval &interval() const

Get Interval.

inline Interval &interval()

Get Interval.

inline Sampling &set(const Interval &value)

Set Interval.

inline Sampling &set(const Interval::Duration &value)

Set Interval::Duration.

inline Sampling &set(const Interval::Enabled &value)

Set Interval::Enabled.

inline const Pixel &pixel() const

Get Pixel.

inline Pixel &pixel()

Get Pixel.

inline Sampling &set(const Pixel &value)

Set Pixel.

template<typename F>
inline void forEach(const F &f) const

Run the given function on each direct member with the value of the member as parameter.

template<typename F>
inline void forEach(const F &f)

Run the given function on each direct member with the value of the member as parameter.

bool operator==(const Sampling &other) const

Equality operator.

bool operator!=(const Sampling &other) const

Inequality operator.

std::string toString() const

Get the value as string.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group

The type of this node.

static constexpr const char *path = {"Sampling"}

The full path for this value.

static constexpr const char *name = {"Sampling"}

The name of this value.

static constexpr const char * description   = { R"description(Samplingsettings.)description" }

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Sampling &value)

Operator to send the value as string to a stream.

class Color

Choose how to sample colors for the 2D image.

  • rgb option gives an image with full colors.

  • grayscale option gives a grayscale (r=g=b) image, which can be acquired faster than full colors.

  • rgbStrongAmbientLight option gives an image with full colors and reduced color noise. This option should be chosen only for applications which suffer from high color noise and with high amounts of ambient light in the scene.

  • rgbAmbientSuppression option gives an image with full colors while suppressing the ambient light. The Zivid 2+R and Zivid 3 cameras suppress ambient light by default, and therefore do not need the additional option rgbAmbientSuppression.

The grayscale, rgbStrongAmbientLight and rgbAmbientSuppression options are not available on all camera models.

Public Types

enum class ValueType

The type of the underlying value.

Values:

enumerator rgb
enumerator grayscale
enumerator rgbStrongAmbientLight
enumerator rgbAmbientSuppression

Public Functions

Color() = default

Default constructor.

inline explicit constexpr Color(ValueType value)

Constructor.

ValueType value() const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

bool hasValue() const

Check if the value is set.

void reset()

Reset the node to unset state.

std::string toString() const

Get the value as string.

inline bool operator==(const Color &other) const

Comparison operator.

inline bool operator!=(const Color &other) const

Comparison operator.

Public Static Functions

static inline std::set<ValueType> validValues()

All valid values of Color.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue

The type of this node.

static constexpr const char *path = {"Sampling/Color"}

The full path for this value.

static constexpr const char *name = {"Color"}

The name of this value.

static constexpr const char * description  { R"description(Choose how to sample colors for the 2D image.- `rgb` option gives an image with full colors.- `grayscale` option gives a grayscale(r=g=b) image, whichcan be acquired faster than full colors.- `rgbStrongAmbientLight` option gives an image with full colors and reduced   colornoise. This option should be chosen only for applications whichsuffer from highcolornoise and with high amounts of ambient light in thescene.- `rgbAmbientSuppression` option gives an image with full colors whilesuppressing the ambient light. The Zivid 2+R and Zivid 3 cameras suppress ambientlight by default, and therefore do not need the additional option`rgbAmbientSuppression`.The `grayscale`, `rgbStrongAmbientLight` and `rgbAmbientSuppression` options are not available on all camera models.)description" }

The description for this value.

static const Color rgb

rgb

static const Color grayscale

grayscale

static const Color rgbStrongAmbientLight

rgbStrongAmbientLight

static const Color rgbAmbientSuppression

rgbAmbientSuppression

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Color::ValueType &value)

Operator to serialize ValueType to a stream.

inline friend std::ostream &operator<<(std::ostream &stream, const Color &value)

Operator to serialize the value to a stream.

class Interval

Sampling interval controls the interval between successive sensor operations (e.g., structured light pattern projection and image exposure), aligned to external frequencies (e.g., 50 Hz, 60 Hz grid) or to other devices (e.g., barcode scanners at 100 Hz).

The requested interval is a target: the sensor operations will happen at this rate if the it can fit the chosen exposure time plus some processing overhead. Otherwise, the sampling interval is rounded up to the nearest suitable integer multiple (e.g., n * 10 ms for 100 Hz and n * 8.33 ms for 120 Hz).

Public Functions

Interval()

Default constructor.

template<typename ...Args>
inline explicit Interval(Args&&... args)

Constructor taking variadic number of arguments.

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing Interval then invoking set(args).

The provided arguments must be descendants of Interval. These types can be provided:

template<typename ...Args>
inline void set(Args&&... args)

Set multiple arguments.

The method invokes set(arg) with each of the provided arguments.

The provided arguments must be descendants of Interval. These types can be provided:

template<typename ...Args>
inline Interval copyWith(Args&&... args) const

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this Interval object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of Interval. These types can be provided:

inline const Duration &duration() const

Get Duration.

inline Duration &duration()

Get Duration.

inline Interval &set(const Duration &value)

Set Duration.

inline const Enabled &isEnabled() const

Get Enabled.

inline Enabled &isEnabled()

Get Enabled.

inline Interval &set(const Enabled &value)

Set Enabled.

template<typename F>
inline void forEach(const F &f) const

Run the given function on each direct member with the value of the member as parameter.

template<typename F>
inline void forEach(const F &f)

Run the given function on each direct member with the value of the member as parameter.

bool operator==(const Interval &other) const

Equality operator.

bool operator!=(const Interval &other) const

Inequality operator.

std::string toString() const

Get the value as string.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group

The type of this node.

static constexpr const char *path = {"Sampling/Interval"}

The full path for this value.

static constexpr const char *name = {"Interval"}

The name of this value.

static constexpr const char * description  {R"description(Sampling interval controls the intervalbetween successive sensor operations (e.g.,structured light pattern projection and image exposure), aligned to externalfrequencies (e.g., 50 Hz, 60 Hz grid) or to other devices (e.g., barcode scannersat 100 Hz). The requestedintervalis a target: the sensor operations will happenat this rate if the it can fit the chosen exposure time plus someprocessingoverhead.Otherwise, thesampling intervalis rounded up to the nearest suitable integer multiple(e.g., n * 10 ms for 100 Hz and n * 8.33 ms for 120 Hz).)description"}

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Interval &value)

Operator to send the value as string to a stream.

class Duration

Duration between successive sensor operations, in microseconds.

The effective interval might be rounded up to the nearest suitable integer multiple and will never be shorter than exposure time plus some processing overhead.

Public Types

using ValueType = std::chrono::microseconds

The type of the underlying value.

Public Functions

Duration() = default

Default constructor.

inline explicit constexpr Duration(std::chrono::microseconds value)

Constructor.

std::chrono::microseconds value() const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

bool hasValue() const

Check if the value is set.

void reset()

Reset the node to unset state.

std::string toString() const

Get the value as string.

inline bool operator==(const Duration &other) const

Comparison operator.

inline bool operator!=(const Duration &other) const

Comparison operator.

inline bool operator<(const Duration &other) const

Comparison operator.

inline bool operator>(const Duration &other) const

Comparison operator.

inline bool operator<=(const Duration &other) const

Comparison operator.

inline bool operator>=(const Duration &other) const

Comparison operator.

Public Static Functions

static inline constexpr Range<std::chrono::microseconds> validRange()

The range of valid values for Duration.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue

The type of this node.

static constexpr const char *path = {"Sampling/Interval/Duration"}

The full path for this value.

static constexpr const char *name = {"Duration"}

The name of this value.

static constexpr const char * description  {R"description(Duration between successive sensor operations, in microseconds. The effective intervalmight be rounded up to the nearest suitable integer multiple and will never be shorterthan exposure time plus someprocessingoverhead.)description"}

The description for this value.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Duration &value)

Operator to serialize the value to a stream.

class Enabled

Enable or disable sampling interval.

Public Types

using ValueType = bool

The type of the underlying value.

Public Functions

Enabled() = default

Default constructor.

inline explicit constexpr Enabled(bool value)

Constructor.

bool value() const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

bool hasValue() const

Check if the value is set.

void reset()

Reset the node to unset state.

std::string toString() const

Get the value as string.

inline bool operator==(const Enabled &other) const

Comparison operator.

inline bool operator!=(const Enabled &other) const

Comparison operator.

Public Static Functions

static inline std::set<bool> validValues()

All valid values of Enabled.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue

The type of this node.

static constexpr const char *path = {"Sampling/Interval/Enabled"}

The full path for this value.

static constexpr const char *name = {"Enabled"}

The name of this value.

static constexpr const char * description  {R"description(Enable or disablesamplinginterval.)description"}

The description for this value.

static const Enabled yes

On/enabled.

static const Enabled no

Off/disabled.

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)

Operator to serialize the value to a stream.

class Pixel

Set the pixel sampling to use for the 2D capture.

This setting defines how the camera sensor is sampled. When doing 2D+3D capture, picking the same value that is used for 3D is generally recommended.

Public Types

enum class ValueType

The type of the underlying value.

Values:

enumerator all
enumerator blueSubsample2x2
enumerator redSubsample2x2
enumerator blueSubsample4x4
enumerator redSubsample4x4
enumerator by2x2
enumerator by4x4

Public Functions

Pixel() = default

Default constructor.

inline explicit constexpr Pixel(ValueType value)

Constructor.

ValueType value() const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

bool hasValue() const

Check if the value is set.

void reset()

Reset the node to unset state.

std::string toString() const

Get the value as string.

inline bool operator==(const Pixel &other) const

Comparison operator.

inline bool operator!=(const Pixel &other) const

Comparison operator.

Public Static Functions

static inline std::set<ValueType> validValues()

All valid values of Pixel.

Public Static Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue

The type of this node.

static constexpr const char *path = {"Sampling/Pixel"}

The full path for this value.

static constexpr const char *name = {"Pixel"}

The name of this value.

static constexpr const char * description  {R"description(Set thepixel samplingto use for the 2D capture. This setting defines how the camera sensor is sampled.When doing 2D+3D capture, picking the samevaluethat is used for 3D is generally recommended.)description"}

The description for this value.

static const Pixel all

all

static const Pixel blueSubsample2x2

blueSubsample2x2

static const Pixel redSubsample2x2

redSubsample2x2

static const Pixel blueSubsample4x4

blueSubsample4x4

static const Pixel redSubsample4x4

redSubsample4x4

static const Pixel by2x2

by2x2

static const Pixel by4x4

by4x4

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const Pixel::ValueType &value)

Operator to serialize ValueType to a stream.

inline friend std::ostream &operator<<(std::ostream &stream, const Pixel &value)

Operator to serialize the value to a stream.

struct Settings2D

Settings used when capturing 2D images with a Zivid camera.

Public Functions

System::String ^ Serialize ()

Serialize to a string.

See also FromSerialized. The returned string is formatted in YAML, and is compatible with the contents of files saved using Save.

void Save (System::String ^ fileName)

Save to the given file.

void Load (System::String ^ fileName)

Load from the given file.

inline Settings2D()

Constructor.

Settings2D ^ CopyWith (CopyWithDelegate ^ delegate)

Create a clone (deep copy) of the current instance and invoke delegate on the clone.

Creates a clone (deep copy) of this object, then invokes the delegate function on the clone, and finally returns the clone. This method can be used to create a clone of an instance and then change one or more properties on the clone in one method call. The current instance is unchanged.

Settings2D ^ Clone ()

Create a clone (deep copy) of the current instance.

System::String ^ ToString () override

Get string representation of the object.

Public Static Attributes

static Settings2D(System::String ^ fileName) Settings2D FromSerialized )(System::String ^ value)

Construct Settings2D by loading from file.

Construct a new Settings2D instance from a previously serialized string

See also Serialize.

struct Acquisition

Settings for one 2D acquisition.

When capturing 2D HDR, all 2D acquisitions must have the same Aperture setting. Use Exposure Time or Gain to control the exposure instead.

Public Functions

inline Acquisition()

Constructor.

Acquisition ^ CopyWith (CopyWithDelegate ^ delegate)

Create a clone (deep copy) of the current instance and invoke delegate on the clone.

Creates a clone (deep copy) of this object, then invokes the delegate function on the clone, and finally returns the clone. This method can be used to create a clone of an instance and then change one or more properties on the clone in one method call. The current instance is unchanged.

Acquisition ^ Clone ()

Create a clone (deep copy) of the current instance.

System::String ^ ToString () override

Get string representation of the object.

Properties

System::Nullable<double> Aperture

Aperture setting for the camera.

Specified as an f-number (the ratio of lens focal length to the effective aperture diameter).

When capturing 2D HDR, all 2D acquisitions must have the same Aperture setting. Use Exposure Time or Gain to control the exposure instead.

System::Nullable<double> Brightness

Brightness controls the light output from the projector.

Brightness above 1.0 may be needed when the distance between the camera and the scene is large, or in case of high levels of ambient lighting.

When brightness is above 1.0 the duty cycle of the camera (the percentage of time the camera can capture) will be reduced. The duty cycle in boost mode is 50%. The duty cycle is calculated over a 10 second period. This limitation is enforced automatically by the camera. Calling capture when the duty cycle limit has been reached will cause the camera to first wait (sleep) for a duration of time to cool down, before capture will start.

System::Nullable<::Zivid::NET::Duration> ExposureTime

Exposure time for the image.

System::Nullable<double> Gain

Analog gain in the camera.

AcquisitionsList : public System::Collections::Generic::List< Acquisition ^>

List of acquisitions used for 2D capture.

Public Functions

AcquisitionsList ^ Clone ()

Create a clone (deep copy) of the current instance.

System::String ^ ToString () override

Get string representation of the object.

struct DiagnosticsGroup

When Diagnostics is enabled, additional diagnostic data is recorded during capture and included when saving the frame to a .zdf file.

This enables Zivid’s Customer Success team to provide better assistance and more thorough troubleshooting.

Enabling Diagnostics increases the capture time and the RAM usage. It will also increase the size of the .zdf file. It is recommended to enable Diagnostics only when reporting issues to Zivid’s support team.

Public Functions

inline DiagnosticsGroup()

Constructor.

DiagnosticsGroup ^ CopyWith (CopyWithDelegate ^ delegate)

Create a clone (deep copy) of the current instance and invoke delegate on the clone.

Creates a clone (deep copy) of this object, then invokes the delegate function on the clone, and finally returns the clone. This method can be used to create a clone of an instance and then change one or more properties on the clone in one method call. The current instance is unchanged.

DiagnosticsGroup ^ Clone ()

Create a clone (deep copy) of the current instance.

System::String ^ ToString () override

Get string representation of the object.

Properties

System::Nullable<bool> Enabled

Enable or disable diagnostics.

struct ProcessingGroup

2D processing settings.

Public Functions

inline ProcessingGroup()

Constructor.

ProcessingGroup ^ CopyWith (CopyWithDelegate ^ delegate)

Create a clone (deep copy) of the current instance and invoke delegate on the clone.

Creates a clone (deep copy) of this object, then invokes the delegate function on the clone, and finally returns the clone. This method can be used to create a clone of an instance and then change one or more properties on the clone in one method call. The current instance is unchanged.

ProcessingGroup ^ Clone ()

Create a clone (deep copy) of the current instance.

System::String ^ ToString () override

Get string representation of the object.

struct ColorGroup

Color settings.

Public Functions

inline ColorGroup()

Constructor.

ColorGroup ^ CopyWith (CopyWithDelegate ^ delegate)

Create a clone (deep copy) of the current instance and invoke delegate on the clone.

Creates a clone (deep copy) of this object, then invokes the delegate function on the clone, and finally returns the clone. This method can be used to create a clone of an instance and then change one or more properties on the clone in one method call. The current instance is unchanged.

ColorGroup ^ Clone ()

Create a clone (deep copy) of the current instance.

System::String ^ ToString () override

Get string representation of the object.

Properties

System::Nullable<double> Gamma

Gamma applied to the color values.

Gamma less than 1 makes the colors brighter, while gamma greater than 1 makes the colors darker.

struct BalanceGroup

Color balance settings.

Public Functions

inline BalanceGroup()

Constructor.

BalanceGroup ^ CopyWith (CopyWithDelegate ^ delegate)

Create a clone (deep copy) of the current instance and invoke delegate on the clone.

Creates a clone (deep copy) of this object, then invokes the delegate function on the clone, and finally returns the clone. This method can be used to create a clone of an instance and then change one or more properties on the clone in one method call. The current instance is unchanged.

BalanceGroup ^ Clone ()

Create a clone (deep copy) of the current instance.

System::String ^ ToString () override

Get string representation of the object.

Properties

System::Nullable<double> Blue

Digital gain applied to blue channel.

System::Nullable<double> Green

Digital gain applied to green channel.

System::Nullable<double> Red

Digital gain applied to red channel.

struct ExperimentalGroup

Experimental color settings. These may be renamed, moved or deleted in the future.

Public Types

enum class ModeOption : std::underlying_type<Zivid::Settings2D::Processing::Color::Experimental::Mode::ValueType>::type

This setting controls how the color image is computed.

automatic is the default option. It performs tone mapping for HDR captures, but not for single-acquisition captures. Use this mode with a single acquisition if you want to have the most control over the colors in the image.

toneMapping uses all the acquisitions to create one merged and normalized color image. For HDR captures the dynamic range of the captured images is usually higher than the 8-bit color image range. toneMapping will map the HDR color data to the 8-bit color output range by applying a scaling factor. toneMapping can also be used for single-acquisition captures to normalize the captured color image to the full 8-bit output. Note that when using toneMapping mode the color values can be inconsistent over repeated captures if you move, add or remove objects in the scene. For the most control over the colors in the single-acquisition case, select the automatic mode.

Values:

enumerator Automatic
enumerator ToneMapping

Public Functions

inline ExperimentalGroup()

Constructor.

ExperimentalGroup ^ CopyWith (CopyWithDelegate ^ delegate)

Create a clone (deep copy) of the current instance and invoke delegate on the clone.

Creates a clone (deep copy) of this object, then invokes the delegate function on the clone, and finally returns the clone. This method can be used to create a clone of an instance and then change one or more properties on the clone in one method call. The current instance is unchanged.

ExperimentalGroup ^ Clone ()

Create a clone (deep copy) of the current instance.

System::String ^ ToString () override

Get string representation of the object.

Properties

System::Nullable<ModeOption> Mode

This setting controls how the color image is computed.

automatic is the default option. It performs tone mapping for HDR captures, but not for single-acquisition captures. Use this mode with a single acquisition if you want to have the most control over the colors in the image.

toneMapping uses all the acquisitions to create one merged and normalized color image. For HDR captures the dynamic range of the captured images is usually higher than the 8-bit color image range. toneMapping will map the HDR color data to the 8-bit color output range by applying a scaling factor. toneMapping can also be used for single-acquisition captures to normalize the captured color image to the full 8-bit output. Note that when using toneMapping mode the color values can be inconsistent over repeated captures if you move, add or remove objects in the scene. For the most control over the colors in the single-acquisition case, select the automatic mode.

struct SamplingGroup

Sampling settings.

Public Types

enum class ColorOption : std::underlying_type<Zivid::Settings2D::Sampling::Color::ValueType>::type

Choose how to sample colors for the 2D image.

  • rgb option gives an image with full colors.

  • grayscale option gives a grayscale (r=g=b) image, which can be acquired faster than full colors.

  • rgbStrongAmbientLight option gives an image with full colors and reduced color noise. This option should be chosen only for applications which suffer from high color noise and with high amounts of ambient light in the scene.

  • rgbAmbientSuppression option gives an image with full colors while suppressing the ambient light. The Zivid 2+R and Zivid 3 cameras suppress ambient light by default, and therefore do not need the additional option rgbAmbientSuppression.

The grayscale, rgbStrongAmbientLight and rgbAmbientSuppression options are not available on all camera models.

Values:

enumerator Rgb
enumerator Grayscale
enumerator RgbStrongAmbientLight
enumerator RgbAmbientSuppression
enum class PixelOption : std::underlying_type<Zivid::Settings2D::Sampling::Pixel::ValueType>::type

Set the pixel sampling to use for the 2D capture.

This setting defines how the camera sensor is sampled. When doing 2D+3D capture, picking the same value that is used for 3D is generally recommended.

Values:

enumerator All
enumerator BlueSubsample2x2
enumerator RedSubsample2x2
enumerator BlueSubsample4x4
enumerator RedSubsample4x4
enumerator By2x2
enumerator By4x4

Public Functions

inline SamplingGroup()

Constructor.

SamplingGroup ^ CopyWith (CopyWithDelegate ^ delegate)

Create a clone (deep copy) of the current instance and invoke delegate on the clone.

Creates a clone (deep copy) of this object, then invokes the delegate function on the clone, and finally returns the clone. This method can be used to create a clone of an instance and then change one or more properties on the clone in one method call. The current instance is unchanged.

SamplingGroup ^ Clone ()

Create a clone (deep copy) of the current instance.

System::String ^ ToString () override

Get string representation of the object.

Properties

System::Nullable<ColorOption> Color

Choose how to sample colors for the 2D image.

  • rgb option gives an image with full colors.

  • grayscale option gives a grayscale (r=g=b) image, which can be acquired faster than full colors.

  • rgbStrongAmbientLight option gives an image with full colors and reduced color noise. This option should be chosen only for applications which suffer from high color noise and with high amounts of ambient light in the scene.

  • rgbAmbientSuppression option gives an image with full colors while suppressing the ambient light. The Zivid 2+R and Zivid 3 cameras suppress ambient light by default, and therefore do not need the additional option rgbAmbientSuppression.

The grayscale, rgbStrongAmbientLight and rgbAmbientSuppression options are not available on all camera models.

System::Nullable<PixelOption> Pixel

Set the pixel sampling to use for the 2D capture.

This setting defines how the camera sensor is sampled. When doing 2D+3D capture, picking the same value that is used for 3D is generally recommended.

struct IntervalGroup

Sampling interval controls the interval between successive sensor operations (e.g., structured light pattern projection and image exposure), aligned to external frequencies (e.g., 50 Hz, 60 Hz grid) or to other devices (e.g., barcode scanners at 100 Hz).

The requested interval is a target: the sensor operations will happen at this rate if the it can fit the chosen exposure time plus some processing overhead. Otherwise, the sampling interval is rounded up to the nearest suitable integer multiple (e.g., n * 10 ms for 100 Hz and n * 8.33 ms for 120 Hz).

Public Functions

inline IntervalGroup()

Constructor.

IntervalGroup ^ CopyWith (CopyWithDelegate ^ delegate)

Create a clone (deep copy) of the current instance and invoke delegate on the clone.

Creates a clone (deep copy) of this object, then invokes the delegate function on the clone, and finally returns the clone. This method can be used to create a clone of an instance and then change one or more properties on the clone in one method call. The current instance is unchanged.

IntervalGroup ^ Clone ()

Create a clone (deep copy) of the current instance.

System::String ^ ToString () override

Get string representation of the object.

Properties

System::Nullable<::Zivid::NET::Duration> Duration

Duration between successive sensor operations, in microseconds.

The effective interval might be rounded up to the nearest suitable integer multiple and will never be shorter than exposure time plus some processing overhead.

System::Nullable<bool> Enabled

Enable or disable sampling interval.

Go to source

source

settings = zivid.Settings(
    acquisitions=[zivid.Settings.Acquisition()],
    color=zivid.Settings2D(acquisitions=[zivid.Settings2D.Acquisition()]),
)