Sampling(采样)

Controls the projected light color and which pixels are sampled for the 3D capture. The Color member here is deprecated since SDK 2.14; use Settings/Color instead to configure the 2D color image of a 2D + 3D capture.

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

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.

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 point cloud.

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

This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a Settings2D object in the Settings/Color field. Tip: If you want to convert an existing settings.yml file to the recommended API, you can import the .yml file into Zivid Studio and then re-export it to .yml.

Public Types

ValueTypeenumclass

The type of the underlying value.

Values:

rgbenumerator
disabledenumerator
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 point cloud.- `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.This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK majorversion (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` objectin the `Settings/Color` field. Tip: If you want to convert an existing settings.yml file tothe recommended API, you can import the .yml file into Zivid Studio and then re-export it to.yml.)description" }

The description for this value.

Colorrgbstaticconst

rgb

Colordisabledstaticconst

disabled

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.

Pixelclass

For Zivid 2 and Zivid 2+, this setting controls whether to read out the full image sensor and use white projector light or to subsample pixels for specific color channels with corresponding projector light.

Picking a specific color channel can help reduce noise and effects of ambient light - projecting blue light is recommended.

For Zivid 2+R and Zivid 3, the user does not have to set the projection color and should only consider whether to scale the resolution by2x2 or by4x4. Both of these modes will boost the signal strength by about 4x compared to all, so the user should consider a corresponding reduction in exposure time.

Sampling at a decreased resolution decreases capture time, as less data will be captured and processed.

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(For Zivid 2 and Zivid 2+, this setting controls whether to read out the full image sensor anduse white projector light or to subsample pixels for specificcolorchannels withcorresponding projector light. Picking a specificcolorchannel can help reduce noiseand effects of ambient light - projecting blue light is recommended.For Zivid 2+R and Zivid 3, the user does not have toset the projection colorand should onlyconsider whether to scale the resolution `by2x2` or `by4x4`. Both of these modeswill boost the signal strength by about 4x compared to `all`, so the user shouldconsider a corresponding reduction in exposure time.Samplingat a decreased resolution decreases capture time, as less data will be captured and processed.)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_typeZividSettingsSamplingColorValueType::typeenumclass ::<::::::::>

Choose how to sample colors for the point cloud.

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

This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a Settings2D object in the Settings/Color field. Tip: If you want to convert an existing settings.yml file to the recommended API, you can import the .yml file into Zivid Studio and then re-export it to .yml.

Values:

Rgbenumerator
Disabledenumerator
Grayscaleenumerator
RgbStrongAmbientLightenumerator
RgbAmbientSuppressionenumerator
PixelOption:stdunderlying_typeZividSettingsSamplingPixelValueType::typeenumclass ::<::::::::>

For Zivid 2 and Zivid 2+, this setting controls whether to read out the full image sensor and use white projector light or to subsample pixels for specific color channels with corresponding projector light.

Picking a specific color channel can help reduce noise and effects of ambient light - projecting blue light is recommended.

For Zivid 2+R and Zivid 3, the user does not have to set the projection color and should only consider whether to scale the resolution by2x2 or by4x4. Both of these modes will boost the signal strength by about 4x compared to all, so the user should consider a corresponding reduction in exposure time.

Sampling at a decreased resolution decreases capture time, as less data will be captured and processed.

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 point cloud.

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

This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a Settings2D object in the Settings/Color field. Tip: If you want to convert an existing settings.yml file to the recommended API, you can import the .yml file into Zivid Studio and then re-export it to .yml.

SystemNullablePixelOption Pixel::<>

For Zivid 2 and Zivid 2+, this setting controls whether to read out the full image sensor and use white projector light or to subsample pixels for specific color channels with corresponding projector light.

Picking a specific color channel can help reduce noise and effects of ambient light - projecting blue light is recommended.

For Zivid 2+R and Zivid 3, the user does not have to set the projection color and should only consider whether to scale the resolution by2x2 or by4x4. Both of these modes will boost the signal strength by about 4x compared to all, so the user should consider a corresponding reduction in exposure time.

Sampling at a decreased resolution decreases capture time, as less data will be captured and processed.

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

Sampling settings.

Initialization

classColor

Choose how to sample colors for the point cloud. - 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. This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a Settings2D object in the Settings/Color field. Tip: If you want to convert an existing settings.yml file to the recommended API, you can import the .yml file into Zivid Studio and then re-export it to .yml.

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

All valid values of Color

classPixel

For Zivid 2 and Zivid 2+, this setting controls whether to read out the full image sensor and use white projector light or to subsample pixels for specific color channels with corresponding projector light. Picking a specific color channel can help reduce noise and effects of ambient light - projecting blue light is recommended. For Zivid 2+R and Zivid 3, the user does not have to set the projection color and should only consider whether to scale the resolution by2x2 or by4x4. Both of these modes will boost the signal strength by about 4x compared to all, so the user should consider a corresponding reduction in exposure time. Sampling at a decreased resolution decreases capture time, as less data will be captured and processed.

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 point cloud. - 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. This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a Settings2D object in the Settings/Color field. Tip: If you want to convert an existing settings.yml file to the recommended API, you can import the .yml file into Zivid Studio and then re-export it to .yml.

propertypixel

For Zivid 2 and Zivid 2+, this setting controls whether to read out the full image sensor and use white projector light or to subsample pixels for specific color channels with corresponding projector light. Picking a specific color channel can help reduce noise and effects of ambient light - projecting blue light is recommended. For Zivid 2+R and Zivid 3, the user does not have to set the projection color and should only consider whether to scale the resolution by2x2 or by4x4. Both of these modes will boost the signal strength by about 4x compared to all, so the user should consider a corresponding reduction in exposure time. Sampling at a decreased resolution decreases capture time, as less data will be captured and processed.