# NeuralAssistedStereo

NeuralAssistedStereo is a composite node that combines
[NeuralDepth](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/neural_depth.md) and
[StereoDepth](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/stereo_depth.md) to produce a fused depth
output using neural-assisted texture. For more information see [Neural Assisted Stereo blog
post](https://discuss.luxonis.com/blog/6656-neural-assisted-stereo-classical-stereo-enhanced-by-neural-depth).

> NeuralAssistedStereo can only run on
> **RVC4**
> devices and requires
> **depthai 3.3.0 or newer**
> .

## How to place it

#### Python

```python
pipeline = dai.Pipeline()

nas = pipeline.create(dai.node.NeuralAssistedStereo)
nas.build(left_output, right_output, neuralModel=dai.DeviceModelZoo.NEURAL_DEPTH_NANO)
```

#### C++

```cpp
dai::Pipeline pipeline;

auto nas = pipeline.create<dai::node::NeuralAssistedStereo>();
nas->build(*leftOutput, *rightOutput, dai::DeviceModelZoo::NEURAL_DEPTH_NANO);
```

## Inputs and Outputs

## Examples of functionality

 * [Neural Assisted Stereo](https://docs.luxonis.com/software-v3/depthai/examples/stereo_depth/neural_assisted_stereo.md)

## Configuration

With NeuralAssistedStereo you can configure which neural model is used. See
[models](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/neural_depth.md). The default model is
NEURAL_DEPTH_NANO. Using other models is an experimental feature and testing is still underway so there may be some unexpected
behavior.

## Reference

### dai::node::NeuralAssistedStereo

Kind: class

NeuralAssistedStereo node. Combines Neural Depth with VPP and traditional Stereo Depth.

This composite node internally creates and connects: Rectification node (full resolution); NeuralDepth node (low resolution depth
estimation); VPP node (applies virtual projection pattern); StereoDepth node (final depth computation on VPP-enhanced images)
Pipeline structure: Left/Right Cameras → Rectification → [Full res to VPP] ↓ NeuralDepth (low res) → [disparity + confidence to
VPP] ↓ VPP (combines neural depth with full res images) ↓ StereoDepth → Final Depth Output

#### Node::Input Input

Kind: enum

#### Node::Output Output

Kind: enum

#### Subnode < node::Rectification > rectification

Kind: variable

#### Subnode < node::NeuralDepth > neuralDepth

Kind: variable

#### Subnode < node::Vpp > vpp

Kind: variable

#### Subnode < node::StereoDepth > stereoDepth

Kind: variable

#### Input & left

Kind: variable

#### Input & right

Kind: variable

#### Output & rectifiedLeft

Kind: variable

#### Output & rectifiedRight

Kind: variable

#### Output & vppLeft

Kind: variable

#### Output & vppRight

Kind: variable

#### Output & neuralDisparity

Kind: variable

#### Output & neuralConfidence

Kind: variable

#### Input & inputVppConfig

Kind: variable

#### Input & inputStereoConfig

Kind: variable

#### Input & inputNeuralConfig

Kind: variable

#### Output & depth

Kind: variable

#### Output & disparity

Kind: variable

#### ~NeuralAssistedStereo()

Kind: function

#### NeuralAssistedStereo(const std::shared_ptr< Device > & device)

Kind: function

#### std::shared_ptr< NeuralAssistedStereo > build(Output & leftInput, Output & rightInput, DeviceModelZoo neuralModel, bool
rectifyImages)

Kind: function
