Sampling(采样)(2D)

控制 2D 捕获的颜色和像素采样。

有关如何选择这些设置的指导,请参阅 Sampling(采样)- 2D。

Samplingclass

Sampling settings.

Public Functions

Sampling()

Default constructor.

< Argstemplatetypename...>
Sampling(Args& &...args)inlineexplicit

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:

< Argstemplatetypename...>
set(Args& &...args)inlinevoid

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:

< Argstemplatetypename...>
SamplingcopyWith(Args& &...args)constinline

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:

Color&color()constinlineconst

Get Color.

Color&color()inline

Get Color.

Sampling&set( Color&const value)inline

Set Color.

Interval&interval()constinlineconst

Get Interval.

Interval&interval()inline

Get Interval.

Sampling&set( Interval&const value)inline

Set Interval.

Sampling&set( IntervalDuration&const:: value)inline

Set Interval::Duration.

Sampling&set( IntervalEnabled&const:: value)inline

Set Interval::Enabled.

Pixel&pixel()constinlineconst

Get Pixel.

Pixel&pixel()inline

Get Pixel.

Sampling&set( Pixel&const value)inline

Set Pixel.

< Ftemplatetypename>
forEach( F&const f)constinlinevoid

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

< Ftemplatetypename>
forEach( F&const f)inlinevoid

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

==operator( Sampling&const other)constbool

Equality operator.

!=operator( Sampling&const other)constbool

Inequality operator.

stdstringtoString()const::

Get the value as string.

Public Static Attributes

DataModelNodeTypenodeType=DataModelNodeTypegroupstaticconstexpr:: ::::

The type of this node.

path={}staticconstexprconstchar* "Sampling"

The full path for this value.

name={}staticconstexprconstchar* "Sampling"

The name of this value.

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

The description for this value.

Friends

stdostream&<<operator(stdostream&:: stream, Sampling&const value)inlinefriend::

Operator to send the value as string to a stream.

Colorclass

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

ValueTypeenumclass

The type of the underlying value.

Values:

rgbenumerator
grayscaleenumerator
rgbStrongAmbientLightenumerator
rgbAmbientSuppressionenumerator

Public Functions

Color()=default

Default constructor.

Color(ValueTypevalue )inlineexplicitconstexpr

Constructor.

ValueTypevalue()const

Get the value.

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

hasValue()constbool

Check if the value is set.

reset()void

Reset the node to unset state.

stdstringtoString()const::

Get the value as string.

==operator( Color&const other)constinlinebool

Comparison operator.

!=operator( Color&const other)constinlinebool

Comparison operator.

Public Static Functions

stdsetValueType validValues()staticinline::<>

All valid values of Color.

Public Static Attributes

DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::

The type of this node.

path={}staticconstexprconstchar* "Sampling/Color"

The full path for this value.

name={}staticconstexprconstchar* "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.

Colorrgbstaticconst

rgb

Colorgrayscalestaticconst

grayscale

ColorrgbStrongAmbientLightstaticconst

rgbStrongAmbientLight

ColorrgbAmbientSuppressionstaticconst

rgbAmbientSuppression

Friends

stdostream&<<operator(stdostream&:: stream, ColorValueType&const:: value)inlinefriend::

Operator to serialize ValueType to a stream.

stdostream&<<operator(stdostream&:: stream, Color&const value)inlinefriend::

Operator to serialize the value to a stream.

Intervalclass

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.

< Argstemplatetypename...>
Interval(Args& &...args)inlineexplicit

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:

< Argstemplatetypename...>
set(Args& &...args)inlinevoid

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:

< Argstemplatetypename...>
IntervalcopyWith(Args& &...args)constinline

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:

Duration&duration()constinlineconst

Get Duration.

Duration&duration()inline

Get Duration.

Interval&set( Duration&const value)inline

Set Duration.

Enabled&isEnabled()constinlineconst

Get Enabled.

Enabled&isEnabled()inline

Get Enabled.

Interval&set( Enabled&const value)inline

Set Enabled.

< Ftemplatetypename>
forEach( F&const f)constinlinevoid

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

< Ftemplatetypename>
forEach( F&const f)inlinevoid

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

==operator( Interval&const other)constbool

Equality operator.

!=operator( Interval&const other)constbool

Inequality operator.

stdstringtoString()const::

Get the value as string.

Public Static Attributes

DataModelNodeTypenodeType=DataModelNodeTypegroupstaticconstexpr:: ::::

The type of this node.

path={}staticconstexprconstchar* "Sampling/Interval"

The full path for this value.

name={}staticconstexprconstchar* "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

stdostream&<<operator(stdostream&:: stream, Interval&const value)inlinefriend::

Operator to send the value as string to a stream.

Durationclass

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

ValueType=stdchronomicrosecondsusing ::::

The type of the underlying value.

Public Functions

Duration()=default

Default constructor.

Duration(stdchronomicrosecondsvalue:::: )inlineexplicitconstexpr

Constructor.

stdchronomicrosecondsvalue()const::::

Get the value.

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

hasValue()constbool

Check if the value is set.

reset()void

Reset the node to unset state.

stdstringtoString()const::

Get the value as string.

==operator( Duration&const other)constinlinebool

Comparison operator.

!=operator( Duration&const other)constinlinebool

Comparison operator.

<operator( Duration&const other)constinlinebool

Comparison operator.

>operator( Duration&const other)constinlinebool

