Processing (2D)

Color processing applied to the 2D image (color balance, gamma, color mode).

For guidance on choosing these settings, see 2D Settings.

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.

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.

class Processing(color: Color | None = None)

2D processing settings.

class Color(
gamma: float | int | None = _zivid.Settings2D.Processing.Color.Gamma().value,
balance: Balance | None = None,
experimental: Experimental | None = None,
)

Color settings.

class Balance(
blue: float | int | None = _zivid.Settings2D.Processing.Color.Balance.Blue().value,
green: float | int | None = _zivid.Settings2D.Processing.Color.Balance.Green().value,
red: float | int | None = _zivid.Settings2D.Processing.Color.Balance.Red().value,
)

Color balance settings.

property blue

Digital gain applied to blue channel.

property green

Digital gain applied to green channel.

property red

Digital gain applied to red channel.

class Experimental(
mode: str | None = _zivid.Settings2D.Processing.Color.Experimental.Mode().value,
)

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

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.

property 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.

property balance

Color balance settings.

property experimental

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

property gamma

Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma greater than 1 makes the colors darker.

property color

Color settings.