|
homog2d library
|
This namespace holds some private stuff, types here are not to be used directly by end-user code. More...
Classes | |
| struct | AlwaysFalse |
| A trick used in static_assert, so it aborts only if function is instanciated. More... | |
| struct | BaseHelper |
| Helper class for Root (Point/Line) type, used as a trick to allow partial specialization of member functions. More... | |
| class | Common |
| Common templated class for all the geometric primitives. More... | |
| struct | DataFpType |
| Helper class for used to get the underlying floating-point type, see Dtype and Common::dtype() More... | |
| struct | EllParams |
| Holds 9 parameters of Ellipse_. More... | |
| struct | HelperPL |
| struct | HelperPL< typ::IsLine > |
| struct | HelperPL< typ::IsPoint > |
| class | Inters_1 |
| class | Inters_2 |
| class | Intersect |
| Base class for intersection, gets specialized. More... | |
| class | Intersect< Inters_1, FPT > |
| One point intersection. More... | |
| class | Intersect< Inters_2, FPT > |
| Two points intersection. More... | |
| struct | IntersectCommon |
| Common stuff for intersection code. More... | |
| class | IntersectM |
| Multiple points intersections. More... | |
| class | Matrix_ |
| A simple wrapper over a 3x3 matrix, provides root functionalities. More... | |
| struct | PlHelper |
| Helper class for PolylineBase, used as a trick to allow partial specialization of member functions. More... | |
| class | RectArea |
| Helper class, holds result of intersections of two FRect_. More... | |
Typedefs | |
| template<typename T > | |
| using | matrix_t = std::array< std::array< T, 3 >, 3 > |
| An alias used to hold data of a 3x3 matrix, see detail::Matrix_. More... | |
Enumerations | |
| enum | PtTag : uint8_t { PtTag::Inside, PtTag::Outside, PtTag::OnEdge } |
| See getPtLabel( const Point2d_<FPT>& pt, const Circle_<FPT2>& circle ) More... | |
Functions | |
| template<typename FPT > | |
| Homogr_< FPT > | buildFrom4Points_Opencv (const std::vector< Point2d_< FPT >> &vpt1, const std::vector< Point2d_< FPT >> &vpt2) |
| Build Homography from 2 sets of 4 points, using Opencv. More... | |
| template<typename T1 , typename T2 , typename FPT1 , typename FPT2 > | |
| base::LPBase< T1, FPT1 > | crossProduct (const base::LPBase< T2, FPT1 > &, const base::LPBase< T2, FPT2 > &) |
| template<typename Out , typename In , typename FPT1 , typename FPT2 > | |
| base::LPBase< Out, FPT1 > | crossProduct (const base::LPBase< In, FPT1 > &r1, const base::LPBase< In, FPT2 > &r2) |
| Cross product of points * points or line * line. More... | |
| template<typename FPT1 , typename FPT2 > | |
| HOMOG2D_INUMTYPE | crossProductV (const base::SegVec< typ::IsOSeg, FPT1 > &v1, const base::SegVec< typ::IsOSeg, FPT2 > &v2) |
| Cross product of two oriented segments, return a scalar. More... | |
| template<typename T > | |
| void | drawPt (img::Image< T > &img, img::PtStyle ps, std::vector< Point2d_< float >> vpt, const img::DrawParams &dp, bool drawDiag=false) |
| Private helper function, used by LPBase<IsPoint>::draw(). Draw point on image. More... | |
| template<typename FPT > | |
| PointPair_< FPT > | getCorrectPoints (const Point2d_< FPT > &p0, const Point2d_< FPT > &p1) |
| Private free function, get top-left and bottom-right points from two arbitrary points. More... | |
| template<typename FPT , typename FPT2 > | |
| PtTag | getPtLabel (const Point2d_< FPT > &pt, const Circle_< FPT2 > &circle) |
Returns a label characterizing point pt, related to circle: inside, outside, or on edge of circle. More... | |
| template<typename T1 , typename T2 > | |
| Matrix_< T1 > | operator* (const Matrix_< T1 > &h1, const Matrix_< T2 > &h2) |
| template<typename U > | |
| std::ostream & | operator<< (std::ostream &f, const EllParams< U > &par) |
| template<typename FPT1 , typename FPT2 , typename FPT3 > | |
| void | product (Matrix_< FPT1 > &out, const Matrix_< FPT2 > &h1, const Matrix_< FPT3 > &h2) |
| Implementation of product 3x3 by 3x3. More... | |
| template<typename T1 , typename T2 , typename FPT1 , typename FPT2 > | |
| void | product (base::LPBase< T1, FPT1 > &out, const Matrix_< FPT2 > &h, const base::LPBase< T2, FPT1 > &in) |
| Implementation of product 3x3 by 3x1. More... | |
| template<typename FPT1 , typename FPT2 > | |
| bool | ptIsInside (const Point2d_< FPT1 > &pt, const Point2d_< FPT2 > &p00, const Point2d_< FPT2 > &p11) |
Private free function, returns true if point pt is inside the rectangle defined by (p00 , p11) More... | |
| template<typename FPT1 , typename FPT2 > | |
| bool | shareCommonCoord (const Point2d_< FPT1 > &p1, const Point2d_< FPT2 > &p2) |
| Returns true if one of the points share a common coordinate (thus making them unable to define a bounding box) More... | |
| template<typename FPT1 , typename FPT2 > | |
| bool | shareCommonCoord (const std::pair< Point2d_< FPT1 >, Point2d_< FPT2 >> &ppts) |
| Returns true if one of the points share a common coordinate (thus making them unable to define a bounding box) More... | |
This namespace holds some private stuff, types here are not to be used directly by end-user code.
Inner implementation details.
| using h2d::detail::matrix_t = typedef std::array<std::array<T,3>,3> |
An alias used to hold data of a 3x3 matrix, see detail::Matrix_.
|
strong |
See getPtLabel( const Point2d_<FPT>& pt, const Circle_<FPT2>& circle )
| Enumerator | |
|---|---|
| Inside | |
| Outside | |
| OnEdge | |
| Homogr_<FPT> h2d::detail::buildFrom4Points_Opencv | ( | const std::vector< Point2d_< FPT >> & | vpt1, |
| const std::vector< Point2d_< FPT >> & | vpt2 | ||
| ) |
Build Homography from 2 sets of 4 points, using Opencv.
cv::getPerspectiveTransform() requires that the points are "CV_32F" (float), and NOT double. | vpt1 | source points |
| vpt2 | destination points |

