cvlee.cpp.svn-base

来自「非结构化路识别」· SVN-BASE 代码 · 共 1,445 行 · 第 1/5 页

SVN-BASE
1,445
字号
                                float &Radius);


/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : Function computes intersection of two edges. Intersection
                    must be the nearest to the marked point on pEdge1
                    (this marked point is pEdge1->node1->node).
    Arguments 
    pEdge1 : in,  parabolic ray
    pEdge2: in,  parabolic ray 
        pPoint: out, intersection of pEdge1 and pEdge2
        Radius: out, distance between pPoint and sites, assosiated
                    with pEdge1 and pEdge2 (pPoint is situated on the equal
                    distance from site, assosiated with pEdge1 and from
                    site,assosiated with pEdge2)
      Return    : distance between pPoint and marked point on pEdge1 or
                : -1, if edges have no intersections
    --------------------------------------------------------------------------*/
OPENCVAPI
float _cvPar_OpenParIntersection(pCvVoronoiEdge pEdge1,
                            pCvVoronoiEdge pEdge2,
                            pCvPointFloat  pPoint,
                            float &Radius);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : Function computes intersection of two edges. Intersection
                    must be the nearest to the marked point on pEdge1
                    (this marked point is pEdge1->node1->node).
    Arguments 
    pEdge1 : in,  parabolic ray
    pEdge2: in,  parabolic segment
        pPoint: out, intersection of pEdge1 and pEdge2
        Radius: out, distance between pPoint and sites, assosiated
                    with pEdge1 and pEdge2 (pPoint is situated on the equal
                    distance from site, assosiated with pEdge1 and from
                    site,assosiated with pEdge2)
      Return    : distance between pPoint and marked point on pEdge1 or
                : -1, if edges have no intersections
    --------------------------------------------------------------------------*/
OPENCVAPI
float _cvPar_CloseParIntersection(pCvVoronoiEdge pEdge1,
                            pCvVoronoiEdge pEdge2,
                            pCvPointFloat  pPoint,
                            float &Radius);

/*////////////////////////////////////////////////////////////////////////////////////////
//                           Subsidiary functions                                       //
////////////////////////////////////////////////////////////////////////////////////////*/

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : 
    Arguments 
        pEdge1  : in
        pEdge2  : out
     Return     : 
    --------------------------------------------------------------------------*/
OPENCVAPI CV_INLINE
void _cvMakeTwinEdge(pCvVoronoiEdge pEdge2,
                     pCvVoronoiEdge pEdge1);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : 
    Arguments 
        pEdge   : in&out
        pEdge_left_prev : in&out
        pSite_left : in&out
     Return     : 
    --------------------------------------------------------------------------*/
OPENCVAPI CV_INLINE
void _cvStickEdgeLeftBegin(pCvVoronoiEdge pEdge, 
                          pCvVoronoiEdge pEdge_left_prev,
                          pCvVoronoiSite pSite_left);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : 
    Arguments 
        pEdge   : in&out
        pEdge_right_next : in&out
        pSite_right : in&out
     Return     : 
    --------------------------------------------------------------------------*/
OPENCVAPI CV_INLINE
void _cvStickEdgeRightBegin(pCvVoronoiEdge pEdge, 
                          pCvVoronoiEdge pEdge_right_next,
                          pCvVoronoiSite pSite_right);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : 
    Arguments 
        pEdge   : in&out
        pEdge_left_next : in&out
        pSite_left : in&out
     Return     : 
    --------------------------------------------------------------------------*/
OPENCVAPI CV_INLINE
void _cvStickEdgeLeftEnd(pCvVoronoiEdge pEdge, 
                        pCvVoronoiEdge pEdge_left_next,
                        pCvVoronoiSite pSite_left);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : 
    Arguments 
        pEdge   : in&out
        pEdge_right_prev : in&out
        pSite_right : in&out
     Return     : 
    --------------------------------------------------------------------------*/
OPENCVAPI CV_INLINE
void _cvStickEdgeRightEnd(pCvVoronoiEdge pEdge, 
                         pCvVoronoiEdge pEdge_right_prev,
                         pCvVoronoiSite pSite_right);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : 
    Arguments 
        pEdge_left_cur  : in
        pEdge_left : in
     Return     : 
    --------------------------------------------------------------------------*/
OPENCVAPI CV_INLINE
void _cvTwinNULLLeft(pCvVoronoiEdge pEdge_left_cur,
                    pCvVoronoiEdge pEdge_left);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : 
    Arguments 
        pEdge_right_cur : in
        pEdge_right : in
     Return     : 
    --------------------------------------------------------------------------*/
