20 lines
546 B
C++
20 lines
546 B
C++
#pragma once
|
|
|
|
#include <array>
|
|
|
|
#include "camera.hpp"
|
|
|
|
struct CachedCamera
|
|
{
|
|
const Camera cam;
|
|
const std::array<std::array<float, 3>, 3> invR;
|
|
const std::array<float, 3> center;
|
|
const std::array<std::array<float, 3>, 3> newK;
|
|
const std::array<std::array<float, 3>, 3> invK;
|
|
};
|
|
|
|
CachedCamera cache_camera(const Camera &camera);
|
|
|
|
void undistort_point_pinhole(std::array<float, 3> &point, const std::array<float, 5> &distortion);
|
|
void undistort_point_fisheye(std::array<float, 3> &point, const std::array<float, 5> &distortion);
|