# VppConfig

This message is used to configure the
[NeuralAssistedStereo](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/neural_assisted_stereo.md) node. It
controls blending, patch sizing, injection parameters, and throughput limits for the Virtual Projection Pattern algorithm.

## Reference

### dai::VppConfig

Kind: class

VppConfig message. Carries config for Virtual Projection Pattern algorithm

#### dai::VppConfig::InjectionParameters

Kind: struct

##### bool useInjection

Kind: variable

##### int kernelSize

Kind: variable

##### float textureThreshold

Kind: variable

##### float confidenceThreshold

Kind: variable

##### int morphologyIterations

Kind: variable

##### bool useMorphology

Kind: variable

##### bool getUseInjection()

Kind: function

Check if injection is enabled False: all possible pixels will be used.

return: True if injection is used

##### void setUseInjection(bool value)

Kind: function

Enable or disable injection.

parameters: value: True to use injection, false to disable

##### int getKernelSize()

Kind: function

Get kernel size for injection.

return: Kernel size

##### void setKernelSize(int value)

Kind: function

Set kernel size for injection.

parameters: value: Kernel size to set

##### float getTextureThreshold()

Kind: function

Get texture threshold.

return: Texture threshold value

##### void setTextureThreshold(float value)

Kind: function

Set texture threshold.

parameters: value: Texture threshold to set

##### float getConfidenceThreshold()

Kind: function

Get confidence threshold.

return: Confidence threshold value

##### void setConfidenceThreshold(float value)

Kind: function

Set confidence threshold.

parameters: value: Confidence threshold to set

##### int getMorphologyIterations()

Kind: function

Get number of morphology iterations.

return: Number of iterations

##### void setMorphologyIterations(int value)

Kind: function

Set number of morphology iterations.

parameters: value: Number of iterations

##### bool isUseMorphology()

Kind: function

Check if morphology is used.

return: True if morphology is applied

##### void setUseMorphology(bool value)

Kind: function

Enable or disable morphology.

parameters: value: True to use morphology, false to disable

##### DEPTHAI_SERIALIZE(InjectionParameters, useInjection, kernelSize, textureThreshold, confidenceThreshold,
morphologyIterations, useMorphology)

Kind: function

#### int PatchColoringType

Kind: enum

##### RANDOM

Kind: enum_value

##### MAXDIST

Kind: enum_value

#### float blending

Kind: variable

#### float distanceGamma

Kind: variable

#### uint8_t maxPatchSize

Kind: variable

#### PatchColoringType patchColoringType

Kind: variable

#### bool uniformPatch

Kind: variable

#### InjectionParameters injectionParameters

Kind: variable

#### int maxNumThreads

Kind: variable

#### int maxFPS

Kind: variable

#### VppConfig()

Kind: function

#### ~VppConfig()

Kind: function

#### float getBlending()

Kind: function

Get blending factor between 0 and 1.

return: Current blending value

#### void setBlending(float value)

Kind: function

Set blending factor between 0 and 1: resulting pixel: patchColor * blending + (1 - blending) * imgFrame.

parameters: value: Blending value to set

#### float getDistanceGamma()

Kind: function

Get distance gamma.

return: Current distance gamma

#### void setDistanceGamma(float value)

Kind: function

Set distance gamma.

parameters: value: Distance gamma to set

#### uint8_t getMaxPatchSize()

Kind: function

Get maximum patch size.

return: Maximum patch size

#### void setMaxPatchSize(uint8_t value)

Kind: function

Set maximum patch size.

parameters: value: Patch size to set

#### PatchColoringType getPatchColoringType()

Kind: function

Get patch coloring type: UNIFORM/MAXDIST.

return: Current patch coloring type

#### void setPatchColoringType(PatchColoringType type)

Kind: function

Set patch coloring type: UNIFORM/MAXDIST.

parameters: type: Patch coloring type to set

#### bool getUniformPatch()

Kind: function

Check if uniform patching is enabled.

return: True if uniform patching is enabled

#### void setUniformPatch(bool value)

Kind: function

Enable or disable uniform patching.

parameters: value: True to enable, false to disable

#### InjectionParameters getInjectionParameters()

Kind: function

Get injection parameters.

return: Current injection parameters

#### void setInjectionParameters(const InjectionParameters & params)

Kind: function

Set injection parameters.

parameters: params: Injection parameters to set

#### int getMaxNumThreads()

Kind: function

Get maximum number of threads.

return: Maximum number of threads

#### void setMaxNumThreads(int value)

Kind: function

Set maximum number of threads.

parameters: value: Number of threads to set

#### int getMaxFPS()

Kind: function

Get maximum FPS.

return: Maximum FPS

#### void setMaxFPS(int value)

Kind: function

Set maximum FPS.

parameters: value: Maximum FPS to set

#### void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)

Kind: function

#### DEPTHAI_SERIALIZE(VppConfig, blending, distanceGamma, maxPatchSize, patchColoringType, uniformPatch, injectionParameters,
maxNumThreads, maxFPS)

Kind: function

### Need assistance?

Head over to [Discussion Forum](https://discuss.luxonis.com/) for technical support or any other questions you might have.
