Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
HomgPoint2D.hh
1 /*
2 This file is part of the BIAS library (Basic ImageAlgorithmS).
3 
4 Copyright (C) 2003-2009 (see file CONTACT for details)
5  Multimediale Systeme der Informationsverarbeitung
6  Institut fuer Informatik
7  Christian-Albrechts-Universitaet Kiel
8 
9 
10 BIAS is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14 
15 BIAS is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
19 
20 You should have received a copy of the GNU Lesser General Public License
21 along with BIAS; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24 
25 
26 #ifndef _HomgPoint2D_hh_
27 #define _HomgPoint2D_hh_
28 #include "bias_config.h"
29 
30 #ifdef WIN32
31 // implement non-standard (double)rint(double x)
32 # define rint(x) (floor(x+0.5))
33 #endif //_WIN32
34 
35 #include <Base/Debug/Error.hh>
36 
37 #include <Base/Math/Vector3.hh>
38 #include <Base/Math/Vector.hh>
39 #include <Base/Math/Vector2.hh>
40 #include <Base/Math/Matrix3x3.hh>
41 #include <Base/Common/CompareFloatingPoint.hh>
42 #include <limits>
43 #include <cmath>
44 
45  // the type of each element:
46 #define HOMGPOINT2D_TYPE double
47  // values whose abs is < epsilon are handled as zero
48 #define HOMGPOINT2D_TYPE_EPS 1E-12
49  // the infinity value
50 #define HOMGPOINT2D_TYPE_INF std::numeric_limits<double>::infinity()
51 
52 namespace BIAS {
53  /**
54  @class HomgPoint2D
55  @ingroup g_geometry
56  @brief class HomgPoint2D describes a point with 2 degrees of freedom in
57  projective coordinates.
58 
59  manual loop unrolling is used if possible.
60  The Vector is in row-major order (3 rows, 1 column)
61  the indizes begin with zero (to size-1)
62 
63  constructors and assignment operators are never inherited, so they are
64  wrapped (or reimplemented) here.
65  @author Jan Woetzel
66  @status untested (03/04/2002) **/
67  class BIASGeometryBase_EXPORT HomgPoint2D : public Vector3<HOMGPOINT2D_TYPE>
68  {
69  public:
70  enum ELocation { LOC_LEFT, LOC_RIGHT, LOC_MIDDLE, LOC_UPPER,
71  LOC_LOWER, LOC_undef};
72 
73  enum EPosition { Left, Right, Bottom, Top, TopLeft, TopRight, BottomLeft,
74  BottomRight, Center, Infinity, InvalidPosition };
75 
76  /** default constructor
77  @author Jan Woetzel
78  @status alpha (02/28/2002) **/
79  inline HomgPoint2D()
80  : Vector3 < HOMGPOINT2D_TYPE > () {};
81 
82  /** constructor
83  @author JMF
84  **/
85  // inline HomgPoint2D(const Vector3 < HOMGPOINT2D_TYPE >& p)
86  // : Vector3 < HOMGPOINT2D_TYPE > (p) {};
87 
88  /** copy constructor
89  @author Jan Woetzel (03/05/2002) **/
90  inline HomgPoint2D(const HomgPoint2D & p)
91  : Vector3 <HOMGPOINT2D_TYPE> (p) {};
92 
93 
94  /** assignment with a constant value for all elements
95  @author Jan Woetzel (03/01/2002) **/
96  explicit inline HomgPoint2D(const HOMGPOINT2D_TYPE & scalar)
97  :Vector3 <HOMGPOINT2D_TYPE> (scalar) {};
98 
99  /** assignment with an array of values
100  which is copied into this ones class members
101  @author Jan Woetzel (02/28/2002) **/
102  explicit inline HomgPoint2D(const HOMGPOINT2D_TYPE * pv)
103  :Vector3 <HOMGPOINT2D_TYPE> (pv) {};
104 
105  /** constructor with element assignment
106  @author Jan Woetzel (03/01/2002) **/
107  explicit inline HomgPoint2D(char *s):Vector3 <HOMGPOINT2D_TYPE> (s) {};
108 
109  /** constructor from Vector3 */
110  inline HomgPoint2D(const Vector3<double>& vec) {
111  data_[0] = vec[0];
112  data_[1] = vec[1];
113  data_[2] = vec[2];
114  };
115 
116  /** constructor
117  @author streckel 07 2006 **/
118  explicit inline HomgPoint2D(const Vector2<HOMGPOINT2D_TYPE>& vec) {
119  Set(vec);
120  }
121 
122  /** constructor using euclidic coordinates, setting the 3rd HomgPoint2D
123  component to 1
124  @author Ingo Thomsen **/
125  inline HomgPoint2D(const HOMGPOINT2D_TYPE & x,
126  const HOMGPOINT2D_TYPE & y)
127  {
128  data_[0] = x;
129  data_[1] = y;
130  data_[2] = 1;
131  };
132 
133  /** constructor
134  @author woelk 02 2003 **/
135  inline HomgPoint2D(const HOMGPOINT2D_TYPE & x,
136  const HOMGPOINT2D_TYPE & y,
137  const HOMGPOINT2D_TYPE & w)
138  { data_[0] = x; data_[1] = y; data_[2] = w; };
139 
140  inline HOMGPOINT2D_TYPE GetW() const { return data_[2]; };
141 
142  /** destructor
143  @author Jan Woetzel (02/28/2002)**/
145 
146  /** assignment operator
147  set the elements of this HomgPoint to the element of vec
148  @author Jan Woetzel
149  @status alpha (02/25/2002)**/
152  return *this;
153  };
154 
155  /** assignment operator
156  set the vector elementwise to scalar value
157  @author Jan Woetzel
158  @status alpha (02/28/2002)**/
159  inline HomgPoint2D & operator= (const HOMGPOINT2D_TYPE & scalar) {
161  return *this;
162  };
163 
164 
165  inline bool IsAtInfinity() const
166  { return (data_[2]>-HOMGPOINT2D_TYPE_EPS &&
167  data_[2]<HOMGPOINT2D_TYPE_EPS); };
168 
169 
170  /** set elementwise with given 2 euclidean scalar values.
171  the additional W-coordinate is set to 1
172  @author Jan Woetzel
173  @status alpha (03/05/2002) **/
174  inline void Set(const HOMGPOINT2D_TYPE & x, const HOMGPOINT2D_TYPE & y)
175  { Vector3<HOMGPOINT2D_TYPE>::Set(x, y, 1.0); };
176 
177  inline void Set(const HOMGPOINT2D_TYPE& x, const HOMGPOINT2D_TYPE& y,
178  const HOMGPOINT2D_TYPE& z)
179  { Vector3<HOMGPOINT2D_TYPE>::Set(x, y, z); };
180 
181  /** Sets this form elements of Vector<T>. */
182  inline void Set(const Vector<HOMGPOINT2D_TYPE> &vec) {
183  if (vec.size() != 3){
184  BIASERR("The vector for initialization of Vector3 has not length 3");
185  } else {
186  data_[0] = vec[0];
187  data_[1] = vec[1];
188  data_[2] = vec[2];
189  }
190  }
191 
192  /** set from Vector2
193  @author streckel 07 2006 **/
194  inline void Set(const Vector2<HOMGPOINT2D_TYPE>& vec)
195  {
196  data_[0] = vec[0];
197  data_[1] = vec[1];
198  data_[2] = 1.0;
199  }
200 
201  /** @author woelk 04 2003 */
202  inline bool IsHomogenized() const {
203  return data_[2]<1+HOMGPOINT2D_TYPE_EPS &&
204  data_[2]>1-HOMGPOINT2D_TYPE_EPS;
205  }
206 
207  /** @author esquivel */
208  inline bool IsNormalized() const {
209  return Equal(NormL2(), 1.0, HOMGPOINT2D_TYPE_EPS);
210  }
211 
212  /** homogenize class data member elements to W==1 by divison by W
213  @author koeser (originally jw)
214  @status optimized **/
216  {
217  register const HOMGPOINT2D_TYPE w = data_[2];
218  if (data_[2]>-HOMGPOINT2D_TYPE_EPS &&
219  data_[2]<HOMGPOINT2D_TYPE_EPS) {
220  // point is at infinity
221  data_[2] = 0.0;
222  } else {
223  // w = data_[3] is not in [-eps..eps] (means non-zero)
224  data_[0] /= w;
225  data_[1] /= w;
226  data_[2] = 1.0;
227  }
228  return (*this);
229  };
230 
231  /** homogenizes the point and transforms the associated covariance matrix
232  @author woelk 03/2005
233  @status untested */
234  HomgPoint2D& Homogenize(Matrix3x3<double>& cov);
235 
236 
237  /** calculate affine coordinates of this and write them to dest
238  affine coordinates are projective coordinates with last element w == 1;
239  Only possible for w !=0 because w==0 describes points of infinity
240  which are not in euclidean space (but may be interpreted as
241  directions)
242  @author Jan Woetzel, (03/04/2002)
243  */
244  inline void GetEuclidean(Vector2 < HOMGPOINT2D_TYPE > &dest) const
245  {
246  dest.GetData()[0] = GetEuclideanX(); // X
247  dest.GetData()[1] = GetEuclideanY(); // Y
248  };
249 
250  /** @brief return the euclidean coordinates of this homg 2D point
251  Only possible for w !=0 because w==0 describes points of infinity
252  which are not in euclidean space (but may be interpreted
253  as directions)
254  @author Jan Woetzel
255  @status untested (03/04/2002)**/
258  this->GetEuclidean(dest);
259  return dest;
260  };
261 
262  // deprecated versions
263  inline void GetEuclidian(Vector2 < HOMGPOINT2D_TYPE > &dest) const {
264  this->GetEuclidean(dest);
265  };
267  return this->GetEuclidean();
268  };
269 
270  /** return the euclidean coordinates
271  Only possible for w !=0 because w==0 describes points of
272  infinity which are not in euclidean space (but may be interpreted
273  as directions)
274  @author Jan Woetzel
275  @status untested (03/04/2002)**/
276  inline HOMGPOINT2D_TYPE GetEuclideanX() const {
277  BIASASSERT(!((GetW() > -HOMGPOINT2D_TYPE_EPS) &&
278  (GetW() < HOMGPOINT2D_TYPE_EPS)));
279  // test if w is zero (in eps env.)
280  return ((*this)[0] / GetW());
281  };
282 
283  inline HOMGPOINT2D_TYPE GetEuclideanY() const {
284  BIASASSERT(!((GetW() > -HOMGPOINT2D_TYPE_EPS) &&
285  (GetW() < HOMGPOINT2D_TYPE_EPS)));
286  // test if w is zero (in eps env.)
287  return ((*this)[1] / GetW());
288  };
289 
290  // deprecated versions
291  inline HOMGPOINT2D_TYPE GetEuclidianX() const {
292  return this->GetEuclideanX();
293  };
294  inline HOMGPOINT2D_TYPE GetEuclidianY() const {
295  return this->GetEuclideanY();
296  };
297 
298  inline HOMGPOINT2D_TYPE Distance(const HomgPoint2D& point) const;
299  inline HOMGPOINT2D_TYPE DistanceSquared(const HomgPoint2D& point) const;
300 
301  ////////////////////////////////////////////////////////////////////////
302  ///////////////// Comparison operators /////////////////////////////////
303  ////////////////////////////////////////////////////////////////////////
304 
305  /** Comparison operator 'equal'
306  @author Arne Petersen
307  @status untested**/
308  inline bool operator==(const HomgPoint2D& arg) const {
309  //Two homogeneos 2D-points are euqal if and only if the cross-product
310  //of their 3D-coordinates is zero (the rays are colinear)
311  return ((data_[2]*arg[1] == data_[1]*arg[2])
312  && (data_[2]*arg[0] == data_[0]*arg[2])
313  && (data_[1]*arg[0] == data_[0]*arg[1]));
314  }
315 
316 
317  /** Comparison operator 'not equal'
318  @author Ingo Thomsen
319  @status tested **/
320  inline bool operator!= (const HomgPoint2D& arg) const
321  { return !(*this == arg); };
322 
323  /** return image coordinates for drawing , coo[0]=x, coo[1]=y */
324  inline bool GetImageCoo(unsigned int width, unsigned int height,
325  unsigned int coo[2]);
326 
327  inline enum EPosition
328  DeterminePosition(unsigned int width, unsigned int height);
329 
330  /** @brief give point position relative to image borders
331  the parameters minx=0, miny=0, maxx=width-1, maxy=height-1
332  represent a typical image */
333  inline enum EPosition
334  DeterminePosition(const double& minx, const double& miny,
335  const double& maxx, const double& maxy);
336 
337 
338 
339  /** @brief determines if point is within rectangular RegionOfInterest
340  @attention point is assumed to be homogenized !
341  @author koeser 03/2004 */
342  inline bool IsInROIHomogenized(const HOMGPOINT2D_TYPE& xmin,
343  const HOMGPOINT2D_TYPE& ymin,
344  const HOMGPOINT2D_TYPE& xmax,
345  const HOMGPOINT2D_TYPE& ymax) const;
346 
347  /** @brief determines if point is within rectangular RegionOfInterest
348  @author koeser 03/2004 */
349  inline bool IsInROI(const HOMGPOINT2D_TYPE& xmin,
350  const HOMGPOINT2D_TYPE& ymin,
351  const HOMGPOINT2D_TYPE& xmax,
352  const HOMGPOINT2D_TYPE& ymax) const;
353 
354  };
355 
356  BIASGeometryBase_EXPORT std::ostream& operator<<(std::ostream& os,
357  const enum HomgPoint2D::EPosition pos);
358 
359  // std::ostream& operator<<(std::ostream& os, const BIAS::HomgPoint2D p2D);
360 
361  //////////////////////////////////////////////////////////////////
362  // implementations
363  /////////////////////////////////////////////////////////////////
364 
365 
366 
367  inline HOMGPOINT2D_TYPE HomgPoint2D::Distance(const HomgPoint2D& point) const
368  {
369  if ((data_[2]>-HOMGPOINT2D_TYPE_EPS && data_[2]<HOMGPOINT2D_TYPE_EPS) ||
370  (point[2]>-HOMGPOINT2D_TYPE_EPS && point[2]<HOMGPOINT2D_TYPE_EPS)) {
371  return HOMGPOINT2D_TYPE_INF;
372  }
373  return sqrt(pow(data_[0]/data_[2] - point[0]/point[2],2) +
374  pow(data_[1]/data_[2] - point[1]/point[2],2));
375  }
376 
377  inline HOMGPOINT2D_TYPE HomgPoint2D::DistanceSquared(const HomgPoint2D& point) const
378  {
379  if ((data_[2]>-HOMGPOINT2D_TYPE_EPS && data_[2]<HOMGPOINT2D_TYPE_EPS) ||
380  (point[2]>-HOMGPOINT2D_TYPE_EPS && point[2]<HOMGPOINT2D_TYPE_EPS)) {
381  return HOMGPOINT2D_TYPE_INF;
382  }
383  return pow(data_[0]/data_[2] - point[0]/point[2],2) +
384  pow(data_[1]/data_[2] - point[1]/point[2],2);
385  }
386 
387  inline bool
388  HomgPoint2D::GetImageCoo(unsigned int width, unsigned int height,
389  unsigned int coo[2])
390  {
391  bool result = false;
392  Homogenize();
393  if (data_[0] >= 0.0 && data_[0] < (width -1) &&
394  data_[1] >= 0.0 && data_[1] < (height-1)){
395  result = true;
396  coo[0] = (unsigned int)rint(data_[0]);
397  coo[1] = (unsigned int)rint(data_[1]);
398  }
399  return result;
400  }
401 
402  inline enum HomgPoint2D::EPosition
403  HomgPoint2D::DeterminePosition(unsigned int width, unsigned int height) {
404  return DeterminePosition(0.0, 0.0, double(width-1), double(height-1));
405  }
406 
407  inline enum HomgPoint2D::EPosition
408  HomgPoint2D::DeterminePosition(const double& minx, const double& miny,
409  const double& maxx, const double& maxy)
410  {
412  enum HomgPoint2D::ELocation xpos = LOC_undef, ypos = LOC_undef;
413 
414  if (IsAtInfinity()){
415  //BIASERR("point at infinity");
416  return pos;
417  } else {
418  (*this)[0]/=(*this)[2];
419  (*this)[1]/=(*this)[2];
420  }
421 
422  if ((*this)[0] < minx) {
423  xpos = LOC_LEFT;
424  } else if ((*this)[0] > maxx) {
425  xpos = LOC_RIGHT;
426  } else xpos = LOC_MIDDLE;
427 
428  if ((*this)[1] < miny) {
429  ypos = LOC_UPPER;
430  } else if ((*this)[1] > maxy) {
431  ypos = LOC_LOWER;
432  } else ypos = LOC_MIDDLE;
433 
434  switch (xpos) {
435  case LOC_LEFT:
436  switch (ypos) {
437  case LOC_LOWER:
438  pos = BottomLeft;
439  break;
440  case LOC_UPPER:
441  pos = TopLeft;
442  break;
443  case LOC_MIDDLE:
444  pos = Left;
445  break;
446  default:
447  BIASERR("no valid ypos");
448  break;
449  }
450  break;
451 
452  case LOC_MIDDLE:
453  switch (ypos) {
454  case LOC_LOWER:
455  pos = Bottom;
456  break;
457  case LOC_UPPER:
458  pos = Top;
459  break;
460  case LOC_MIDDLE:
461  pos = Center;
462  break;
463  default:
464  BIASERR("no valid ypos");
465  break;
466  }
467  break;
468 
469  case LOC_RIGHT:
470  switch (ypos) {
471  case LOC_LOWER:
472  pos = BottomRight;
473  break;
474  case LOC_UPPER:
475  pos = TopRight;
476  break;
477  case LOC_MIDDLE:
478  pos = Right;
479  break;
480  default:
481  BIASERR("no valid ypos");
482  break;
483  }
484  break;
485 
486  default:
487  BIASERR("no valid xpos");
488  break;
489  }
490  return pos;
491  }
492 
493  inline bool
494  HomgPoint2D::IsInROIHomogenized(const HOMGPOINT2D_TYPE& xmin,
495  const HOMGPOINT2D_TYPE& ymin,
496  const HOMGPOINT2D_TYPE& xmax,
497  const HOMGPOINT2D_TYPE& ymax) const {
498 #ifdef BIAS_DEBUG
499  if (!IsHomogenized()) {
500  BIASERR("Supplied unhomogenized point to IsInROIHomogenized(). "
501  <<"Lucky you! Without BIAS_DEBUG enabled, you do not get this "
502  <<"warning and there would be a really wrong result here! "
503  <<"Fix your code and try again. Goodbye.");
504  BIASABORT;
505  }
506 #endif
507  return (data_[0]>=xmin) && (data_[0]<=xmax) &&
508  (data_[1]>ymin) && (data_[1]<ymax);
509  }
510 
511  // this is code duplication, but for the sake of speed, it is done this way
512  inline bool HomgPoint2D::IsInROI(const HOMGPOINT2D_TYPE& xmin,
513  const HOMGPOINT2D_TYPE& ymin,
514  const HOMGPOINT2D_TYPE& xmax,
515  const HOMGPOINT2D_TYPE& ymax) const {
516  return (data_[0]/data_[2]>=xmin) && (data_[0]/data_[2]<=xmax) &&
517  (data_[1]/data_[2]>ymin) && (data_[1]/data_[2]<ymax);
518  }
519 
520 
521 } // namespace BIAS
522 #endif
523 
void Set(const Vector< HOMGPOINT2D_TYPE > &vec)
Sets this form elements of Vector&lt;T&gt;.
Definition: HomgPoint2D.hh:182
~HomgPoint2D()
destructor
Definition: HomgPoint2D.hh:144
HomgPoint2D(const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y)
constructor using euclidic coordinates, setting the 3rd HomgPoint2D component to 1 ...
Definition: HomgPoint2D.hh:125
void Set(const T *pv)
copy the array of vectorsize beginning at *T to this-&gt;data_
Definition: Vector3.hh:532
const T * GetData() const
get the data pointer the member function itself is const (before {..}) because it doesn&#39;t change the ...
Definition: Vector3.hh:202
class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates.
Definition: HomgPoint2D.hh:67
HOMGPOINT2D_TYPE data_[VECTOR3_SIZE]
Definition: Vector3.hh:514
HomgPoint2D()
default constructor
Definition: HomgPoint2D.hh:79
enum EPosition DeterminePosition(unsigned int width, unsigned int height)
Definition: HomgPoint2D.hh:403
class for column vectors with arbitrary size
HOMGPOINT2D_TYPE Distance(const HomgPoint2D &point) const
Definition: HomgPoint2D.hh:367
bool IsInROI(const HOMGPOINT2D_TYPE &xmin, const HOMGPOINT2D_TYPE &ymin, const HOMGPOINT2D_TYPE &xmax, const HOMGPOINT2D_TYPE &ymax) const
determines if point is within rectangular RegionOfInterest
Definition: HomgPoint2D.hh:512
HOMGPOINT2D_TYPE GetW() const
Definition: HomgPoint2D.hh:140
void GetEuclidean(Vector2< HOMGPOINT2D_TYPE > &dest) const
calculate affine coordinates of this and write them to dest affine coordinates are projective coordin...
Definition: HomgPoint2D.hh:244
HomgPoint2D & Homogenize()
homogenize class data member elements to W==1 by divison by W
Definition: HomgPoint2D.hh:215
HomgPoint2D(const HOMGPOINT2D_TYPE *pv)
assignment with an array of values which is copied into this ones class members
Definition: HomgPoint2D.hh:102
HOMGPOINT2D_TYPE GetEuclidianY() const
Definition: HomgPoint2D.hh:294
HOMGPOINT2D_TYPE GetEuclidianX() const
Definition: HomgPoint2D.hh:291
const T * GetData() const
get the data pointer the member function itself is const (before {..}) because it doesn&#39;t change the ...
Definition: Vector2.hh:236
bool GetImageCoo(unsigned int width, unsigned int height, unsigned int coo[2])
return image coordinates for drawing , coo[0]=x, coo[1]=y
Definition: HomgPoint2D.hh:388
HomgPoint2D(const HomgPoint2D &p)
constructor
Definition: HomgPoint2D.hh:90
class Vector2 contains a Vector of dim.
Definition: Vector2.hh:79
bool IsAtInfinity() const
Definition: HomgPoint2D.hh:165
Vector2< HOMGPOINT2D_TYPE > GetEuclidian() const
Definition: HomgPoint2D.hh:266
HomgPoint2D & operator=(const Vector3< HOMGPOINT2D_TYPE > &vec)
assignment operator set the elements of this HomgPoint to the element of vec
Definition: HomgPoint2D.hh:150
HomgPoint2D(char *s)
constructor with element assignment
Definition: HomgPoint2D.hh:107
bool IsNormalized() const
Definition: HomgPoint2D.hh:208
void GetEuclidian(Vector2< HOMGPOINT2D_TYPE > &dest) const
Definition: HomgPoint2D.hh:263
HomgPoint2D(const Vector3< double > &vec)
constructor from Vector3
Definition: HomgPoint2D.hh:110
std::ostream & operator<<(std::ostream &os, const Array2D< T > &arg)
Definition: Array2D.hh:260
class Vector3 contains a Vector of fixed dim.
Definition: Matrix.hh:53
void Set(const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y, const HOMGPOINT2D_TYPE &z)
Definition: HomgPoint2D.hh:177
bool Equal(const T left, const T right, const T eps)
comparison function for floating point values See http://www.boost.org/libs/test/doc/components/test_...
bool operator==(const HomgPoint2D &arg) const
Comparison operator &#39;equal&#39;.
Definition: HomgPoint2D.hh:308
Vector2< HOMGPOINT2D_TYPE > GetEuclidean() const
return the euclidean coordinates of this homg 2D point Only possible for w !=0 because w==0 describes...
Definition: HomgPoint2D.hh:256
HomgPoint2D(const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y, const HOMGPOINT2D_TYPE &w)
constructor
Definition: HomgPoint2D.hh:135
HomgPoint2D(const Vector2< HOMGPOINT2D_TYPE > &vec)
constructor
Definition: HomgPoint2D.hh:118
bool IsInROIHomogenized(const HOMGPOINT2D_TYPE &xmin, const HOMGPOINT2D_TYPE &ymin, const HOMGPOINT2D_TYPE &xmax, const HOMGPOINT2D_TYPE &ymax) const
determines if point is within rectangular RegionOfInterest
Definition: HomgPoint2D.hh:494
HomgPoint2D(const HOMGPOINT2D_TYPE &scalar)
assignment with a constant value for all elements
Definition: HomgPoint2D.hh:96
void Set(const Vector2< HOMGPOINT2D_TYPE > &vec)
set from Vector2
Definition: HomgPoint2D.hh:194
HOMGPOINT2D_TYPE GetEuclideanX() const
return the euclidean coordinates Only possible for w !=0 because w==0 describes points of infinity wh...
Definition: HomgPoint2D.hh:276
void Set(const HOMGPOINT2D_TYPE &x, const HOMGPOINT2D_TYPE &y)
set elementwise with given 2 euclidean scalar values.
Definition: HomgPoint2D.hh:174
bool IsHomogenized() const
Definition: HomgPoint2D.hh:202
HOMGPOINT2D_TYPE DistanceSquared(const HomgPoint2D &point) const
Definition: HomgPoint2D.hh:377
Subscript size() const
Definition: vec.h:262
HOMGPOINT2D_TYPE GetEuclideanY() const
Definition: HomgPoint2D.hh:283