LeiaSR SDK 720218b2 v1.32.7.6322 2025-02-13T14:55:38Z
Stable
transformation.h
Go to the documentation of this file.
1
5#pragma once
6
7#include "opencv2/opencv.hpp"
8#include "sr/types.h"
9
10#ifdef WIN32
11# ifdef COMPILING_DLL_SimulatedRealityCore
12# define DIMENCOSR_API __declspec(dllexport)
13# else
14# define DIMENCOSR_API __declspec(dllimport)
15# endif
16#else
17# define DIMENCOSR_API
18#endif
19
20namespace SR {
21
28private:
29 bool verifyRotation();
30
36#pragma warning(push)
37#pragma warning(disable: 4251)
38 cv::Mat scaling;
39 cv::Mat rotation;
40 cv::Mat translation;
41
42 //Combined for efficiency
43 cv::Mat transformation;
44 cv::Mat untransformation;
45#pragma warning(pop)
46
47public:
48 Transformation(cv::Matx31d scaling, cv::Matx33d rotation, cv::Matx31d translation);
49 Transformation(cv::Matx33d rotation, cv::Matx31d translation);
53
54 cv::Mat getRotation();
55 cv::Mat getTranslation();
56 cv::Mat getMatrix();
57
58 cv::Mat apply(cv::Mat points);
59 cv::Mat apply(SR_point3d* points, size_t size);
60 cv::Mat reverse(cv::Mat points);
61};
62
63}
64
65#undef DIMENCOSR_API
Class of objects defining the relation between different coordinate systems.
Definition: transformation.h:27
Transformation(cv::Matx33d rotation, cv::Matx31d translation)
cv::Mat apply(SR_point3d *points, size_t size)
cv::Mat getRotation()
cv::Mat apply(cv::Mat points)
Transformation & operator=(const Transformation &other)
cv::Mat reverse(cv::Mat points)
Transformation(cv::Matx31d scaling, cv::Matx33d rotation, cv::Matx31d translation)
cv::Mat getTranslation()
Transformation(const Transformation &other)
Namespace containing all C++ Simulated Reality classes.
Definition: srconfiguration.h:20
#define DIMENCOSR_API
Definition: transformation.h:17
C-compatible 3d double vector representation.
Definition: types.h:73