Comparison operator.

<=operator( Duration&const other)constinlinebool

Comparison operator.

>=operator( Duration&const other)constinlinebool

Comparison operator.

Public Static Functions

Rangestdchronomicroseconds validRange()staticinlineconstexpr<::::>

The range of valid values for Duration.

Public Static Attributes

DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::

The type of this node.

path={}staticconstexprconstchar* "Sampling/Interval/Duration"

The full path for this value.

name={}staticconstexprconstchar* "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

stdostream&<<operator(stdostream&:: stream, Duration&const value)inlinefriend::

Operator to serialize the value to a stream.

Enabledclass

Enable or disable sampling interval.

Public Types

ValueType=boolusing

The type of the underlying value.

Public Functions

Enabled()=default

Default constructor.

Enabled( boolvalue)inlineexplicitconstexpr

Constructor.

value()constbool

Get the value.

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

hasValue()constbool

Check if the value is set.

reset()void

Reset the node to unset state.

stdstringtoString()const::

Get the value as string.

==operator( Enabled&const other)constinlinebool

Comparison operator.

!=operator( Enabled&const other)constinlinebool

Comparison operator.

Public Static Functions

stdsetbool validValues()staticinline::<>

All valid values of Enabled.

Public Static Attributes

DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::

The type of this node.

path={}staticconstexprconstchar* "Sampling/Interval/Enabled"

The full path for this value.

name={}staticconstexprconstchar* "Enabled"

The name of this value.

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

The description for this value.

Enabledyesstaticconst

On/enabled.

Enablednostaticconst

Off/disabled.

Friends

stdostream&<<operator(stdostream&:: stream, Enabled&const value)inlinefriend::

Operator to serialize the value to a stream.

Pixelclass

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

ValueTypeenumclass

The type of the underlying value.

Values:

allenumerator
blueSubsample2x2enumerator
redSubsample2x2enumerator
blueSubsample4x4enumerator
redSubsample4x4enumerator
by2x2enumerator
by4x4enumerator

Public Functions

Pixel()=default

Default constructor.

Pixel(ValueTypevalue )inlineexplicitconstexpr

Constructor.

ValueTypevalue()const

Get the value.

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

hasValue()constbool

Check if the value is set.

reset()void

Reset the node to unset state.

stdstringtoString()const::

Get the value as string.

==operator( Pixel&const other)constinlinebool

Comparison operator.

!=operator( Pixel&const other)constinlinebool

Comparison operator.

Public Static Functions

stdsetValueType validValues()staticinline::<>

All valid values of Pixel.

Public Static Attributes

DataModelNodeTypenodeType=DataModelNodeTypeleafValuestaticconstexpr:: ::::

The type of this node.

path={}staticconstexprconstchar* "Sampling/Pixel"

The full path for this value.

name={}staticconstexprconstchar* "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.

Pixelallstaticconst

all

PixelblueSubsample2x2staticconst

blueSubsample2x2

PixelredSubsample2x2staticconst

redSubsample2x2

PixelblueSubsample4x4staticconst

blueSubsample4x4

PixelredSubsample4x4staticconst

redSubsample4x4

Pixelby2x2staticconst

by2x2

Pixelby4x4staticconst

by4x4

Friends

stdostream&<<operator(stdostream&:: stream, PixelValueType&const:: value)inlinefriend::

Operator to serialize ValueType to a stream.

stdostream&<<operator(stdostream&:: stream, Pixel&const value)inlinefriend::

Operator to serialize the value to a stream.

SamplingGroupstruct

Sampling settings.

Public Types

ColorOption:stdunderlying_typeZividSettings2DSamplingColorValueType::typeenumclass ::<::::::::>

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:

Rgbenumerator
Grayscaleenumerator
RgbStrongAmbientLightenumerator
RgbAmbientSuppressionenumerator
PixelOption:stdunderlying_typeZividSettings2DSamplingPixelValueType::typeenumclass ::<::::::::>

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:

Allenumerator
BlueSubsample2x2enumerator
RedSubsample2x2enumerator
BlueSubsample4x4enumerator
RedSubsample4x4enumerator
By2x2enumerator
By4x4enumerator

Public Functions

SamplingGroup()inline

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

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

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

IntervalGroupstruct

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

IntervalGroup()inline

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

SystemNullable::ZividNETDuration 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.

SystemNullablebool Enabled::<>

Enable or disable sampling interval.

classSampling(
:str | None=Nonecolor ,
:str | None=Nonepixel ,
:Settings2D | None=Noneinterval ,
)

Sampling settings.

Initialization

classInterval(:timedelta | None=Noneduration , :bool | None=Noneenabled )

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

Initialization

propertyduration

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.

propertyenabled

Enable or disable sampling interval.

classColor

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.

grayscale='grayscale'
rgb='rgb'
rgbAmbientSuppression='rgbAmbientSuppression'
rgbStrongAmbientLight='rgbStrongAmbientLight'
classmethodvalid_values()

All valid values of Color

classPixel

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.

all='all'
blueSubsample2x2='blueSubsample2x2'
blueSubsample4x4='blueSubsample4x4'
by2x2='by2x2'
by4x4='by4x4'
redSubsample2x2='redSubsample2x2'
redSubsample4x4='redSubsample4x4'
classmethodvalid_values()

All valid values of Pixel

propertycolor

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.

propertypixel

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.

propertyinterval

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