Basic Image AlgorithmS Library
2.8.0
|
a line l = (a b c)^T is a form of the implicit straight line equation 0 = a*x + b*y + c if homogenized, a^2 + b^2 = 1 beware: (a b) is the vector perpendicular to the line direction therefor b could be interpreted as dx, but then a is equal to -dy More...
#include <Base/Geometry/HomgLine2D.hh>
Public Types | |
typedef HOMGLINE2D_TYPE | value_type |
Public Member Functions | |
HOMGLINE2D_TYPE | Distance (const HomgPoint2D &point) |
calculates distance of a point from line More... | |
HOMGLINE2D_TYPE | DistanceSquared (const HomgPoint2D &point) |
calculates squared distance of a point from line More... | |
bool | GetIntersectionsWithImage (unsigned int width, unsigned int height, unsigned int coo[4]) |
! assumes line is given in pixel coo ! returns true if line intersects with image of given size returns intersections with image ( x1 = coo[0], y1 = coo[1], x2 = coo[2], y2 = coo[3] ) for usage with DrawLine More... | |
void | GetPerpendicularLine (HomgPoint2D &point, HomgLine2D &perpline) |
return perpendicular line throug point More... | |
HOMGLINE2D_TYPE | GetW () |
returns length of hypothenuse in gradient triangle More... | |
HomgLine2D () | |
HomgLine2D (const Vector3< HOMGLINE2D_TYPE > &vec) | |
HomgLine2D (HOMGLINE2D_TYPE a, HOMGLINE2D_TYPE b, HOMGLINE2D_TYPE c) | |
HomgLine2D (const HomgLine2D &line) | |
copy constructor More... | |
HomgLine2D (const HomgPoint2D &p1, const HomgPoint2D &p2) | |
constructing a line through two points More... | |
void | Homogenize () |
aequivalent to homogenize for points the gradient triangle is normed to hypothenuse length of 1 More... | |
void | Intersection (const HomgLine2D &line, HomgPoint2D &intersect) const |
calculates homogenized intersection of two lines More... | |
HomgPoint2D | Intersection (const HomgLine2D &line) const |
calls the above More... | |
void | Set (const HomgPoint2D &p1, const HomgPoint2D &p2) |
constructing a line through two points More... | |
~HomgLine2D () | |
destructor More... | |
Iterator Functions | |
HOMGLINE2D_TYPEconst * | begin () const |
Iterator to first component of vector. More... | |
HOMGLINE2D_TYPE * | begin () |
HOMGLINE2D_TYPEconst * | end () const |
Iterator pointing to one element after the last vector element. More... | |
HOMGLINE2D_TYPE * | end () |
Set Functions | |
void | Set (const HOMGLINE2D_TYPE *pv) |
copy the array of vectorsize beginning at *T to this->data_ More... | |
void | Set (const HOMGLINE2D_TYPE &scalar) |
set all elements to a scalar value More... | |
void | Set (const HOMGLINE2D_TYPE &x, const HOMGLINE2D_TYPE &y, const HOMGLINE2D_TYPE &z) |
set elementwise with given scalar values More... | |
void | Set (const Vector< HOMGLINE2D_TYPE > &vec) |
Sets this form elements of Vector<T>. More... | |
void | SetZero () |
set all values to 0 More... | |
void | clear () |
stl conform interface More... | |
Get Functions | |
const unsigned int | Size () const |
const unsigned int | size () const |
const unsigned int | GetNumElements () const |
bool | IsZero () const |
double | Length () const |
returns the Euclidean Length of the Vector More... | |
const HOMGLINE2D_TYPE * | GetData () const |
get the data pointer the member function itself is const (before {..}) because it doesn't change the this object. More... | |
HOMGLINE2D_TYPE * | GetData () |
HOMGLINE2D_TYPE | NormL1 () const |
Return the L1 norm: |a| + |b| + |c|. More... | |
double | NormL2 () const |
the L2 norm sqrt(a^2 + b^2 + c^2) More... | |
double | Dist (const Vector3< HOMGLINE2D_TYPE > &vec) const |
Return the euclidean distance of 2 vectors. More... | |
double | DistLinf (const Vector3< HOMGLINE2D_TYPE > &vec) const |
Return the L inf distance of 2 vectors. More... | |
Normalization | |
Vector3< HOMGLINE2D_TYPE > & | Normalize () |
normalize this vector to length 1 More... | |
Vector3< HOMGLINE2D_TYPE > & | Normalize (Matrix3x3< HOMGLINE2D_TYPE > &cov) |
normalizes the vector to 1 and transfroms the associated covariance matrix More... | |
BIAS::Vector3< HOMGLINE2D_TYPE > | GetNormalized () const |
return a normalized vector of this More... | |
Arithmetic | |
void | CrossProduct (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const |
cross product of two vectors destvec = this x argvec More... | |
Vector3< HOMGLINE2D_TYPE > | CrossProduct (const Vector3< HOMGLINE2D_TYPE > &argvec) const |
void | ScalarProduct (const Vector3< HOMGLINE2D_TYPE > &argvec, HOMGLINE2D_TYPE &result) const |
scalar product (=inner product) of two vectors, storing the result in result More... | |
HOMGLINE2D_TYPE | ScalarProduct (const Vector3< HOMGLINE2D_TYPE > &argvec) const |
scalar product (=inner product) of two vectors returns a scalar More... | |
void | ElementwiseProduct (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const |
multiply two vectors elementwise and store the result vector to destvec More... | |
Vector3< HOMGLINE2D_TYPE > | ElementwiseProduct (const Vector3< HOMGLINE2D_TYPE > &argvec) const |
multiply two vectors elementwise and return the result vector More... | |
void | ElementwiseDivision (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const |
Vector3< HOMGLINE2D_TYPE > | ElementwiseDivision (const Vector3< HOMGLINE2D_TYPE > &argvec) const |
divide elementwise More... | |
void | AddIP (const HOMGLINE2D_TYPE &scalar) |
Addition (in place) of an scalar. More... | |
void | AddIP (const Vector3< HOMGLINE2D_TYPE > &argvec) |
in place adding More... | |
void | Add (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const |
Addition with a scalar, storing results in destionation vector. More... | |
void | Add (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const |
adding of two vectors, storing the result in destvec More... | |
void | SubIP (const HOMGLINE2D_TYPE &scalar) |
Substraction (in place) of an scalar. More... | |
void | SubIP (const Vector3< HOMGLINE2D_TYPE > &argvec) |
in place substraction More... | |
void | Sub (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const |
Substraction with a scalar, storing results in destination vector. More... | |
void | Sub (const Vector3< HOMGLINE2D_TYPE > &argvec, Vector3< HOMGLINE2D_TYPE > &destvec) const |
subtracting of two Vectors, storing the result in destvec More... | |
void | MultiplyIP (const HOMGLINE2D_TYPE &scalar) |
Multiplication (in place) of an scalar. More... | |
void | MultIP (const HOMGLINE2D_TYPE &scalar) |
void | Multiply (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const |
Multiplication with a scalar, storing results in destination vector. More... | |
void | Mult (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const |
void | DivideIP (const HOMGLINE2D_TYPE &scalar) |
Division (in place) of an scalar. More... | |
void | DivIP (const HOMGLINE2D_TYPE &scalar) |
void | Divide (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const |
Division with a scalar, storing results in destination vector. More... | |
void | Div (const HOMGLINE2D_TYPE &scalar, Vector3< HOMGLINE2D_TYPE > &dest) const |
Misc | |
void | OuterProduct (const Vector3< HOMGLINE2D_TYPE > &v, Matrix3x3< HOMGLINE2D_TYPE > &res) const |
outer product, constructs a matrix. More... | |
Matrix3x3< HOMGLINE2D_TYPE > | OuterProduct (const Vector3< HOMGLINE2D_TYPE > &v) const |
Matrix< HOMGLINE2D_TYPE > | GetSkewSymmetricMatrix () const |
constructs a skew symmetric 3x3 matrix from (*this), which can be used instead of the cross product More... | |
BIAS::Vector3< HOMGLINE2D_TYPE > | CoordSphereToEuclidean () const |
coordinate transfrom. More... | |
BIAS::Vector3< HOMGLINE2D_TYPE > | PolarToCartesian () const |
BIAS::Vector3< HOMGLINE2D_TYPE > | CoordSphereToEuclidian () const |
BIAS::Vector3< HOMGLINE2D_TYPE > | CoordEuclideanToSphere () const |
coordinate transform. More... | |
BIAS::Vector3< HOMGLINE2D_TYPE > | CartesianToPolar () const |
BIAS::Vector3< HOMGLINE2D_TYPE > | CoordEuclidianToSphere () const |
HOMGLINE2D_TYPE & | Radius () |
r for polar/sphere content JW More... | |
HOMGLINE2D_TYPE | Radius () const |
HOMGLINE2D_TYPE & | Phi () |
HOMGLINE2D_TYPE | Phi () const |
HOMGLINE2D_TYPE & | Theta () |
HOMGLINE2D_TYPE | Theta () const |
int | LoadBogTC (const std::string &filename) |
reads the TC part of a BOG file which is used by Daimler Chrysler for storing Camera center position. More... | |
bool | Load (const std::string &filename) |
method to load directly from a given filename. More... | |
bool | Save (const std::string &filename) const |
method to save directly to a given filename. More... | |
Operators | |
const HOMGLINE2D_TYPE & | operator[] (const int i) const |
access an element of the vector with 0-based indizes. More... | |
HOMGLINE2D_TYPE & | operator[] (const int i) |
access an element of the vector with 0-based indizes. More... | |
bool | operator== (const Vector3< HOMGLINE2D_TYPE > &arg) const |
Comparison operator 'equal'. More... | |
bool | operator!= (const Vector3< HOMGLINE2D_TYPE > &arg) const |
Comparison operator 'not equal'. More... | |
Protected Attributes | |
HOMGLINE2D_TYPE | data_ [VECTOR3_SIZE] |
a line l = (a b c)^T is a form of the implicit straight line equation 0 = a*x + b*y + c if homogenized, a^2 + b^2 = 1 beware: (a b) is the vector perpendicular to the line direction therefor b could be interpreted as dx, but then a is equal to -dy
Definition at line 48 of file HomgLine2D.hh.
|
inherited |
Definition at line 76 of file Vector3.hh.
|
inline |
Definition at line 109 of file HomgLine2D.hh.
References BIAS::Vector3< HOMGLINE2D_TYPE >::data_.
|
inlineexplicit |
Definition at line 112 of file HomgLine2D.hh.
References BIAS::Vector3< HOMGLINE2D_TYPE >::data_.
|
inline |
Definition at line 115 of file HomgLine2D.hh.
References BIAS::Vector3< HOMGLINE2D_TYPE >::data_.
|
inline |
copy constructor
Definition at line 121 of file HomgLine2D.hh.
References BIAS::Vector3< HOMGLINE2D_TYPE >::data_.
|
inline |
constructing a line through two points
Definition at line 125 of file HomgLine2D.hh.
References Set().
|
inline |
destructor
Definition at line 65 of file HomgLine2D.hh.
|
inlineinherited |
Addition with a scalar, storing results in destionation vector.
|
inlineinherited |
adding of two vectors, storing the result in destvec
|
inlineinherited |
Addition (in place) of an scalar.
Definition at line 310 of file Vector3.hh.
|
inlineinherited |
in place adding
Definition at line 349 of file Vector3.hh.
|
inlineinherited |
Iterator to first component of vector.
Definition at line 134 of file Vector3.hh.
|
inlineinherited |
Definition at line 137 of file Vector3.hh.
|
inlineinherited |
Definition at line 422 of file Vector3.hh.
|
inlineinherited |
stl conform interface
|
inherited |
coordinate transform.
compute the sphere coordinates(r, phi, theta) for (this) given euclidean point p=(x,y,z) with radius : distance to center, theta : radian angle between positive z-axis and p=(x,y,z). (0-pi) phi : radian angle between positive x-axis and projection of p=(x,y,z) into XY plane. (0-2pi) assume (x,y,z) is in orthogonal right-hand-system.
|
inlineinherited |
Definition at line 426 of file Vector3.hh.
|
inherited |
coordinate transfrom.
compute the euclidean coord p=(x,y,z) for (this) given sphere coord sph=(radius, phi, theta) with radius : distance to center, theta : radian angle between positive z-axis and p=(x,y,z). (0-pi) phi : radian angle between positive x-axis and projection of p=(x,y,z) into XY plane. (0-2pi) assume (x,y,z) is in orthogonal right-hand-system.
|
inlineinherited |
Definition at line 407 of file Vector3.hh.
|
inlineinherited |
cross product of two vectors destvec = this x argvec
Referenced by Intersection().
|
inlineinherited |
Definition at line 267 of file Vector3.hh.
|
inlineinherited |
Return the euclidean distance of 2 vectors.
|
inline |
calculates distance of a point from line
Definition at line 78 of file HomgLine2D.hh.
|
inline |
calculates squared distance of a point from line
Definition at line 160 of file HomgLine2D.hh.
References BIAS::Vector3< HOMGLINE2D_TYPE >::data_.
|
inlineinherited |
Return the L inf distance of 2 vectors.
|
inlineinherited |
Definition at line 343 of file Vector3.hh.
|
inlineinherited |
Division with a scalar, storing results in destination vector.
|
inlineinherited |
Division (in place) of an scalar.
|
inlineinherited |
Definition at line 338 of file Vector3.hh.
|
inlineinherited |
|
inlineinherited |
divide elementwise
Definition at line 300 of file Vector3.hh.
|
inlineinherited |
multiply two vectors elementwise and store the result vector to destvec
|
inlineinherited |
multiply two vectors elementwise and return the result vector
Definition at line 288 of file Vector3.hh.
|
inlineinherited |
Iterator pointing to one element after the last vector element.
Definition at line 143 of file Vector3.hh.
Referenced by BIAS::EpipolarLine::Draw(), BIAS::EpipolarLine::DrawDistortedLine(), and BIAS::EpipolarLine::DrawWhole().
|
inlineinherited |
Definition at line 146 of file Vector3.hh.
|
inlineinherited |
get the data pointer the member function itself is const (before {..}) because it doesn't change the this object.
Definition at line 202 of file Vector3.hh.
|
inlineinherited |
Definition at line 203 of file Vector3.hh.
bool HomgLine2D::GetIntersectionsWithImage | ( | unsigned int | width, |
unsigned int | height, | ||
unsigned int | coo[4] | ||
) |
! assumes line is given in pixel coo ! returns true if line intersects with image of given size returns intersections with image ( x1 = coo[0], y1 = coo[1], x2 = coo[2], y2 = coo[3] ) for usage with DrawLine
Definition at line 28 of file HomgLine2D.cpp.
References BIAS::HomgPoint2D::Homogenize().
Referenced by BIAS::GenGroundTruth::DrawMatches().
|
inherited |
return a normalized vector of this
norm. to length 1
|
inlineinherited |
Definition at line 187 of file Vector3.hh.
|
inline |
return perpendicular line throug point
Definition at line 187 of file HomgLine2D.hh.
References BIAS::Vector3< HOMGLINE2D_TYPE >::data_, and BIAS::HomgPoint2D::Homogenize().
Referenced by BIAS::TrifocalTensor::TransferView3().
|
inherited |
constructs a skew symmetric 3x3 matrix from (*this), which can be used instead of the cross product
|
inline |
returns length of hypothenuse in gradient triangle
Definition at line 144 of file HomgLine2D.hh.
References BIAS::Vector3< HOMGLINE2D_TYPE >::data_.
Referenced by Homogenize().
|
inline |
aequivalent to homogenize for points the gradient triangle is normed to hypothenuse length of 1
Definition at line 149 of file HomgLine2D.hh.
References BIAS::Vector3< HOMGLINE2D_TYPE >::data_, and GetW().
Referenced by BIAS::FMatrixBase::GetCosAngleErrorHomogenized(), BIAS::EpipolarLine::GetNextLine(), BIAS::EpipolarLine::Init(), BIAS::EpipolarLine::Recalc(), BIAS::EpipolarLine::ScanLine(), and Set().
|
inline |
calculates homogenized intersection of two lines
Definition at line 180 of file HomgLine2D.hh.
References BIAS::Vector3< HOMGLINE2D_TYPE >::CrossProduct().
Referenced by BIAS::EpipolarLine::DetermineIntersectionsAndEpipoleDistances_(), and Intersection().
|
inline |
|
inlineinherited |
|
inlineinherited |
returns the Euclidean Length of the Vector
Definition at line 193 of file Vector3.hh.
|
inherited |
method to load directly from a given filename.
internally using stream operator
|
inherited |
reads the TC part of a BOG file which is used by Daimler Chrysler for storing Camera center position.
|
inlineinherited |
Definition at line 332 of file Vector3.hh.
|
inlineinherited |
Definition at line 327 of file Vector3.hh.
|
inlineinherited |
Multiplication with a scalar, storing results in destination vector.
|
inlineinherited |
Multiplication (in place) of an scalar.
Definition at line 326 of file Vector3.hh.
|
inlineinherited |
normalize this vector to length 1
|
inherited |
normalizes the vector to 1 and transfroms the associated covariance matrix
|
inlineinherited |
Return the L1 norm: |a| + |b| + |c|.
|
inlineinherited |
the L2 norm sqrt(a^2 + b^2 + c^2)
Referenced by BIAS::EpipolarLine::ProjectEpipolarPlane().
|
inlineinherited |
Comparison operator 'not equal'.
Definition at line 505 of file Vector3.hh.
|
inlineinherited |
Comparison operator 'equal'.
Definition at line 500 of file Vector3.hh.
|
inlineinherited |
access an element of the vector with 0-based indizes.
read only (no write) member function const because it doesn't change this object
|
inlineinherited |
access an element of the vector with 0-based indizes.
write allowed
|
inherited |
outer product, constructs a matrix.
Often written as (*this) * v^T for col vectors made it fast
|
inlineinherited |
Definition at line 379 of file Vector3.hh.
|
inlineinherited |
Definition at line 436 of file Vector3.hh.
|
inlineinherited |
Definition at line 438 of file Vector3.hh.
|
inlineinherited |
Definition at line 403 of file Vector3.hh.
|
inlineinherited |
r for polar/sphere content JW
Definition at line 431 of file Vector3.hh.
|
inlineinherited |
Definition at line 433 of file Vector3.hh.
|
inherited |
method to save directly to a given filename.
internally using stream operator
|
inlineinherited |
scalar product (=inner product) of two vectors, storing the result in result
|
inlineinherited |
scalar product (=inner product) of two vectors returns a scalar
|
inline |
constructing a line through two points
Definition at line 131 of file HomgLine2D.hh.
References BIAS::Vector3< T >::CrossProduct(), BIAS::Vector3< HOMGLINE2D_TYPE >::data_, and Homogenize().
Referenced by BIAS::GenGroundTruth::DrawMatches(), BIAS::FMatrixBase::GetCosAngleErrorHomogenized(), and HomgLine2D().
|
inlineinherited |
copy the array of vectorsize beginning at *T to this->data_
|
inlineinherited |
set all elements to a scalar value
Definition at line 160 of file Vector3.hh.
|
inlineinherited |
set elementwise with given scalar values
|
inlineinherited |
Sets this form elements of Vector<T>.
|
inlineinherited |
set all values to 0
|
inlineinherited |
Definition at line 183 of file Vector3.hh.
|
inlineinherited |
Definition at line 185 of file Vector3.hh.
|
inlineinherited |
Substraction with a scalar, storing results in destination vector.
|
inlineinherited |
subtracting of two Vectors, storing the result in destvec
|
inlineinherited |
Substraction (in place) of an scalar.
Definition at line 318 of file Vector3.hh.
|
inlineinherited |
in place substraction
Definition at line 359 of file Vector3.hh.
|
inlineinherited |
Definition at line 441 of file Vector3.hh.
|
inlineinherited |
Definition at line 443 of file Vector3.hh.
|
protectedinherited |
Definition at line 514 of file Vector3.hh.
Referenced by BIAS::EpipolarLine::CalcTransformed_(), DistanceSquared(), BIAS::EpipolarLine::GetNextLine(), GetPerpendicularLine(), GetW(), HomgLine2D(), Homogenize(), BIAS::EpipolarLine::Init(), BIAS::EpipolarLine::Recalc(), BIAS::EpipolarLine::ScanLine(), and Set().