OPENCVAPI CV_INLINE
void _cvTwinNULLRight(pCvVoronoiEdge pEdge_right_cur,
                     pCvVoronoiEdge pEdge_right);


/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : function initializes the struct CvVoronoiNode
    Arguments 
        pNode   : out
         pPoint : in, 
        radius  : in
     Return     : 
    --------------------------------------------------------------------------*/
template <class T> CV_INLINE
void _cvInitVoronoiNode(pCvVoronoiNode pNode,
                       T pPoint, float radius = 0);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : function initializes the struct CvVoronoiSite
    Arguments 
        pSite   : out
         pNode1,pNode2,pPrev_site : in 
     Return     : 
    --------------------------------------------------------------------------*/
OPENCVAPI CV_INLINE
void _cvInitVoronoiSite(pCvVoronoiSite pSite,
                       pCvVoronoiNode pNode1,
                       pCvVoronoiNode pNode2,
                       pCvVoronoiSite pPrev_site);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : function pushs the element in the end of the sequence
                    end returns its adress
    Arguments 
            Seq : in, pointer to the sequence
           Elem : in, element 
     Return     : pointer to the element in the sequence
    --------------------------------------------------------------------------*/
template <class T> CV_INLINE
T _cvSeqPush(CvSeq* Seq, T pElem);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : function pushs the element in the begin of the sequence
                    end returns its adress
    Arguments 
            Seq : in, pointer to the sequence
           Elem : in, element 
     Return     : pointer to the element in the sequence
    --------------------------------------------------------------------------*/
template <class T> CV_INLINE
T _cvSeqPushFront(CvSeq* Seq, T pElem); 

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : function pushs the element pHole in pHoleHierarchy->HoleSeq
                     so as all elements in this sequence would be normalized
                     according to field .x_coord of element. pHoleHierarchy->TopHole
                     points to hole with smallest x_coord.
    Arguments 
pHoleHierarchy  : in, pointer to the structur
          pHole : in, element 
     Return     : pointer to the element in the sequence
    --------------------------------------------------------------------------*/
OPENCVAPI CV_INLINE
void _cvSeqPushInOrder(CvVoronoiDiagramInt* pVoronoiDiagram, pCvVoronoiHole pHole);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : function intersects given edge pEdge (and his twin edge)
                    by point pNode on two parts
    Arguments 
        pEdge   : in, given edge
          pNode : in, given point
        EdgeSeq : in
     Return     : one of parts
    --------------------------------------------------------------------------*/
OPENCVAPI CV_INLINE
pCvVoronoiEdge _cvDivideRightEdge(pCvVoronoiEdge pEdge,
                                 pCvVoronoiNode pNode, 
                                 CvSeq* EdgeSeq);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : function intersects given edge pEdge (and his twin edge)
                    by point pNode on two parts
    Arguments 
        pEdge   : in, given edge
          pNode : in, given point
        EdgeSeq : in
     Return     : one of parts
    --------------------------------------------------------------------------*/
OPENCVAPI CV_INLINE
pCvVoronoiEdge _cvDivideLeftEdge(pCvVoronoiEdge pEdge,
                                pCvVoronoiNode pNode, 
                                CvSeq* EdgeSeq);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : function pushs the element in the end of the sequence
                    end returns its adress
    Arguments 
          writer: in, writer associated with sequence
          pElem : in, element 
     Return     : pointer to the element in the sequence
    --------------------------------------------------------------------------*/
template<class T> CV_INLINE
T _cvWriteSeqElem(T pElem, CvSeqWriter &writer);

/*////////////////////////////////////////////////////////////////////////////////////////
//                           Mathematical functions                                     //
////////////////////////////////////////////////////////////////////////////////////////*/

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : Function changes x and y
    Arguments 
            x,y : in&out
      Return    : 
    --------------------------------------------------------------------------*/
template <class T> CV_INLINE
void _cvSwap(T &x, T &y);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : Function computes the inverse map to the 
                    given ortogonal affine map
    Arguments 
            A   : in, given ortogonal affine map
            B   : out, inverse map
      Return    : 1, if inverse map exist
                  0, else
    --------------------------------------------------------------------------*/
template <class T> CV_INLINE
int _cvCalcOrtogInverse(T* B, T* A);

/*--------------------------------------------------------------------------
    Author      : Andrey Sobolev
    Description : Function computes the composition of two affine maps
    Arguments 
            A,B : in, given affine maps
            Result: out, composition of A and B (Result = AB)
      Return    : 
    --------------------------------------------------------------------------*/
template <class T> CV_INLINE
void _cvCalcComposition(T* Result,T* A,T* B);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?