ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
Toggle main menu visibility
Loading...
Searching...
No Matches
segment_panorama.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
// SAM3-on-360: segment an equirectangular panorama by tiling it into
6
// perspective (pinhole) views the segmenter consumes at its native
7
// resolution, running the UNMODIFIED SAM3 model on each tile, and stitching
8
// the per-tile CV_32S label maps back into one equirect label image.
9
//
10
// This reuses geometry::overlapping_views / stitch_labels_to_equirect for the
11
// spherical geometry and the tensor_rt SAM3 forward() path for inference; it
12
// does not reimplement either.
13
14
#pragma once
15
16
#include "reusex/vision/IModel.hpp"
17
18
#include <opencv2/core.hpp>
19
20
#include <string>
21
#include <vector>
22
23
namespace
reusex::vision
{
24
26
struct
SegmentPanoramaOptions
{
27
int
n_yaw
= 8;
28
double
fov_deg
= 90.0;
29
int
tile
= 1008;
30
float
confidence
= 0.5f;
32
std::vector<std::string>
prompts
;
33
};
34
43
cv::Mat
segment_panorama
(
IModel
&model,
const
cv::Mat &equirect_bgr,
44
const
SegmentPanoramaOptions
&opts);
45
46
}
// namespace reusex::vision
reusex::vision::IModel
Definition
IModel.hpp:14
reusex::vision
Definition
annotate.hpp:12
reusex::vision::segment_panorama
cv::Mat segment_panorama(IModel &model, const cv::Mat &equirect_bgr, const SegmentPanoramaOptions &opts)
Segment a 360 equirectangular panorama with a SAM3 model.
reusex::vision::SegmentPanoramaOptions
Options controlling how a panorama is tiled and segmented.
Definition
segment_panorama.hpp:26
reusex::vision::SegmentPanoramaOptions::prompts
std::vector< std::string > prompts
Text prompts (one class each). Empty => use the SAM3 default prompt list.
Definition
segment_panorama.hpp:32
reusex::vision::SegmentPanoramaOptions::fov_deg
double fov_deg
per-tile horizontal FOV (overlap hides seams)
Definition
segment_panorama.hpp:28
reusex::vision::SegmentPanoramaOptions::confidence
float confidence
detection confidence threshold
Definition
segment_panorama.hpp:30
reusex::vision::SegmentPanoramaOptions::n_yaw
int n_yaw
number of equator tiles around the sphere
Definition
segment_panorama.hpp:27
reusex::vision::SegmentPanoramaOptions::tile
int tile
tile size in px (matches SAM3 native input)
Definition
segment_panorama.hpp:29
libs
reusex
include
vision
segment_panorama.hpp
Generated by
1.17.0