| base::LPBase<T1,FPT1> h2d::detail::crossProduct | ( | const base::LPBase< T2, FPT1 > & | , |
| const base::LPBase< T2, FPT2 > & | |||
| ) |
| base::LPBase<Out,FPT1> h2d::detail::crossProduct | ( | const base::LPBase< In, FPT1 > & | r1, |
| const base::LPBase< In, FPT2 > & | r2 | ||
| ) |
Cross product of points * points or line * line.

| HOMOG2D_INUMTYPE h2d::detail::crossProductV | ( | const base::SegVec< typ::IsOSeg, FPT1 > & | v1, |
| const base::SegVec< typ::IsOSeg, FPT2 > & | v2 | ||
| ) |
Cross product of two oriented segments, return a scalar.


| void h2d::detail::drawPt | ( | img::Image< T > & | img, |
| img::PtStyle | ps, | ||
| std::vector< Point2d_< float >> | vpt, | ||
| const img::DrawParams & | dp, | ||
| bool | drawDiag = false |
||
| ) |
Private helper function, used by LPBase<IsPoint>::draw(). Draw point on image.


| PointPair_<FPT> h2d::detail::getCorrectPoints | ( | const Point2d_< FPT > & | p0, |
| const Point2d_< FPT > & | p1 | ||
| ) |
Private free function, get top-left and bottom-right points from two arbitrary points.
Throws if one of the coordinates is equal to the other (x1=x2 or y1=y2)


| PtTag h2d::detail::getPtLabel | ( | const Point2d_< FPT > & | pt, |
| const Circle_< FPT2 > & | circle | ||
| ) |
Returns a label characterizing point pt, related to circle: inside, outside, or on edge of circle.


| Matrix_<T1> h2d::detail::operator* | ( | const Matrix_< T1 > & | h1, |
| const Matrix_< T2 > & | h2 | ||
| ) |

| std::ostream& h2d::detail::operator<< | ( | std::ostream & | f, |
| const EllParams< U > & | par | ||
| ) |
| void h2d::detail::product | ( | Matrix_< FPT1 > & | out, |
| const Matrix_< FPT2 > & | h1, | ||
| const Matrix_< FPT3 > & | h2 | ||
| ) |
Implementation of product 3x3 by 3x3.

| void h2d::detail::product | ( | base::LPBase< T1, FPT1 > & | out, |
| const Matrix_< FPT2 > & | h, | ||
| const base::LPBase< T2, FPT1 > & | in | ||
| ) |
Implementation of product 3x3 by 3x1.

| bool h2d::detail::ptIsInside | ( | const Point2d_< FPT1 > & | pt, |
| const Point2d_< FPT2 > & | p00, | ||
| const Point2d_< FPT2 > & | p11 | ||
| ) |
Private free function, returns true if point pt is inside the rectangle defined by (p00 , p11)


| bool h2d::detail::shareCommonCoord | ( | const Point2d_< FPT1 > & | p1, |
| const Point2d_< FPT2 > & | p2 | ||
| ) |
Returns true if one of the points share a common coordinate (thus making them unable to define a bounding box)

| bool h2d::detail::shareCommonCoord | ( | const std::pair< Point2d_< FPT1 >, Point2d_< FPT2 >> & | ppts | ) |
Returns true if one of the points share a common coordinate (thus making them unable to define a bounding box)

1.8.13