ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
TrainingViews.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Povl Filip Sonne-Frederiksen
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#pragma once
6
7#include <Eigen/Core>
8#include <opencv2/core.hpp>
9
10#include <cstddef>
11#include <string>
12#include <vector>
13
14namespace reusex {
15class ProjectDB;
16}
17
18namespace reusex::gsplat {
19
27 int id = -1;
28 std::string name;
29 cv::Mat image;
30 Eigen::Matrix3d K;
31 Eigen::Matrix4d T_cw = Eigen::Matrix4d::Identity();
32 bool from_panorama = false;
33
34 int width() const { return image.cols; }
35 int height() const { return image.rows; }
36};
37
40 bool include_frames = true;
41
47 int pano_n_yaw = 8;
48 double pano_fov_deg = 90.0;
49 int pano_tile = 1024;
50
53 int frame_stride = 1;
54
60 int first_frame = -1;
61 int last_frame = -1;
62
67
69 std::size_t max_views = 0;
70};
71
84std::vector<TrainingView>
86
87} // namespace reusex::gsplat
std::vector< TrainingView > load_training_views(const ProjectDB &db, const TrainingViewOptions &opt={})
Load posed training views from a project.
Selection and preprocessing knobs for building the training set.
int pano_n_yaw
equator slices per panorama
int max_image_size
Downscale images (and intrinsics) so the long edge is at most this many pixels.
int frame_stride
Take every Nth sensor frame.
double pano_fov_deg
per-slice horizontal FOV [deg]
int first_frame
Inclusive sensor-frame node-id range, -1 for unbounded.
std::size_t max_views
Hard cap on the number of views (0 = unlimited), applied after striding.
int pano_tile
slice size [px, square]
bool include_panorama_slices
Also dice content-aligned 360 panoramas into overlapping tangent views.
One posed training image for the Gaussian-splatting optimizer.
Eigen::Matrix3d K
pinhole intrinsics for image
std::string name
human-readable label, e.g. "frame_0001995"
Eigen::Matrix4d T_cw
world -> camera
cv::Mat image
BGR8, exactly the resolution K describes.
bool from_panorama
true when this is a 360 tangent slice