Zivid C++ API 2.12.0+6afd4961-1
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
Zivid::Settings::Processing::Resampling::Mode Class Reference

Setting for upsampling or downsampling the point cloud data by some factor. This operation is performed after all other processing has been completed. More...

#include <Zivid/Settings.h>

Public Types

enum class  ValueType {
  disabled , downsample2x2 , downsample4x4 , upsample2x2 ,
  upsample4x4
}
 The type of the underlying value. More...
 

Public Member Functions

 Mode ()=default
 Default constructor.
 
constexpr Mode (ValueType value)
 Constructor.
 
ValueType value () const
 Get the value.
 
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.
 
bool operator== (const Mode &other) const
 Comparison operator.
 
bool operator!= (const Mode &other) const
 Comparison operator.
 

Static Public Member Functions

static std::set< ValueTypevalidValues ()
 All valid values of Mode.
 

Static Public Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue
 The type of this node.
 
static constexpr const charpath { "Processing/Resampling/Mode" }
 The full path for this value.
 
static constexpr const charname { "Mode" }
 The name of this value.
 
static constexpr const chardescription
 The description for this value.
 
static const Mode disabled
 disabled
 
static const Mode downsample2x2
 downsample2x2
 
static const Mode downsample4x4
 downsample4x4
 
static const Mode upsample2x2
 upsample2x2
 
static const Mode upsample4x4
 upsample4x4
 

Friends

struct DataModel::Detail::Befriend< Mode >
 
std::ostream & operator<< (std::ostream &stream, const Mode::ValueType &value)
 Operator to serialize ValueType to a stream.
 
std::ostream & operator<< (std::ostream &stream, const Mode &value)
 Operator to serialize the value to a stream.
 

Detailed Description

Setting for upsampling or downsampling the point cloud data by some factor. This operation is performed after all other processing has been completed.

Downsampling is used to reduce the number of points in the point cloud. This is done by combining each 2x2 or 4x4 group of pixels in the original point cloud into one pixel in a new point cloud. This downsample functionality is identical to the downsample method on the PointCloud class. The averaging process reduces noise in the point cloud, but it will not improve capture speed. To improve capture speed, consider using the subsampling modes found in Settings/Sampling/Pixel.

Upsampling is used to increase the number of points in the point cloud. It is not possible to upsample beyond the full resolution of the camera, so upsampling may only be used in combination with the subsampling modes found in Settings/Sampling/Pixel. For example, one may combine blueSubsample2x2 with upsample2x2 to obtain a point cloud that matches a full resolution 2D capture, while retaining the speed benefits of capturing the point cloud with blueSubsample2x2. Upsampling is achieved by expanding pixels in the original point cloud into groups of 2x2 or 4x4 pixels in a new point cloud. Where possible, values are filled at the new points based on an interpolation of the surrounding original points. The points in the new point cloud that correspond to points in the original point cloud are left unchanged. Note that upsampling will lead to four (upsample2x2) or sixteen (upsample4x4) times as many pixels in the point cloud compared to no upsampling, so users should be aware of increased computational cost related to copying and analyzing this data.

Member Enumeration Documentation

◆ ValueType

The type of the underlying value.

Enumerator
disabled 
downsample2x2 
downsample4x4 
upsample2x2 
upsample4x4 

Constructor & Destructor Documentation

◆ Mode() [1/2]

Zivid::Settings::Processing::Resampling::Mode::Mode ( )
default

Default constructor.

◆ Mode() [2/2]

constexpr Zivid::Settings::Processing::Resampling::Mode::Mode ( ValueType value)
inlineexplicitconstexpr

Constructor.

Member Function Documentation

◆ hasValue()

bool Zivid::Settings::Processing::Resampling::Mode::hasValue ( ) const

Check if the value is set.

◆ operator!=()

bool Zivid::Settings::Processing::Resampling::Mode::operator!= ( const Mode & other) const
inline

