ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
Toggle main menu visibility
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
8
namespace
reusex::vision::common::tensor
{
9
15
struct
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
)
27
:
bgrptr
(
bgrptr
),
width
(
width
),
height
(
height
) {}
28
};
29
33
Image
cvimg
(
const
cv::Mat &image);
34
35
}
// namespace reusex::vision::common::tensor
reusex::vision::common::tensor
Definition
image.hpp:8
reusex::vision::common::tensor::cvimg
Image cvimg(const cv::Mat &image)
Create an Image view that wraps an OpenCV Mat (zero-copy).
reusex::vision::common::tensor::Image
Lightweight, non-owning view of a BGR image buffer.
Definition
image.hpp:15
reusex::vision::common::tensor::Image::Image
Image(const void *bgrptr, int width, int height)
Construct from a raw pointer and explicit dimensions.
Definition
image.hpp:26
reusex::vision::common::tensor::Image::height
int height
Image height in pixels.
Definition
image.hpp:18
reusex::vision::common::tensor::Image::width
int width
Image width in pixels.
Definition
image.hpp:17
reusex::vision::common::tensor::Image::Image
Image()=default
reusex::vision::common::tensor::Image::bgrptr
const void * bgrptr
Pointer to the BGR pixel data (row-major).
Definition
image.hpp:16
libs
reusex
include
vision
common
image.hpp
Generated by
1.17.0