4#include <opencv2/core/mat.hpp>
6#include <glm/gtc/type_ptr.hpp>
8template<
int rows,
int cols>
9bool fromCV2GLM(
const cv::Mat& cvmat, glm::mat<cols, rows, float, glm::packed_highp>* glmmat) {
10 assert(cvmat.cols == cols && cvmat.rows == rows && cvmat.type() == CV_32FC1);
12 memcpy(glm::value_ptr(*glmmat), cvmat.data, rows * cols *
sizeof(
float));
13 *glmmat = glm::transpose(*glmmat);
17#define INDEX_E(x,y,W) ((y)*(W) + (x))
18std::vector<uint32_t> generate_picture_EBO(
const cv::Size& s);
22cv::Matx33f EulerAnglesToRotationMatrix(cv::Vec3f);
25cv::Matx33f EulerAnglesDegreeToRotationMatrixNotOMAF(cv::Vec3f);
29glm::mat3x3 glmEulerAnglesDegreeToRotationMatrix(glm::vec3);
32glm::mat3x3 glmEulerAnglesDegreeToRotationMatrixNotOMAF(glm::vec3);