Comparison operator.

◆ operator==()

bool Zivid::Settings::Processing::Resampling::Mode::operator== ( const Mode & other) const
inline

Comparison operator.

◆ reset()

void Zivid::Settings::Processing::Resampling::Mode::reset ( )

Reset the node to unset state.

◆ toString()

std::string Zivid::Settings::Processing::Resampling::Mode::toString ( ) const

Get the value as string.

◆ validValues()

static std::set< ValueType > Zivid::Settings::Processing::Resampling::Mode::validValues ( )
inlinestatic

All valid values of Mode.

◆ value()

ValueType Zivid::Settings::Processing::Resampling::Mode::value ( ) const

Get the value.

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

Friends And Related Symbol Documentation

◆ DataModel::Detail::Befriend< Mode >

friend struct DataModel::Detail::Befriend< Mode >
friend

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream & stream,
const Mode & value )
friend

Operator to serialize the value to a stream.

◆ operator<< [2/2]

std::ostream & operator<< ( std::ostream & stream,
const Mode::ValueType & value )
friend

Operator to serialize ValueType to a stream.

Member Data Documentation

◆ description

constexpr const char* Zivid::Settings::Processing::Resampling::Mode::description
staticconstexpr
Initial value:
{
R"description(Setting for upsampling or downsampling the point cloud data by some factor. This operation
is performed after all other processing has been completed.
Downsampling is used to reduce the number of points in the point cloud. This is done by
combining each 2x2 or 4x4 group of pixels in the original point cloud into one pixel in
a new point cloud. This downsample functionality is identical to the downsample method
on the PointCloud class. The averaging process reduces noise in the point cloud, but it
will not improve capture speed. To improve capture speed, consider using the subsampling
modes found in Settings/Sampling/Pixel.
Upsampling is used to increase the number of points in the point cloud. It is not possible
to upsample beyond the full resolution of the camera, so upsampling may only be used in
combination with the subsampling modes found in Settings/Sampling/Pixel. For example, one may
combine blueSubsample2x2 with upsample2x2 to obtain a point cloud that matches a full
resolution 2D capture, while retaining the speed benefits of capturing the point cloud with
blueSubsample2x2. Upsampling is achieved by expanding pixels in the original point cloud into
groups of 2x2 or 4x4 pixels in a new point cloud. Where possible, values are filled at the
new points based on an interpolation of the surrounding original points. The points in the
new point cloud that correspond to points in the original point cloud are left unchanged.
Note that upsampling will lead to four (upsample2x2) or sixteen (upsample4x4) times as many
pixels in the point cloud compared to no upsampling, so users should be aware of increased
computational cost related to copying and analyzing this data.
)description"
}

The description for this value.

◆ disabled

const Mode Zivid::Settings::Processing::Resampling::Mode::disabled
static

disabled

◆ downsample2x2

const Mode Zivid::Settings::Processing::Resampling::Mode::downsample2x2
static

downsample2x2

◆ downsample4x4

const Mode Zivid::Settings::Processing::Resampling::Mode::downsample4x4
static

downsample4x4

◆ name

constexpr const char* Zivid::Settings::Processing::Resampling::Mode::name { "Mode" }
staticconstexpr

The name of this value.

◆ nodeType

constexpr DataModel::NodeType Zivid::Settings::Processing::Resampling::Mode::nodeType = DataModel::NodeType::leafValue
staticconstexpr

The type of this node.

◆ path

constexpr const char* Zivid::Settings::Processing::Resampling::Mode::path { "Processing/Resampling/Mode" }
staticconstexpr

The full path for this value.

◆ upsample2x2

const Mode Zivid::Settings::Processing::Resampling::Mode::upsample2x2
static

upsample2x2

◆ upsample4x4

const Mode Zivid::Settings::Processing::Resampling::Mode::upsample4x4
static

upsample4x4


The documentation for this class was generated from the following file: