Sampling (2D)

Color

Setting Settings2D::Sampling::Color to rgb or grayscale specifies the type of information that can be captured from the scene. Depending on camera model the setting will have different options.

Available Settings2D::Sampling::Color values

Zivid 2/2+

Zivid 2+ R

rgb

grayscale

The behavior of different capture functions in relation to Settings2D::Sampling::Color is as follows:

Capture2D3D() and Capture2D()

  • Acquire full color information when Settings2D::Sampling::Color is set to rgb.

  • Acquire texture or intensity information when Settings2D::Sampling::Color is set to grayscale.

Capture3D()

  • Does not acquire color or texture information, regardless of the Settings2D::Sampling::Color setting.

  • Assigns uniform RGB values (\(R=200\), \(G=50\), and \(B=200\)) to all pixels, resulting in a pink image and point cloud.

Result of combination of available capture functions and Settings2D::Sampling::Color options

Capture function

Settings2D::Sampling::Color

2D image

Point cloud

Capture2D3D()

rgb

RGB

RGB

grayscale

Grayscale

Grayscale

__not_set__

RGB

RGB

Capture2D()

rgb

RGB

/

grayscale

Grayscale

/

__not_set__

RGB

/

Capture3D()

rgb

Pink

Pink

grayscale

Pink

Pink

__not_set__

Pink

Pink

Point cloud is in color when :code:`Capture2D3D()` is used with :code:`Settings2D::Sampling::Color` set to :code:`rgb`

Point cloud is in grayscale when :code:`Capture2D3D()` is used with :code:`Settings2D::Sampling::Color` set to :code:`grayscale`

Point cloud is in pink when :code:`Capture3D()` is used, regardless of :code:`Settings2D::Sampling::Color`

Point cloud is in color when Capture2D3D() is used with Settings2D::Sampling::Color set to rgb

Point cloud is in grayscale when Capture2D3D() is used with Settings2D::Sampling::Color set to grayscale

Point cloud is in pink when Capture3D() is used, regardless of Settings2D::Sampling::Color

2D image is in color when :code:`Capture2D3D()` or :code:`Capture2D()` is used with :code:`Settings2D::Sampling::Color` set to :code:`rgb`

2D image is in grayscale when :code:`Capture2D3D()` or :code:`Capture2D()` is used with :code:`Settings2D::Sampling::Color` set to :code:`grayscale`

2D image is in pink when :code:`Capture3D()` is used, regardless of :code:`Settings2D::Sampling::Color`

2D image is in color when Capture2D3D() or Capture2D() is used with Settings2D::Sampling::Color set to rgb

2D image is in grayscale when Capture2D3D() or Capture2D() is used with Settings2D::Sampling::Color set to grayscale

2D image is in pink when Capture3D() is used, regardless of Settings2D::Sampling::Color

Pixel

The Settings2D::Sampling::Pixel parameter is used to choose the sampled pixels to generate 2D image. Depending on camera model the setting will have different options.

Available Sampling::Pixel values

Zivid 2/2+

Zivid 2+ R

all

by2x2

by4x4

blueSubsample2x2

redSubsample2x2

blueSubsample4x4

redSubsample4x4

The respective resolutions, given camera, are as follows:

3D capture resolutions

3D capture

Zivid 2+

Zivid 2

Full resolution [1]

2448 x 2048

1944 x 1200

2x2 [1]

1224 x 1024

972 x 600

4x4 [1]

612 x 512

Not available

When set to all, all pixels sampled, and the 2D image has full resolution.

The following illustration shows the sensor grid and associated indices.

Sensor grid

When we sub-/downsample (2x2) we get 1/4 of the original number of pixels.

Pixels after subsampling

This means that, after subsampling or downsampling 2x2, the number of pixels along x and y axis is divided by 2. For subsample 4x4 the number of points along x and y axis is divided by 4.

As an example see the zoomed-in sections of three images of the same scene, each captured with different Settings2D::Sampling::Pixel setting.

sampling-p-all

sampling-p-2x2

sampling-p-4x4

all

by2x2

by4x4

Subsampling decreases the acquisition and capture time, as less data will be captured and processed. Additionally, it eliminates the need to downsample the data to transform it to a more manageable size and thus reduces the storage and post-processing requirements. With a quarter of the data, user post-processing (e.g., AI based segmentation) become faster.