models.h
Go to the documentation of this file.
1 // *****************************************************************************
2 //
3 // Copyright (c) 2014, Southwest Research Institute® (SwRI®)
4 // All rights reserved.
5 //
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are met:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of Southwest Research Institute® (SwRI®) nor the
14 // names of its contributors may be used to endorse or promote products
15 // derived from this software without specific prior written permission.
16 //
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 // ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
21 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 //
28 // *****************************************************************************
29 
30 #ifndef OPENCV_UTIL_MODELS_H_
31 #define OPENCV_UTIL_MODELS_H_
32 
33 #include <vector>
34 
35 #include <opencv2/core/core.hpp>
36 
37 namespace swri_opencv_util
38 {
39 
41  {
42  public:
43  typedef cv::Mat T; // An Nx4 float matrix
44  typedef cv::Mat M;
45 
46  explicit Correspondence2d(const T& data) : data_(data) {}
47 
48  virtual bool GetModel(const std::vector<int32_t>& indices, M& model, double max_error) const = 0;
49  int32_t GetInlierCount(const M& model, double max_error);
50  void GetInliers(const M& model, double max_error, std::vector<uint32_t>& indices);
51  int32_t Size() const { return data_.rows; }
52  virtual std::string GetModelString(M& model) const { return ""; }
53 
54  static void CopyTo(const M& src, M& dst)
55  {
56  src.copyTo(dst);
57  }
58 
59  protected:
60  virtual void CalculateNorms(const M& model, cv::Mat& norms);
61 
62  const T& data_;
63 
64  // Buffer matrices to avoid repeated memory allocations.
65  cv::Mat norms__;
66  cv::Mat predicted__;
67  cv::Mat delta__;
68  cv::Mat delta_squared__;
69  cv::Mat thresholded__;
70  };
71 
73  {
74  public:
75  enum { MIN_SIZE = 4 };
76 
77  explicit Homography(const T& data) : Correspondence2d(data) {}
78  virtual bool GetModel(const std::vector<int32_t>& indices, M& model, double max_error) const;
79  bool ValidData() const
80  {
81  return data_.cols == 4 && data_.rows >= MIN_SIZE && data_.type() == CV_32F;
82  }
83 
84  protected:
85  virtual void CalculateNorms(const M& model, cv::Mat& norms);
86  };
87 
89  {
90  public:
91  enum { MIN_SIZE = 3 };
92 
93  explicit AffineTransform2d(const T& data) : Correspondence2d(data) {}
94  virtual bool GetModel(const std::vector<int32_t>& indices, M& model, double max_error) const;
95  bool ValidData() const
96  {
97  return data_.cols == 4 && data_.rows >= MIN_SIZE && data_.type() == CV_32F;
98  }
99  };
100 
102  {
103  public:
104  enum { MIN_SIZE = 2 };
105 
106  explicit RigidTransform2d(const T& data) : Correspondence2d(data) {}
107  virtual bool GetModel(const std::vector<int32_t>& indices, M& model, double max_error) const;
108  bool ValidData() const
109  {
110  return data_.cols == 4 && data_.rows >= MIN_SIZE && data_.type() == CV_32F;
111  }
112  };
113 
115  {
116  public:
117  enum { MIN_SIZE = 1 };
118 
119  explicit Translation2d(const T& data) : Correspondence2d(data) {}
120  virtual bool GetModel(const std::vector<int32_t>& indices, M& model, double max_error) const;
121  bool ValidData() const
122  {
123  return data_.cols == 4 && data_.rows >= MIN_SIZE && data_.type() == CV_32F;
124  }
125  };
126 
128  const cv::Mat& points1,
129  const cv::Mat& points2);
130 
132  const cv::Mat& points1,
133  const cv::Mat& points2);
134 
135  bool ZipCorrespondences(
136  const cv::Mat& points1,
137  const cv::Mat& points2,
138  cv::Mat& correspondences);
139 
140  template <class Model>
141  class Fit3d
142  {
143  public:
144  typedef cv::Mat T; // An Nx3 float matrix
145  typedef Model M; // A geometric model
146 
147  explicit Fit3d(const T& data) : data_(data) {}
148 
149  virtual bool GetModel(const std::vector<int32_t>& indices, M& model, double max_error) const = 0;
150  int32_t GetInlierCount(const M& model, double max_error)
151  {
152  CalculateNorms(model, norms__);
153 
154  cv::compare(norms__, cv::Scalar(max_error), thresholded__, cv::CMP_LT);
155 
156  return cv::countNonZero(thresholded__);
157  }
158 
159  void GetInliers(const M& model, double max_error, std::vector<uint32_t>& indices)
160  {
161  CalculateNorms(model, norms__);
162 
163  indices.clear();
164  indices.reserve(norms__.rows);
165  double threshold = max_error;
166  for (int i = 0; i < norms__.rows; i++)
167  {
168  if (norms__.at<float>(i) < threshold)
169  {
170  indices.push_back(i);
171  }
172  }
173  }
174 
175  int32_t Size() const { return data_.rows; }
176  virtual std::string GetModelString(M& model) const { return ""; }
177 
178  static void CopyTo(const M& src, M& dst)
179  {
180  src.copyTo(dst);
181  }
182 
183  protected:
184  virtual void CalculateNorms(const M& model, cv::Mat& norms) = 0;
185 
186  const T& data_;
187 
188  // Buffer matrices to avoid repeated memory allocations.
189  cv::Mat norms__;
190  cv::Mat delta__;
191  cv::Mat thresholded__;
192  };
193 
194  struct PlaneModel
195  {
196  PlaneModel() : x(0), y(0), z(0), i(0), j(0), k(0) {}
197  void copyTo(PlaneModel& dst) const
198  {
199  dst = *this;
200  }
201 
202  float x, y, z, i, j, k;
203  };
204 
205  class PlaneFit : public Fit3d<PlaneModel>
206  {
207  public:
208  enum { MIN_SIZE = 3 };
209 
210  PlaneFit(const T& data, float min_angle = 0.2) :
211  Fit3d<PlaneModel>(data),
212  min_angle_(min_angle) {}
213  virtual bool GetModel(const std::vector<int32_t>& indices, M& model, double max_error) const;
214  bool ValidData() const
215  {
216  return data_.cols == 1 && data_.rows >= MIN_SIZE && data_.type() == CV_32FC3;
217  }
218 
219  protected:
220  virtual void CalculateNorms(const M& model, cv::Mat& norms);
221 
222  float min_angle_;
223  };
224 
226  {
227  public:
228  enum { MIN_SIZE = 2 };
229 
231  const cv::Vec3f& point_on_plane = cv::Vec3f(0,0,0),
232  const cv::Vec3f& perp_axis = cv::Vec3f(0,0,1),
233  float max_axis_angle = 0.5,
234  float min_angle = 0.2) :
235  PlaneFit(data, min_angle),
236  point_(point_on_plane),
237  perp_axis_(perp_axis),
238  max_axis_angle_(max_axis_angle)
239  {}
240 
241  virtual bool GetModel(const std::vector<int32_t>& indices, M& model, double max_error) const;
242 
243  protected:
244 
245  cv::Vec3f point_;
246  cv::Vec3f perp_axis_;
248  };
249 
250  struct LineModel3d
251  {
252  LineModel3d() : x(0), y(0), z(0), i(0), j(0), k(0) {}
253  void copyTo(LineModel3d& dst) const
254  {
255  dst = *this;
256  }
257 
258  float x, y, z, i, j, k;
259  };
260 
261  class LineFit3d : public Fit3d<LineModel3d>
262  {
263  public:
264  enum { MIN_SIZE = 2 };
265 
266  LineFit3d(const T& data) : Fit3d<LineModel3d>(data) {}
267  virtual bool GetModel(const std::vector<int32_t>& indices, M& model, double max_error) const;
268  bool ValidData() const
269  {
270  return data_.cols == 1 && data_.rows >= MIN_SIZE && data_.type() == CV_32FC3;
271  }
272 
273  protected:
274  virtual void CalculateNorms(const M& model, cv::Mat& norms);
275 
276  cv::Mat temp1__;
277  cv::Mat temp2__;
278  cv::Mat x0_p_dot_n__;
279  cv::Mat x0_p__;
280  };
281 
282  class OrthoLineFit3d : public LineFit3d
283  {
284  public:
285  OrthoLineFit3d(const T& data, const LineModel3d& ortho, float angle_tolerance = 0.09) :
286  LineFit3d(data), ortho_(ortho), angle_tolerance_(angle_tolerance) {}
287  virtual bool GetModel(const std::vector<int32_t>& indices, M& model, double max_error) const;
288 
289  protected:
292  };
293 
295  {
296  CrossModel3d() : x(0), y(0), z(0), i1(0), j1(0), k1(0), i2(0), j2(0), k2(0) {}
297  void copyTo(CrossModel3d& dst) const
298  {
299  dst = *this;
300  }
301 
302  float x, y, z, i1, j1, k1, i2, j2, k2;
303  };
304 
305  class CrossFit3d : public Fit3d<CrossModel3d>
306  {
307  public:
308  enum { MIN_SIZE = 3 };
309 
310  CrossFit3d(const T& data, float min_angle = 0.2) :
311  Fit3d<CrossModel3d>(data),
312  min_angle_(min_angle) {}
313  virtual bool GetModel(const std::vector<int32_t>& indices, M& model, double max_error) const;
314  bool ValidData() const
315  {
316  return data_.cols == 1 && data_.rows >= MIN_SIZE && data_.type() == CV_32FC3;
317  }
318 
319  protected:
320  virtual void CalculateNorms(const M& model, cv::Mat& norms);
321 
322  float min_angle_;
323  cv::Mat temp1__;
324  cv::Mat temp2__;
325  cv::Mat temp3__;
326  cv::Mat x0_p_dot_n__;
327  cv::Mat x0_p__;
328  };
329 
330 }
331 
332 #endif // OPENCV_UTIL_MODELS_H_
swri_opencv_util::CrossModel3d::z
float z
Definition: models.h:302
swri_opencv_util::Valid3dPointCorrespondences
bool Valid3dPointCorrespondences(const cv::Mat &points1, const cv::Mat &points2)
Definition: models.cpp:292
swri_opencv_util::Fit3d::norms__
cv::Mat norms__
Definition: models.h:189
swri_opencv_util::PlaneModel::PlaneModel
PlaneModel()
Definition: models.h:196
swri_opencv_util::Correspondence2d::predicted__
cv::Mat predicted__
Definition: models.h:66
swri_opencv_util::Homography::CalculateNorms
virtual void CalculateNorms(const M &model, cv::Mat &norms)
Definition: models.cpp:111
swri_opencv_util::RigidTransform2d::GetModel
virtual bool GetModel(const std::vector< int32_t > &indices, M &model, double max_error) const
Definition: models.cpp:160
swri_opencv_util::Fit3d::CopyTo
static void CopyTo(const M &src, M &dst)
Definition: models.h:178
swri_opencv_util::Homography::ValidData
bool ValidData() const
Definition: models.h:79
swri_opencv_util::LineFit3d::temp2__
cv::Mat temp2__
Definition: models.h:277
swri_opencv_util::PlaneFit
Definition: models.h:205
swri_opencv_util::Correspondence2d::GetInliers
void GetInliers(const M &model, double max_error, std::vector< uint32_t > &indices)
Definition: models.cpp:46
swri_opencv_util::PerpendicularPlaneWithPointFit::PerpendicularPlaneWithPointFit
PerpendicularPlaneWithPointFit(const T &data, const cv::Vec3f &point_on_plane=cv::Vec3f(0, 0, 0), const cv::Vec3f &perp_axis=cv::Vec3f(0, 0, 1), float max_axis_angle=0.5, float min_angle=0.2)
Definition: models.h:230
swri_opencv_util::PerpendicularPlaneWithPointFit
Definition: models.h:225
swri_opencv_util::PlaneFit::GetModel
virtual bool GetModel(const std::vector< int32_t > &indices, M &model, double max_error) const
Definition: models.cpp:406
swri_opencv_util::CrossFit3d::temp1__
cv::Mat temp1__
Definition: models.h:323
swri_opencv_util::PlaneModel::x
float x
Definition: models.h:202
swri_opencv_util::Correspondence2d::delta_squared__
cv::Mat delta_squared__
Definition: models.h:68
swri_opencv_util::CrossFit3d::temp2__
cv::Mat temp2__
Definition: models.h:324
swri_opencv_util::CrossFit3d::GetModel
virtual bool GetModel(const std::vector< int32_t > &indices, M &model, double max_error) const
Definition: models.cpp:574
swri_opencv_util::CrossFit3d::CrossFit3d
CrossFit3d(const T &data, float min_angle=0.2)
Definition: models.h:310
swri_opencv_util::Fit3d::data_
const T & data_
Definition: models.h:186
swri_opencv_util::PlaneFit::ValidData
bool ValidData() const
Definition: models.h:214
swri_opencv_util::Correspondence2d::Correspondence2d
Correspondence2d(const T &data)
Definition: models.h:46
swri_opencv_util::CrossModel3d
Definition: models.h:294
swri_opencv_util::LineFit3d::temp1__
cv::Mat temp1__
Definition: models.h:276
swri_opencv_util::CrossFit3d::MIN_SIZE
@ MIN_SIZE
Definition: models.h:308
swri_opencv_util::RigidTransform2d::RigidTransform2d
RigidTransform2d(const T &data)
Definition: models.h:106
swri_opencv_util::Correspondence2d::CopyTo
static void CopyTo(const M &src, M &dst)
Definition: models.h:54
swri_opencv_util::Correspondence2d::norms__
cv::Mat norms__
Definition: models.h:65
swri_opencv_util::Valid2dPointCorrespondences
bool Valid2dPointCorrespondences(const cv::Mat &points1, const cv::Mat &points2)
Definition: models.cpp:265
swri_opencv_util::RigidTransform2d
Definition: models.h:101
swri_opencv_util::Fit3d
Definition: models.h:141
swri_opencv_util::LineModel3d::i
float i
Definition: models.h:258
swri_opencv_util::CrossFit3d::temp3__
cv::Mat temp3__
Definition: models.h:325
swri_opencv_util::PlaneModel::z
float z
Definition: models.h:202
swri_opencv_util::CrossFit3d::x0_p_dot_n__
cv::Mat x0_p_dot_n__
Definition: models.h:326
swri_opencv_util::Correspondence2d
Definition: models.h:40
swri_opencv_util::LineModel3d::y
float y
Definition: models.h:258
swri_opencv_util::AffineTransform2d::AffineTransform2d
AffineTransform2d(const T &data)
Definition: models.h:93
swri_opencv_util::CrossModel3d::j1
float j1
Definition: models.h:302
swri_opencv_util::AffineTransform2d::ValidData
bool ValidData() const
Definition: models.h:95
swri_opencv_util::AffineTransform2d
Definition: models.h:88
swri_opencv_util::Homography::MIN_SIZE
@ MIN_SIZE
Definition: models.h:75
swri_opencv_util::LineModel3d::k
float k
Definition: models.h:258
swri_opencv_util::PlaneModel::copyTo
void copyTo(PlaneModel &dst) const
Definition: models.h:197
swri_opencv_util::LineFit3d::CalculateNorms
virtual void CalculateNorms(const M &model, cv::Mat &norms)
Definition: models.cpp:497
swri_opencv_util::RigidTransform2d::MIN_SIZE
@ MIN_SIZE
Definition: models.h:104
swri_opencv_util::Fit3d::GetInliers
void GetInliers(const M &model, double max_error, std::vector< uint32_t > &indices)
Definition: models.h:159
swri_opencv_util::CrossModel3d::copyTo
void copyTo(CrossModel3d &dst) const
Definition: models.h:297
swri_opencv_util::Correspondence2d::Size
int32_t Size() const
Definition: models.h:51
swri_opencv_util::Fit3d::delta__
cv::Mat delta__
Definition: models.h:190
swri_opencv_util::PlaneFit::PlaneFit
PlaneFit(const T &data, float min_angle=0.2)
Definition: models.h:210
swri_opencv_util::PlaneModel::y
float y
Definition: models.h:202
swri_opencv_util::ZipCorrespondences
bool ZipCorrespondences(const cv::Mat &points1, const cv::Mat &points2, cv::Mat &correspondences)
Definition: models.cpp:319
swri_opencv_util::LineModel3d
Definition: models.h:250
swri_opencv_util::CrossModel3d::k2
float k2
Definition: models.h:302
swri_opencv_util::Fit3d::M
Model M
Definition: models.h:145
swri_opencv_util::CrossModel3d::i2
float i2
Definition: models.h:302
swri_opencv_util::Fit3d::GetModel
virtual bool GetModel(const std::vector< int32_t > &indices, M &model, double max_error) const =0
swri_opencv_util::Fit3d::GetInlierCount
int32_t GetInlierCount(const M &model, double max_error)
Definition: models.h:150
swri_opencv_util::PlaneModel::j
float j
Definition: models.h:202
swri_opencv_util::PerpendicularPlaneWithPointFit::perp_axis_
cv::Vec3f perp_axis_
Definition: models.h:246
swri_opencv_util::CrossModel3d::i1
float i1
Definition: models.h:302
swri_opencv_util::Translation2d::GetModel
virtual bool GetModel(const std::vector< int32_t > &indices, M &model, double max_error) const
Definition: models.cpp:234
swri_opencv_util::Fit3d::CalculateNorms
virtual void CalculateNorms(const M &model, cv::Mat &norms)=0
swri_opencv_util
Definition: blend.h:35
swri_opencv_util::PerpendicularPlaneWithPointFit::point_
cv::Vec3f point_
Definition: models.h:245
swri_opencv_util::Correspondence2d::data_
const T & data_
Definition: models.h:62
swri_opencv_util::Correspondence2d::delta__
cv::Mat delta__
Definition: models.h:67
swri_opencv_util::Fit3d::thresholded__
cv::Mat thresholded__
Definition: models.h:191
swri_opencv_util::Translation2d::ValidData
bool ValidData() const
Definition: models.h:121
swri_opencv_util::Fit3d::GetModelString
virtual std::string GetModelString(M &model) const
Definition: models.h:176
swri_opencv_util::PlaneFit::min_angle_
float min_angle_
Definition: models.h:222
swri_opencv_util::Homography::Homography
Homography(const T &data)
Definition: models.h:77
swri_opencv_util::PlaneModel
Definition: models.h:194
swri_opencv_util::Fit3d::T
cv::Mat T
Definition: models.h:144
swri_opencv_util::LineFit3d::ValidData
bool ValidData() const
Definition: models.h:268
swri_opencv_util::CrossFit3d
Definition: models.h:305
swri_opencv_util::Correspondence2d::M
cv::Mat M
Definition: models.h:44
swri_opencv_util::LineModel3d::LineModel3d
LineModel3d()
Definition: models.h:252
swri_opencv_util::Homography
Definition: models.h:72
swri_opencv_util::PerpendicularPlaneWithPointFit::GetModel
virtual bool GetModel(const std::vector< int32_t > &indices, M &model, double max_error) const
Definition: models.cpp:354
swri_opencv_util::PlaneFit::MIN_SIZE
@ MIN_SIZE
Definition: models.h:208
swri_opencv_util::PerpendicularPlaneWithPointFit::MIN_SIZE
@ MIN_SIZE
Definition: models.h:228
swri_opencv_util::LineModel3d::x
float x
Definition: models.h:258
swri_opencv_util::CrossFit3d::min_angle_
float min_angle_
Definition: models.h:322
swri_opencv_util::CrossModel3d::j2
float j2
Definition: models.h:302
swri_opencv_util::PerpendicularPlaneWithPointFit::max_axis_angle_
float max_axis_angle_
Definition: models.h:247
swri_opencv_util::CrossFit3d::CalculateNorms
virtual void CalculateNorms(const M &model, cv::Mat &norms)
Definition: models.cpp:630
swri_opencv_util::Correspondence2d::CalculateNorms
virtual void CalculateNorms(const M &model, cv::Mat &norms)
Definition: models.cpp:62
swri_opencv_util::OrthoLineFit3d
Definition: models.h:282
swri_opencv_util::LineFit3d::MIN_SIZE
@ MIN_SIZE
Definition: models.h:264
swri_opencv_util::CrossFit3d::x0_p__
cv::Mat x0_p__
Definition: models.h:327
swri_opencv_util::OrthoLineFit3d::OrthoLineFit3d
OrthoLineFit3d(const T &data, const LineModel3d &ortho, float angle_tolerance=0.09)
Definition: models.h:285
swri_opencv_util::OrthoLineFit3d::GetModel
virtual bool GetModel(const std::vector< int32_t > &indices, M &model, double max_error) const
Definition: models.cpp:538
swri_opencv_util::CrossModel3d::k1
float k1
Definition: models.h:302
swri_opencv_util::CrossModel3d::x
float x
Definition: models.h:302
swri_opencv_util::Translation2d::MIN_SIZE
@ MIN_SIZE
Definition: models.h:117
swri_opencv_util::LineFit3d::GetModel
virtual bool GetModel(const std::vector< int32_t > &indices, M &model, double max_error) const
Definition: models.cpp:472
swri_opencv_util::CrossModel3d::y
float y
Definition: models.h:302
swri_opencv_util::LineFit3d::x0_p_dot_n__
cv::Mat x0_p_dot_n__
Definition: models.h:278
swri_opencv_util::PlaneModel::i
float i
Definition: models.h:202
swri_opencv_util::LineFit3d::x0_p__
cv::Mat x0_p__
Definition: models.h:279
swri_opencv_util::LineFit3d::LineFit3d
LineFit3d(const T &data)
Definition: models.h:266
swri_opencv_util::OrthoLineFit3d::angle_tolerance_
float angle_tolerance_
Definition: models.h:291
swri_opencv_util::LineModel3d::copyTo
void copyTo(LineModel3d &dst) const
Definition: models.h:253
swri_opencv_util::Correspondence2d::thresholded__
cv::Mat thresholded__
Definition: models.h:69
swri_opencv_util::Translation2d::Translation2d
Translation2d(const T &data)
Definition: models.h:119
swri_opencv_util::Correspondence2d::GetModelString
virtual std::string GetModelString(M &model) const
Definition: models.h:52
swri_opencv_util::Fit3d::Size
int32_t Size() const
Definition: models.h:175
swri_opencv_util::Correspondence2d::GetModel
virtual bool GetModel(const std::vector< int32_t > &indices, M &model, double max_error) const =0
swri_opencv_util::CrossFit3d::ValidData
bool ValidData() const
Definition: models.h:314
swri_opencv_util::LineModel3d::z
float z
Definition: models.h:258
swri_opencv_util::Correspondence2d::GetInlierCount
int32_t GetInlierCount(const M &model, double max_error)
Definition: models.cpp:37
swri_opencv_util::LineModel3d::j
float j
Definition: models.h:258
swri_opencv_util::Correspondence2d::T
cv::Mat T
Definition: models.h:43
swri_opencv_util::Homography::GetModel
virtual bool GetModel(const std::vector< int32_t > &indices, M &model, double max_error) const
Definition: models.cpp:75
swri_opencv_util::LineFit3d
Definition: models.h:261
swri_opencv_util::CrossModel3d::CrossModel3d
CrossModel3d()
Definition: models.h:296
swri_opencv_util::Translation2d
Definition: models.h:114
swri_opencv_util::Fit3d::Fit3d
Fit3d(const T &data)
Definition: models.h:147
swri_opencv_util::PlaneFit::CalculateNorms
virtual void CalculateNorms(const M &model, cv::Mat &norms)
Definition: models.cpp:452
swri_opencv_util::AffineTransform2d::MIN_SIZE
@ MIN_SIZE
Definition: models.h:91
swri_opencv_util::RigidTransform2d::ValidData
bool ValidData() const
Definition: models.h:108
swri_opencv_util::OrthoLineFit3d::ortho_
LineModel3d ortho_
Definition: models.h:290
swri_opencv_util::PlaneModel::k
float k
Definition: models.h:202
swri_opencv_util::AffineTransform2d::GetModel
virtual bool GetModel(const std::vector< int32_t > &indices, M &model, double max_error) const
Definition: models.cpp:124


swri_opencv_util
Author(s): Marc Alban
autogenerated on Fri Aug 2 2024 08:39:13