-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmapping.h
More file actions
49 lines (42 loc) · 1.47 KB
/
mapping.h
File metadata and controls
49 lines (42 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef MAPPING_H
#define MAPPING_H
#include "global.h"
#include "bbox.h"
#include "mesh.h"
class Mapping
{
const cv::Size2i flat_surface_image_size_;
const base::BBox flat_mesh_bb_;
std::pair<float, float> elevation_limits_;
std::map<const base::he::Face*, base::he::Face*> flat_to_original_face_map_;
public:
Mapping(const base::Mesh &original_mesh, const base::Mesh &flat_mesh, const cv::Size2i &flat_surace_image_size);
/**
* @brief Map ImagePolygon to flattened surface space
* Returns the given polygon points with flattened image coordinates mapped to
* the coordinate system of the flattenedd surface
*
* @param image_polygon_pts
* @return mapped_polygon_points
*/
PolygonPoints mapImagePolygonToFlattenedSurfaceSpace(const PolygonPoints &image_polygon_pts) const;
/**
* @brief Map flat surface mesh to original
* Maps the given set of faces of the flattened mesh to their corresponding
* clones in the original mesh.
*
* @param flat_faces
* @return mapped_faces
*/
std::set<base::he::Face*> mapFlatSurfaceMeshToOriginal(const std::set<base::he::Face*> &flat_faces) const;
/**
* @brief Cartesian ImagePos to Spherical
* Maps the {x,y} coords on of the flattened surface image to spherical
* {aximuth, elevation} of the same point in the original mesh.
*
* @param image_pos
* @return {azimuth, elevation}
*/
cv::Vec2f cartesianImagePosToSpherical(const cv::Point2f &image_pos) const;
};
#endif // MAPPING_H