# Depth

This example demonstrates the [Depth](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/depth.md) node. With
default settings (`Algorithm.AUTO`), the node picks the best depth backend for your device — NeuralDepth on RVC4, ToF or
StereoDepth elsewhere — and visualizes both `depth` and `confidence` outputs.

Use CLI flags to exercise `build()` overloads: FPS-only, algorithm + FPS/resolution, or a pinned algorithm + config pair.

This example requires the DepthAI v3 API, see [installation instructions](https://docs.luxonis.com/software-v3/depthai.md).

## What it shows

 * Creating a `Depth` node with `AUTO` backend selection
 * Reading `getResolvedAlgorithm()` and `getResolvedConfig()` after wiring
 * Optional `--fps`, `--width`/`--height`, `--algorithm`, and `--config` CLI configuration
 * Optional `--user-cameras` to pre-build stereo Camera nodes that Depth reuses

## Source code

#### Python

```python
#!/usr/bin/env python3
"""
Unified Depth node demo.

The Depth node picks an algorithm and backend config automatically from the connected device,
target FPS, and/or stereo resolution (Algorithm.AUTO). You can also pin the algorithm yourself
via CLI or Depth.build().

Supported algorithms: AUTO, STEREO, NEURAL, NEURAL_ASSISTED_STEREO, TOF, GPU_STEREO.

Configure the node via CLI to exercise Depth.build() overloads (fps-only, algorithm + fps/res,
algorithm + config) or pre-built user stereo cameras.
"""

from __future__ import annotations

import argparse
import sys

import cv2
import depthai as dai
import numpy as np

_COLOR_MAP = cv2.applyColorMap(np.arange(256, dtype=np.uint8), cv2.COLORMAP_JET)
_COLOR_MAP[0] = [0, 0, 0]

_ALGORITHM_CHOICES = {
    "auto": dai.node.Depth.Algorithm.AUTO,
    "stereo": dai.node.Depth.Algorithm.STEREO,
    "neural": dai.node.Depth.Algorithm.NEURAL,
    "neural_assisted_stereo": dai.node.Depth.Algorithm.NEURAL_ASSISTED_STEREO,
    "tof": dai.node.Depth.Algorithm.TOF,
    "gpu_stereo": dai.node.Depth.Algorithm.GPU_STEREO,
}

def colorizeDepth(frameDepth: np.ndarray) -> np.ndarray:
    """Log-scaled depth colorization with adaptive 3rd..95th percentile clipping (zero = invalid)."""
    invalidMask = frameDepth == 0
    try:
        minDepth = np.percentile(frameDepth[frameDepth != 0], 3)
        maxDepth = np.percentile(frameDepth[frameDepth != 0], 95)
        logDepth = np.log(frameDepth, where=frameDepth != 0)
        logMinDepth = np.log(minDepth)
        logMaxDepth = np.log(maxDepth)
        np.nan_to_num(logDepth, copy=False, nan=logMinDepth)
        logDepth = np.clip(logDepth, logMinDepth, logMaxDepth)

        depthFrameColor = np.interp(logDepth, (logMinDepth, logMaxDepth), (0, 255))
        depthFrameColor = np.nan_to_num(depthFrameColor).astype(np.uint8)
        depthFrameColor = cv2.applyColorMap(depthFrameColor, cv2.COLORMAP_JET)
        depthFrameColor[invalidMask] = 0
    except IndexError:
        depthFrameColor = np.zeros((frameDepth.shape[0], frameDepth.shape[1], 3), dtype=np.uint8)
    return depthFrameColor

def colorizeConfidence(frame: np.ndarray) -> np.ndarray:
    if frame.dtype == np.uint16:
        vmax = int(np.max(frame))
        if vmax <= 0:
            return np.zeros((*frame.shape, 3), dtype=np.uint8)
        vis = ((frame.astype(np.float32) / vmax) * 255).astype(np.uint8)
    else:
        vis = frame
    return cv2.applyColorMap(vis, _COLOR_MAP)

def parseConfig(name: str):
    if hasattr(dai.DeviceModelZoo, name):
        return getattr(dai.DeviceModelZoo, name)
    if hasattr(dai.node.StereoDepth.PresetMode, name):
        return getattr(dai.node.StereoDepth.PresetMode, name)
    raise argparse.ArgumentTypeError(
        f"Unknown config '{name}'. Use a DeviceModelZoo name (e.g. NEURAL_DEPTH_LARGE) "
        "or StereoDepth.PresetMode name (e.g. DEFAULT)."
    )

def sizeFromArgs(args: argparse.Namespace) -> tuple[int, int] | None:
    if args.width is None and args.height is None:
        return None
    if args.width is None or args.height is None:
        raise argparse.ArgumentTypeError("--width and --height must be specified together")
    return args.width, args.height

def buildUserStereoCameras(pipeline: dai.Pipeline, args: argparse.Namespace) -> None:
    device = pipeline.getDefaultDevice()
    if device is None:
        raise RuntimeError("Connect a device (host-only pipeline cannot use Depth).")

    stereoPairs = device.getStereoPairs()
    if not stereoPairs:
        raise RuntimeError("This device has no stereo pair; Depth cannot run.")

    stereoPair = stereoPairs[0]
    size = sizeFromArgs(args)
    pipeline.create(dai.node.Camera).build(stereoPair.left, size, args.fps)
    pipeline.create(dai.node.Camera).build(stereoPair.right, size, args.fps)

def configureDepth(depthNode: dai.node.Depth, args: argparse.Namespace) -> None:
    fps = None if args.userCameras else args.fps
    size = None if args.userCameras else sizeFromArgs(args)
    algorithm = _ALGORITHM_CHOICES[args.algorithm] if args.algorithm is not None else None
    config = parseConfig(args.config) if args.config is not None else None

    if algorithm is not None and config is not None:
        depthNode.build(algorithm, config, fps=fps, size=size)
    elif algorithm is not None:
        depthNode.build(algorithm, fps=fps, size=size)
    elif fps is not None and size is not None:
        depthNode.build(dai.node.Depth.Algorithm.AUTO, fps=fps, size=size)
    elif fps is not None:
        depthNode.build(fps=fps)
    elif size is not None:
        depthNode.build(dai.node.Depth.Algorithm.AUTO, size=size)

def buildParser() -> argparse.ArgumentParser:
    parser = argparse.ArgumentParser(
        description=__doc__,
        formatter_class=argparse.RawDescriptionHelpFormatter,
        epilog="""\
Examples:
  %(prog)s
  %(prog)s --fps 30
  %(prog)s --width 640 --height 480
  %(prog)s --algorithm neural --config NEURAL_DEPTH_LARGE --fps 8
  %(prog)s --algorithm stereo --config DEFAULT --fps 20
  %(prog)s --user-cameras --width 1280 --height 800 --fps 30
  %(prog)s --ip 192.168.1.10
""",
    )
    parser.add_argument(
        "--ip",
        metavar="ADDR",
        default=None,
        help="Device IP for TCP/IP (e.g. PoE). If omitted, the default device search is used (often first USB).",
    )
    parser.add_argument("--fps", type=float, default=None, help="Stereo camera FPS for Depth.build() or user cameras")
    parser.add_argument("--width", type=int, default=None, help="Stereo frame width (requires --height)")
    parser.add_argument("--height", type=int, default=None, help="Stereo frame height (requires --width)")
    parser.add_argument(
        "--algorithm",
        choices=sorted(_ALGORITHM_CHOICES.keys()),
        default=None,
        help="Depth backend selection (default: AUTO when omitted)",
    )
    parser.add_argument(
        "--config",
        type=parseConfig,
        default=None,
        metavar="NAME",
        help="Algorithm config: DeviceModelZoo (NEURAL*) or StereoDepth.PresetMode (DEFAULT, ...)",
    )
    parser.add_argument(
        "--user-cameras",
        dest="userCameras",
        action="store_true",
        help="Pre-build stereo Camera nodes; fps/res come from args instead of Depth.build()",
    )
    return parser

def main() -> int:
    parser = buildParser()
    args = parser.parse_args()

    try:
        sizeFromArgs(args)
    except argparse.ArgumentTypeError as exc:
        parser.error(str(exc))

    if args.config is not None and args.algorithm is None:
        parser.error("--config requires --algorithm")

    if args.ip:
        device = dai.Device(dai.DeviceInfo(args.ip))
        pipeline = dai.Pipeline(device)
    else:
        pipeline = dai.Pipeline()

    if args.userCameras:
        buildUserStereoCameras(pipeline, args)

    depthNode = pipeline.create(dai.node.Depth)
    configureDepth(depthNode, args)

    depthQueue = depthNode.depth.createOutputQueue()
    confidenceQueue = depthNode.confidence.createOutputQueue()

    pipeline.build()

    print("Resolved algorithm:", depthNode.getResolvedAlgorithm())
    print("Resolved config:", depthNode.getResolvedConfig())

    with pipeline:
        pipeline.start()
        while pipeline.isRunning():
            depthFrame = depthQueue.get()
            assert isinstance(depthFrame, dai.ImgFrame)
            cv2.imshow("depth", colorizeDepth(depthFrame.getFrame()))

            confidenceFrame = confidenceQueue.get()
            assert isinstance(confidenceFrame, dai.ImgFrame)
            cv2.imshow("confidence", colorizeConfidence(confidenceFrame.getFrame()))

            if cv2.waitKey(1) == ord("q"):
                pipeline.stop()
                break

        cv2.destroyAllWindows()

    return 0

if __name__ == "__main__":
    sys.exit(main())
```

#### C++

```cpp
/**
 * Unified Depth node demo.
 *
 * The Depth node picks an algorithm and backend config automatically from the connected device,
 * target FPS, and/or stereo resolution (Algorithm::AUTO). You can also pin the algorithm yourself
 * via CLI or Depth::build().
 *
 * Supported algorithms: AUTO, STEREO, NEURAL, NEURAL_ASSISTED_STEREO, TOF, GPU_STEREO.
 *
 * Configure the node via CLI to exercise Depth::build() overloads (fps-only, algorithm + fps/res,
 * algorithm + config) or pre-built user stereo cameras.
 */
#include <algorithm>
#include <argparse/argparse.hpp>
#include <cstdlib>
#include <iostream>
#include <map>
#include <opencv2/opencv.hpp>
#include <optional>
#include <string>
#include <utility>
#include <variant>
#include <vector>

#include "depthai/common/DeviceModelZoo.hpp"
#include "depthai/depthai.hpp"
#include "depthai/pipeline/node/Camera.hpp"
#include "depthai/pipeline/node/Depth.hpp"
#include "depthai/pipeline/node/StereoDepth.hpp"

namespace {

cv::Mat colorizeDepth(const cv::Mat& frameDepth) {
    if(frameDepth.empty() || frameDepth.channels() != 1) {
        return cv::Mat::zeros(frameDepth.size(), CV_8UC3);
    }

    cv::Mat depth32f;
    frameDepth.convertTo(depth32f, CV_32F);

    const cv::Mat nonZeroMask = depth32f != 0.0f;
    const int nz = cv::countNonZero(nonZeroMask);
    if(nz == 0) {
        return cv::Mat::zeros(frameDepth.size(), CV_8UC3);
    }

    std::vector<float> values;
    values.reserve(static_cast<size_t>(nz));
    for(int r = 0; r < depth32f.rows; ++r) {
        const float* d = depth32f.ptr<float>(r);
        const uchar* m = nonZeroMask.ptr<uchar>(r);
        for(int c = 0; c < depth32f.cols; ++c) {
            if(m[c]) {
                values.push_back(d[c]);
            }
        }
    }

    std::sort(values.begin(), values.end());
    auto pct = [&](double p) {
        const size_t idx = static_cast<size_t>(std::round((p / 100.0) * (values.size() - 1)));
        return values[idx];
    };

    const float minDepth = pct(3.0);
    const float maxDepth = pct(95.0);

    cv::Mat logDepth;
    depth32f.copyTo(logDepth);
    logDepth.setTo(minDepth, ~nonZeroMask);
    cv::log(logDepth, logDepth);

    const float logMinDepth = std::log(minDepth);
    const float logMaxDepth = std::log(maxDepth);

    cv::min(logDepth, logMaxDepth, logDepth);
    cv::max(logDepth, logMinDepth, logDepth);
    logDepth = (logDepth - logMinDepth) * (255.0f / (logMaxDepth - logMinDepth));

    cv::Mat depth8U;
    logDepth.convertTo(depth8U, CV_8U);

    cv::Mat depthFrameColor;
    cv::applyColorMap(depth8U, depthFrameColor, cv::COLORMAP_JET);
    depthFrameColor.setTo(cv::Scalar::all(0), ~nonZeroMask);
    return depthFrameColor;
}

cv::Mat colorizeConfidence(const cv::Mat& frame) {
    if(frame.empty() || frame.channels() != 1) {
        return cv::Mat::zeros(frame.size(), CV_8UC3);
    }

    cv::Mat normalized;
    if(frame.depth() == CV_16U) {
        double maxValue = 0.0;
        cv::minMaxLoc(frame, nullptr, &maxValue);
        if(maxValue <= 0.0) {
            return cv::Mat::zeros(frame.size(), CV_8UC3);
        }
        cv::Mat scaled;
        frame.convertTo(scaled, CV_32F, 255.0 / maxValue);
        scaled.convertTo(normalized, CV_8U);
    } else {
        frame.convertTo(normalized, CV_8U);
    }

    cv::Mat colorized;
    cv::applyColorMap(normalized, colorized, cv::COLORMAP_JET);
    return colorized;
}

const std::map<std::string, dai::node::Depth::Algorithm>& algorithmMap() {
    static const std::map<std::string, dai::node::Depth::Algorithm> map = {
        {"auto", dai::node::Depth::Algorithm::AUTO},
        {"stereo", dai::node::Depth::Algorithm::STEREO},
        {"neural", dai::node::Depth::Algorithm::NEURAL},
        {"neural_assisted_stereo", dai::node::Depth::Algorithm::NEURAL_ASSISTED_STEREO},
        {"tof", dai::node::Depth::Algorithm::TOF},
        {"gpu_stereo", dai::node::Depth::Algorithm::GPU_STEREO},
    };
    return map;
}

const char* algorithmName(dai::node::Depth::Algorithm algorithm) {
    for(const auto& [name, value] : algorithmMap()) {
        if(value == algorithm) {
            return name.c_str();
        }
    }
    return "unknown";
}

std::optional<dai::node::Depth::Algorithm> parseAlgorithm(const std::string& name) {
    const auto it = algorithmMap().find(name);
    if(it == algorithmMap().end()) {
        return std::nullopt;
    }
    return it->second;
}

std::optional<dai::node::Depth::Config> parseConfig(const std::string& name) {
    static const std::map<std::string, dai::DeviceModelZoo> modelMap = {
        {"NEURAL_DEPTH_1248X780", dai::DeviceModelZoo::NEURAL_DEPTH_1248X780},
        {"NEURAL_DEPTH_768X480", dai::DeviceModelZoo::NEURAL_DEPTH_768X480},
        {"NEURAL_DEPTH_576X360", dai::DeviceModelZoo::NEURAL_DEPTH_576X360},
        {"NEURAL_DEPTH_480X300", dai::DeviceModelZoo::NEURAL_DEPTH_480X300},
        {"NEURAL_DEPTH_384X240", dai::DeviceModelZoo::NEURAL_DEPTH_384X240},
        {"NEURAL_DEPTH_1056X660", dai::DeviceModelZoo::NEURAL_DEPTH_1056X660},
        {"NEURAL_DEPTH_960X600", dai::DeviceModelZoo::NEURAL_DEPTH_960X600},
        {"NEURAL_DEPTH_864X540", dai::DeviceModelZoo::NEURAL_DEPTH_864X540},
        {"NEURAL_DEPTH_288X180", dai::DeviceModelZoo::NEURAL_DEPTH_288X180},
        {"NEURAL_DEPTH_192X120", dai::DeviceModelZoo::NEURAL_DEPTH_192X120},
        {"NEURAL_DEPTH_EXTRA_LARGE", dai::DeviceModelZoo::NEURAL_DEPTH_EXTRA_LARGE},
        {"NEURAL_DEPTH_LARGE", dai::DeviceModelZoo::NEURAL_DEPTH_LARGE},
        {"NEURAL_DEPTH_MEDIUM", dai::DeviceModelZoo::NEURAL_DEPTH_MEDIUM},
        {"NEURAL_DEPTH_SMALL", dai::DeviceModelZoo::NEURAL_DEPTH_SMALL},
        {"NEURAL_DEPTH_NANO", dai::DeviceModelZoo::NEURAL_DEPTH_NANO},
    };
    static const std::map<std::string, dai::node::StereoDepth::PresetMode> presetMap = {
        {"FAST_ACCURACY", dai::node::StereoDepth::PresetMode::FAST_ACCURACY},
        {"FAST_DENSITY", dai::node::StereoDepth::PresetMode::FAST_DENSITY},
        {"DEFAULT", dai::node::StereoDepth::PresetMode::DEFAULT},
        {"FACE", dai::node::StereoDepth::PresetMode::FACE},
        {"HIGH_DETAIL", dai::node::StereoDepth::PresetMode::HIGH_DETAIL},
        {"ROBOTICS", dai::node::StereoDepth::PresetMode::ROBOTICS},
        {"DENSITY", dai::node::StereoDepth::PresetMode::DENSITY},
        {"ACCURACY", dai::node::StereoDepth::PresetMode::ACCURACY},
    };

    if(const auto modelIt = modelMap.find(name); modelIt != modelMap.end()) {
        return dai::node::Depth::Config{modelIt->second};
    }
    if(const auto presetIt = presetMap.find(name); presetIt != presetMap.end()) {
        return dai::node::Depth::Config{presetIt->second};
    }
    return std::nullopt;
}

struct CliOptions {
    std::string ip;
    std::optional<float> fps;
    std::optional<uint32_t> width;
    std::optional<uint32_t> height;
    std::optional<std::string> algorithm;
    std::optional<std::string> config;
    bool userCameras{false};
};

std::optional<std::pair<uint32_t, uint32_t>> sizeFromOptions(const CliOptions& options) {
    if(!options.width && !options.height) {
        return std::nullopt;
    }
    if(!options.width || !options.height) {
        throw std::runtime_error("--width and --height must be specified together");
    }
    return std::make_pair(*options.width, *options.height);
}

void buildUserStereoCameras(dai::Pipeline& pipeline, const CliOptions& options) {
    const auto device = pipeline.getDefaultDevice();
    if(device == nullptr) {
        throw std::runtime_error("Connect a device (host-only pipeline cannot use Depth).");
    }

    const auto stereoPairs = device->getStereoPairs();
    if(stereoPairs.empty()) {
        throw std::runtime_error("This device has no stereo pair; Depth cannot run.");
    }

    const auto stereoPair = stereoPairs[0];
    const auto size = sizeFromOptions(options);
    const std::optional<float> fps = options.fps;

    pipeline.create<dai::node::Camera>()->build(stereoPair.left, size, fps);
    pipeline.create<dai::node::Camera>()->build(stereoPair.right, size, fps);
}

void configureDepth(const std::shared_ptr<dai::node::Depth>& depth, const CliOptions& options) {
    const auto fps = options.userCameras ? std::nullopt : options.fps;
    const auto size = options.userCameras ? std::nullopt : sizeFromOptions(options);
    const auto algorithm = options.algorithm ? parseAlgorithm(*options.algorithm) : std::nullopt;
    const auto config = options.config ? parseConfig(*options.config) : std::nullopt;

    if(options.algorithm && !algorithm) {
        throw std::runtime_error("Invalid --algorithm value");
    }
    if(options.config && !config) {
        throw std::runtime_error("Unknown --config value. Use a DeviceModelZoo or StereoDepth.PresetMode name.");
    }

    if(algorithm && config) {
        depth->build(*algorithm, *config, fps, size);
    } else if(algorithm) {
        depth->build(*algorithm, fps, size);
    } else if(fps && size) {
        depth->build(dai::node::Depth::Algorithm::AUTO, *fps, size);
    } else if(fps) {
        depth->build(*fps);
    } else if(size) {
        depth->build(dai::node::Depth::Algorithm::AUTO, std::nullopt, size);
    }
}

void printResolvedConfig(const dai::node::Depth::Config& config) {
    std::visit(
        [](const auto& value) {
            using T = std::decay_t<decltype(value)>;
            if constexpr(std::is_same_v<T, std::monostate>) {
                std::cout << "none";
            } else if constexpr(std::is_same_v<T, dai::DeviceModelZoo>) {
                std::cout << static_cast<int>(value);
            } else {
                std::cout << static_cast<int>(value);
            }
        },
        config);
    std::cout << std::endl;
}

dai::Pipeline makePipeline(const CliOptions& options) {
    if(options.ip.empty()) {
        return dai::Pipeline();
    }
    auto device = std::make_shared<dai::Device>(dai::DeviceInfo(options.ip));
    return dai::Pipeline(device);
}

}  // namespace

int main(int argc, char** argv) {
    argparse::ArgumentParser program("unified_depth", "1.0.0");
    program.add_description(
        "Unified Depth node demo.\n\n"
        "The Depth node picks an algorithm and backend config automatically from the connected device, "
        "target FPS, and/or stereo resolution (Algorithm::AUTO). You can also pin the algorithm yourself "
        "via CLI or Depth::build().\n\n"
        "Supported algorithms: AUTO, STEREO, NEURAL, NEURAL_ASSISTED_STEREO, TOF, GPU_STEREO.\n\n"
        "Configure the node via CLI to exercise Depth::build() overloads (fps-only, algorithm + fps/res, "
        "algorithm + config) or pre-built user stereo cameras.");
    program.add_argument("--ip").default_value(std::string("")).help("Device IP for TCP/IP (e.g. PoE)");
    program.add_argument("--fps").scan<'g', float>().help("Stereo camera FPS for Depth.build() or user cameras");
    program.add_argument("--width").scan<'u', uint32_t>().help("Stereo frame width (requires --height)");
    program.add_argument("--height").scan<'u', uint32_t>().help("Stereo frame height (requires --width)");
    program.add_argument("--algorithm").help("Depth backend: auto, stereo, neural, neural_assisted_stereo, tof, gpu_stereo");
    program.add_argument("--config").help("DeviceModelZoo (NEURAL_*) or StereoDepth.PresetMode (DEFAULT, ...)");
    program.add_argument("--user-cameras").flag().help("Pre-build stereo Camera nodes instead of using Depth.build() for fps/res");

    try {
        program.parse_args(argc, argv);
    } catch(const std::runtime_error& err) {
        std::cerr << err.what() << '\n';
        std::cerr << program;
        return EXIT_FAILURE;
    }

    CliOptions options{};
    options.ip = program.get<std::string>("--ip");
    if(program.is_used("--fps")) {
        options.fps = program.get<float>("--fps");
    }
    if(program.is_used("--width")) {
        options.width = program.get<uint32_t>("--width");
    }
    if(program.is_used("--height")) {
        options.height = program.get<uint32_t>("--height");
    }
    if(program.is_used("--algorithm")) {
        options.algorithm = program.get<std::string>("--algorithm");
    }
    if(program.is_used("--config")) {
        options.config = program.get<std::string>("--config");
    }
    options.userCameras = program.get<bool>("--user-cameras");

    if(options.config && !options.algorithm) {
        std::cerr << "--config requires --algorithm\n";
        return EXIT_FAILURE;
    }

    try {
        sizeFromOptions(options);
    } catch(const std::runtime_error& err) {
        std::cerr << err.what() << '\n';
        return EXIT_FAILURE;
    }

    try {
        dai::Pipeline pipeline = makePipeline(options);

        if(options.userCameras) {
            buildUserStereoCameras(pipeline, options);
        }

        auto depthNode = pipeline.create<dai::node::Depth>();
        configureDepth(depthNode, options);

        auto depthQueue = depthNode->depth().createOutputQueue();
        auto confidenceQueue = depthNode->confidence().createOutputQueue();

        pipeline.build();

        std::cout << "Resolved algorithm: " << algorithmName(depthNode->getResolvedAlgorithm()) << std::endl;
        std::cout << "Resolved config: ";
        printResolvedConfig(depthNode->getResolvedConfig());

        pipeline.start();

        while(pipeline.isRunning()) {
            auto depthFrame = depthQueue->get<dai::ImgFrame>();
            auto confidenceFrame = confidenceQueue->get<dai::ImgFrame>();

            if(depthFrame != nullptr) {
                cv::imshow("depth", colorizeDepth(depthFrame->getFrame()));
            }
            if(confidenceFrame != nullptr) {
                cv::imshow("confidence", colorizeConfidence(confidenceFrame->getFrame()));
            }

            if(cv::waitKey(1) == 'q') {
                pipeline.stop();
                break;
            }
        }

        cv::destroyAllWindows();
    } catch(const std::exception& ex) {
        std::cerr << ex.what() << '\n';
        return EXIT_FAILURE;
    }

    return EXIT_SUCCESS;
}
```

## Similar samples

 * [Stereo Depth](https://docs.luxonis.com/software-v3/depthai/examples/stereo_depth/stereo_depth.md) — Classical stereo depth
   with full configuration surface.
 * [Neural Depth Minimal](https://docs.luxonis.com/software-v3/depthai/examples/neural_depth/neural_depth_minimal.md) — Direct
   NeuralDepth usage on RVC4.
 * [GPUStereo](https://docs.luxonis.com/software-v3/depthai/examples/stereo_depth/gpu_stereo.md) — GPU-accelerated stereo on RVC4.

### Need assistance?

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