ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
image.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 Povl Filip Sonne-Frederiksen
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#pragma once
6#include <opencv2/opencv.hpp>
7
9
15struct Image {
16 const void *bgrptr = nullptr;
17 int width = 0;
18 int height = 0;
19
20 Image() = default;
21
26 Image(const void *bgrptr, int width, int height)
28};
29
33Image cvimg(const cv::Mat &image);
34
35} // namespace reusex::vision::common::tensor
Image cvimg(const cv::Mat &image)
Create an Image view that wraps an OpenCV Mat (zero-copy).
Lightweight, non-owning view of a BGR image buffer.
Definition image.hpp:15
Image(const void *bgrptr, int width, int height)
Construct from a raw pointer and explicit dimensions.
Definition image.hpp:26
int height
Image height in pixels.
Definition image.hpp:18
int width
Image width in pixels.
Definition image.hpp:17
const void * bgrptr
Pointer to the BGR pixel data (row-major).
Definition image.hpp:16