ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ImageWarpingField.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 // #include "qGL.h"
10 #include <IJsonConvertible.h>
11 
12 namespace cloudViewer {
13 namespace pipelines {
14 namespace color_map {
15 
17 public:
19  ImageWarpingField(int width, int height, int number_of_vertical_anchors);
21  int height,
22  int number_of_vertical_anchors);
23  Eigen::Vector2d QueryFlow(int i, int j) const;
24  Eigen::Vector2d GetImageWarpingField(double u, double v) const;
25 
26 public:
27  bool ConvertToJsonValue(Json::Value &value) const override;
28  bool ConvertFromJsonValue(const Json::Value &value) override;
29 
30 public:
31  Eigen::VectorXd flow_;
32  int anchor_w_;
33  int anchor_h_;
34  double anchor_step_;
35 };
36 
37 } // namespace color_map
38 } // namespace pipelines
39 } // namespace cloudViewer
40 
41 // EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION_CUSTOM(
42 // cloudViewer::pipelines::color_map::ImageWarpingField);
int width
int height
void InitializeWarpingFields(int width, int height, int number_of_vertical_anchors)
bool ConvertFromJsonValue(const Json::Value &value) override
bool ConvertToJsonValue(Json::Value &value) const override
Eigen::Vector2d GetImageWarpingField(double u, double v) const
Generic file read and write utility for python interface.