-
Notifications
You must be signed in to change notification settings - Fork 0
/
calc_arrays.h
31 lines (28 loc) · 715 Bytes
/
calc_arrays.h
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
#pragma once
#include <Eigen/Dense>
#include <iostream>
using Eigen::MatrixXd;
struct CameraInfo
{
double yaw;
double pitch;
double roll;
double focalLengthX;
double focalLengthY;
double opticalCenterX;
double opticalCenterY;
double cameraHeight;
};
struct IpmInfo
{
double inputWidth;
double inputHeight;
double left;
double right;
double top;
double bottom;
};
MatrixXd GetVanishingPoint(const CameraInfo &cameraInfo);
MatrixXd TransformGround2Image(MatrixXd xyGrid, CameraInfo cameraInfo);
MatrixXd TransformImage2Ground(const MatrixXd &uvLimits, const CameraInfo &cameraInfo);
MatrixXd GetMappingArrays(const CameraInfo &cameraInfo, IpmInfo &ipmInfo);