retinify 0.2.0
Real-Time AI Stereo Vision Library
Loading...
Searching...
No Matches
pipeline.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2025 Sensui Yagi. All rights reserved.
2// SPDX-License-Identifier: Apache-2.0
3
4#pragma once
5
7#include "retinify/status.hpp"
8
9#include <array>
10#include <cstddef>
11#include <cstdint>
12
13namespace retinify
14{
17enum class PixelFormat : std::uint8_t
18{
21 GRAY8,
24 RGB8,
25};
26
29enum class DepthMode : std::uint8_t
30{
33 FAST,
40};
41
45{
46 public:
47 Pipeline() noexcept;
48 ~Pipeline() noexcept;
49 Pipeline(const Pipeline &) = delete;
50 auto operator=(const Pipeline &) noexcept -> Pipeline & = delete;
51 Pipeline(Pipeline &&) noexcept = delete;
52 auto operator=(Pipeline &&) noexcept -> Pipeline & = delete;
53
68 [[nodiscard]] auto Initialize(std::uint32_t imageWidth, std::uint32_t imageHeight, //
69 PixelFormat pixelFormat = PixelFormat::RGB8, DepthMode depthMode = DepthMode::ACCURATE, //
70 const CalibrationParameters &calibrationParameters = CalibrationParameters{}) noexcept -> Status;
71
88 [[nodiscard]] auto Run(const std::uint8_t *leftImageData, std::size_t leftImageStride, //
89 const std::uint8_t *rightImageData, std::size_t rightImageStride, //
90 float *disparityData, std::size_t disparityStride) noexcept -> Status;
91
92 private:
93 class Impl;
94 auto impl() noexcept -> Impl *;
95 [[nodiscard]] auto impl() const noexcept -> const Impl *;
96 static constexpr std::size_t BufferSize{2048};
97 alignas(alignof(std::max_align_t)) std::array<unsigned char, BufferSize> buffer_{};
98};
99} // namespace retinify
#define RETINIFY_API
Defines a macro for setting API visibility to "default" for the retinify library.
Definition attributes.hpp:8
A retinify::Pipeline provides an interface for running a stereo matching.
Definition pipeline.hpp:45
auto Run(const std::uint8_t *leftImageData, std::size_t leftImageStride, const std::uint8_t *rightImageData, std::size_t rightImageStride, float *disparityData, std::size_t disparityStride) noexcept -> Status
Executes the stereo matching pipeline using the given left and right image data.
Pipeline() noexcept
This class represents the status of an operation in the retinify library.
Definition status.hpp:43
Definition colormap.hpp:13
PixelFormat
The pixel format options for input images.
Definition pipeline.hpp:18
@ RGB8
8-bit 3ch, RGB format.
@ GRAY8
8-bit 1ch, Grayscale format.
DepthMode
The depth mode options for stereo matching pipeline.
Definition pipeline.hpp:30
@ BALANCED
Balanced, with moderate accuracy and speed.
@ ACCURATE
Most accurate, with slowest performance.
@ FAST
Fastest, with lowest accuracy.
Stereo camera calibration parameters.
Definition geometry.hpp:257