Sampling (2D)
Controls the color and pixel sampling of the 2D capture.
For guidance on choosing these settings, see サンプリング(2D).
-
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
Samplingthen invokingset(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 Sampling &set(const Interval::Duration &value)
Set Interval::Duration.
-
inline Sampling &set(const Interval::Enabled &value)
Set Interval::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.
-
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
-
class Color
Choose how to sample colors for the 2D image.
rgboption gives an image with full colors.grayscaleoption gives a grayscale (r=g=b) image, which can be acquired faster than full colors.rgbStrongAmbientLightoption 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.rgbAmbientSuppressionoption 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 optionrgbAmbientSuppression.
The
grayscale,rgbStrongAmbientLightandrgbAmbientSuppressionoptions are not available on all camera models.Public Types
Public Functions
-
Color() = default
Default 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.
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.
-
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
Intervalthen invokingset(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:
-
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.
-
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
-
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.
Public Static Functions
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.
-
using ValueType = std::chrono::microseconds
-
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.
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.
-
using ValueType = bool
-
Interval()
-
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
Public Functions
-
Pixel() = default
Default 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.
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.
-
Pixel() = default
-
Sampling()
-
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.
rgboption gives an image with full colors.grayscaleoption gives a grayscale (r=g=b) image, which can be acquired faster than full colors.rgbStrongAmbientLightoption 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.rgbAmbientSuppressionoption 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 optionrgbAmbientSuppression.
The
grayscale,rgbStrongAmbientLightandrgbAmbientSuppressionoptions 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
-
enumerator All
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.
rgboption gives an image with full colors.grayscaleoption gives a grayscale (r=g=b) image, which can be acquired faster than full colors.rgbStrongAmbientLightoption 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.rgbAmbientSuppressionoption 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 optionrgbAmbientSuppression.
The
grayscale,rgbStrongAmbientLightandrgbAmbientSuppressionoptions 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.
-
inline IntervalGroup()
-
enum class ColorOption : std::underlying_type<Zivid::Settings2D::Sampling::Color::ValueType>::type
- class Sampling(
- color: str | None = _zivid.Settings2D.Sampling.Color().value,
- pixel: str | None = _zivid.Settings2D.Sampling.Pixel().value,
- interval: Interval | None = None,
Sampling settings.
- class Color
Choose how to sample colors for the 2D image. -
rgboption gives an image with full colors. -grayscaleoption gives a grayscale (r=g=b) image, which can be acquired faster than full colors. -rgbStrongAmbientLightoption 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. -rgbAmbientSuppressionoption 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 optionrgbAmbientSuppression. Thegrayscale,rgbStrongAmbientLightandrgbAmbientSuppressionoptions are not available on all camera models.
- class Interval(
- duration: timedelta | None = _zivid.Settings2D.Sampling.Interval.Duration().value,
- enabled: bool | None = _zivid.Settings2D.Sampling.Interval.Enabled().value,
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).
- property 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.
- property enabled
Enable or disable sampling interval.
- 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.
- property color
Choose how to sample colors for the 2D image. -
rgboption gives an image with full colors. -grayscaleoption gives a grayscale (r=g=b) image, which can be acquired faster than full colors. -rgbStrongAmbientLightoption 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. -rgbAmbientSuppressionoption 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 optionrgbAmbientSuppression. Thegrayscale,rgbStrongAmbientLightandrgbAmbientSuppressionoptions are not available on all camera models.
- property 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).
- property 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.