Volume Cartographer 2.27.0
AlignmentMarkerGenerator.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <vector>
6
8
9namespace volcart::texturing
10{
29{
30public:
32 struct LineSegment {
34 LineSegment() = default;
36 LineSegment(const cv::Vec3d& a, const cv::Vec3d& b, cv::Scalar c = 0);
37
39 cv::Vec3d a;
41 cv::Vec3d b;
43 cv::Scalar color;
44 };
45
47 void setInputMeshes(std::vector<TexturedMesh> m);
48
50 void setLineSegments(std::vector<LineSegment> r);
51
57 void setMarkerRadius(int r);
58
65
67 std::vector<cv::Mat> compute();
68
70 std::vector<cv::Mat> getMarkedImages() const;
71
72private:
74 std::vector<volcart::TexturedMesh> input_;
76 std::vector<LineSegment> lineSegments_;
82 std::vector<cv::Mat> output_;
83};
84
85} // namespace volcart::texturing
Add 2D alignment markers to textured meshes.
std::vector< cv::Mat > getMarkedImages() const
Get the computed marked images.
void setInputMeshes(std::vector< TexturedMesh > m)
Set the input textured meshes.
void setMarkerUseRandomColor(bool b)
If true, randomly assign a color to each marker.
std::vector< cv::Mat > compute()
Compute the marked images.
void setMarkerRadius(int r)
Set the radius, in pixels, of the drawn markers.
void setLineSegments(std::vector< LineSegment > r)
Set the marker intersection line segments.
Texturing and parameterization algorithms and utilities library.
LineSegment(const cv::Vec3d &a, const cv::Vec3d &b, cv::Scalar c=0)