28 struct InvertPolynomialIntrinsicsCostFunction {
30 typedef Vec2 FMatrixType;
31 typedef Vec2 XMatrixType;
33 InvertPolynomialIntrinsicsCostFunction(
const double focal_length_x,
34 const double focal_length_y,
35 const double principal_point_x,
36 const double principal_point_y,
74 fx << (xx -
x_), (yy -
y_);
86 struct InvertDivisionIntrinsicsCostFunction {
88 typedef Vec2 FMatrixType;
89 typedef Vec2 XMatrixType;
91 InvertDivisionIntrinsicsCostFunction(
const double focal_length_x,
92 const double focal_length_y,
93 const double principal_point_x,
94 const double principal_point_y,
123 fx << (xx -
x_), (yy -
y_);
134 struct InvertBrownIntrinsicsCostFunction {
136 typedef Vec2 FMatrixType;
137 typedef Vec2 XMatrixType;
139 InvertBrownIntrinsicsCostFunction(
const double focal_length_x,
140 const double focal_length_y,
141 const double principal_point_x,
142 const double principal_point_y,
149 const double image_x,
150 const double image_y)
183 fx << (xx -
x_), (yy -
y_);
198 const double focal_length_y,
199 const double principal_point_x,
200 const double principal_point_y,
206 const double image_x,
207 const double image_y,
208 double* normalized_x,
209 double* normalized_y) {
213 normalized(0) = (image_x - principal_point_x) / focal_length_x;
214 normalized(1) = (image_y - principal_point_y) / focal_length_y;
218 InvertPolynomialIntrinsicsCostFunction intrinsics_cost(focal_length_x,
229 Solver::SolverParameters
params;
230 Solver solver(intrinsics_cost);
241 const double focal_length_y,
242 const double principal_point_x,
243 const double principal_point_y,
246 const double image_x,
247 const double image_y,
248 double* normalized_x,
249 double* normalized_y) {
253 normalized(0) = (image_x - principal_point_x) / focal_length_x;
254 normalized(1) = (image_y - principal_point_y) / focal_length_y;
259 InvertDivisionIntrinsicsCostFunction intrinsics_cost(focal_length_x,
267 Solver::SolverParameters
params;
268 Solver solver(intrinsics_cost);
279 const double focal_length_y,
280 const double principal_point_x,
281 const double principal_point_y,
288 const double image_x,
289 const double image_y,
290 double* normalized_x,
291 double* normalized_y) {
295 normalized(0) = (image_x - principal_point_x) / focal_length_x;
296 normalized(1) = (image_y - principal_point_y) / focal_length_y;
300 InvertBrownIntrinsicsCostFunction intrinsics_cost(focal_length_x,
312 Solver::SolverParameters
params;
313 Solver solver(intrinsics_cost);
329 const double focal_length_y,
330 const double principal_point_x,
331 const double principal_point_y,
332 const int image_width,
333 const int image_height,
336 const double expected_normalized_x,
337 const double expected_normalized_y)
350 double actual_normalized_x, actual_normalized_y;
362 &actual_normalized_x,
363 &actual_normalized_y);
381 const double focal_length_y,
382 const double principal_point_x,
383 const double principal_point_y,
384 const int image_width,
385 const int image_height,
388 const double normalized_x,
389 const double normalized_y,
395 image(0) = normalized_x * focal_length_x + principal_point_x;
396 image(1) = normalized_y * focal_length_y + principal_point_y;
411 Solver::SolverParameters
params;
412 Solver solver(intrinsics_cost);
SIMD_FORCE_INLINE btVector3 normalized() const
Return a normalized version of this vector.
double principal_point_x_
double principal_point_y_
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
void InvertNukeDistortionModel(const T &focal_length_x, const T &focal_length_y, const T &principal_point_x, const T &principal_point_y, const int image_width, const int image_height, const T &k1, const T &k2, const T &image_x, const T &image_y, T *normalized_x, T *normalized_y)
void InvertPolynomialDistortionModel(const double focal_length_x, const double focal_length_y, const double principal_point_x, const double principal_point_y, const double k1, const double k2, const double k3, const double p1, const double p2, const double image_x, const double image_y, double *normalized_x, double *normalized_y)
void ApplyPolynomialDistortionModel(const T &focal_length_x, const T &focal_length_y, const T &principal_point_x, const T &principal_point_y, const T &k1, const T &k2, const T &k3, const T &p1, const T &p2, const T &normalized_x, const T &normalized_y, T *image_x, T *image_y)
void ApplyDivisionDistortionModel(const T &focal_length_x, const T &focal_length_y, const T &principal_point_x, const T &principal_point_y, const T &k1, const T &k2, const T &normalized_x, const T &normalized_y, T *image_x, T *image_y)
void ApplyNukeDistortionModel(const double focal_length_x, const double focal_length_y, const double principal_point_x, const double principal_point_y, const int image_width, const int image_height, const double k1, const double k2, const double normalized_x, const double normalized_y, double *image_x, double *image_y)
void InvertBrownDistortionModel(const double focal_length_x, const double focal_length_y, const double principal_point_x, const double principal_point_y, const double k1, const double k2, const double k3, const double k4, const double p1, const double p2, const double image_x, const double image_y, double *normalized_x, double *normalized_y)
void InvertDivisionDistortionModel(const double focal_length_x, const double focal_length_y, const double principal_point_x, const double principal_point_y, const double k1, const double k2, const double image_x, const double image_y, double *normalized_x, double *normalized_y)
void ApplyBrownDistortionModel(const T &focal_length_x, const T &focal_length_y, const T &principal_point_x, const T &principal_point_y, const T &k1, const T &k2, const T &k3, const T &k4, const T &p1, const T &p2, const T &normalized_x, const T &normalized_y, T *image_x, T *image_y)
double expected_normalized_x_
double principal_point_y_
Vec2 operator()(const Vec2 &image_coordinate) const
double expected_normalized_y_
ApplyNukeIntrinsicsCostFunction(const double focal_length_x, const double focal_length_y, const double principal_point_x, const double principal_point_y, const int image_width, const int image_height, const double k1, const double k2, const double expected_normalized_x, const double expected_normalized_y)
double principal_point_x_