Volume Cartographer 2.27.0
Classes | Public Member Functions | Private Attributes | List of all members
volcart::texturing::AlignmentMarkerGenerator Class Reference

Add 2D alignment markers to textured meshes. More...

#include <vc/texturing/AlignmentMarkerGenerator.hpp>

Classes

struct  LineSegment
 Defines a marker intersection line segment. More...
 

Public Member Functions

void setInputMeshes (std::vector< TexturedMesh > m)
 Set the input textured meshes.
 
void setLineSegments (std::vector< LineSegment > r)
 Set the marker intersection line segments.
 
void setMarkerRadius (int r)
 Set the radius, in pixels, of the drawn markers. More...
 
void setMarkerUseRandomColor (bool b)
 If true, randomly assign a color to each marker. More...
 
std::vector< cv::Mat > compute ()
 Compute the marked images.
 
std::vector< cv::Mat > getMarkedImages () const
 Get the computed marked images.
 

Private Attributes

std::vector< volcart::TexturedMeshinput_
 
std::vector< LineSegmentlineSegments_
 
int markerRadius_ {5}
 
bool markerRandomColor_ {true}
 
std::vector< cv::Mat > output_
 

Detailed Description

Add 2D alignment markers to textured meshes.

Takes as input a list of textured meshes and a list of alignment line segments. The line segments are assumed to pass through one or more of the textured meshes. The intersection points between all segments and meshes are computed, and a colored circle is drawn on the texture images at the point of each intersection. Returns a new set of texture images, modified with the colored alignment markers.

Note
Output images will be 8bpc and 3-channel (BGR)
Warning
Line segments do not have to be parallel to each other, nor do they have to be perpendicular to the surfaces of the meshes. Improperly setting the position of segment end points can result in alignment markers that make no sense.

Definition at line 28 of file AlignmentMarkerGenerator.hpp.

Member Function Documentation

◆ setMarkerRadius()

void volcart::texturing::AlignmentMarkerGenerator::setMarkerRadius ( int  r)

Set the radius, in pixels, of the drawn markers.

Default value: 5

◆ setMarkerUseRandomColor()

void volcart::texturing::AlignmentMarkerGenerator::setMarkerUseRandomColor ( bool  b)

If true, randomly assign a color to each marker.

Default: true

Member Data Documentation

◆ input_

std::vector<volcart::TexturedMesh> volcart::texturing::AlignmentMarkerGenerator::input_
private

Input meshes

Definition at line 74 of file AlignmentMarkerGenerator.hpp.

◆ lineSegments_

std::vector<LineSegment> volcart::texturing::AlignmentMarkerGenerator::lineSegments_
private

Intersection line segments

Definition at line 76 of file AlignmentMarkerGenerator.hpp.

◆ markerRadius_

int volcart::texturing::AlignmentMarkerGenerator::markerRadius_ {5}
private

Marker radius

Definition at line 78 of file AlignmentMarkerGenerator.hpp.

◆ markerRandomColor_

bool volcart::texturing::AlignmentMarkerGenerator::markerRandomColor_ {true}
private

Generate random colors

Definition at line 80 of file AlignmentMarkerGenerator.hpp.

◆ output_

std::vector<cv::Mat> volcart::texturing::AlignmentMarkerGenerator::output_
private

Output images

Definition at line 82 of file AlignmentMarkerGenerator.hpp.


The documentation for this class was generated from the following file: