Revert "remaining C-style planar subdivisions data structures are moved to legacy"
This reverts commit 4aaaef5967240d2da4d78674048c0c3a1a6fef53. Conflicts: modules/imgproc/include/opencv2/imgproc/types_c.h modules/legacy/include/opencv2/legacy/legacy.hpp
This commit is contained in:
parent
ebac3a02aa
commit
64b56d7018
@ -426,6 +426,79 @@ CvChainPtReader;
|
||||
(deltas)[6] = (step), (deltas)[7] = (step) + (nch))
|
||||
|
||||
|
||||
/****************************************************************************************\
|
||||
* Planar subdivisions *
|
||||
\****************************************************************************************/
|
||||
|
||||
typedef size_t CvSubdiv2DEdge;
|
||||
|
||||
#define CV_QUADEDGE2D_FIELDS() \
|
||||
int flags; \
|
||||
struct CvSubdiv2DPoint* pt[4]; \
|
||||
CvSubdiv2DEdge next[4];
|
||||
|
||||
#define CV_SUBDIV2D_POINT_FIELDS()\
|
||||
int flags; \
|
||||
CvSubdiv2DEdge first; \
|
||||
CvPoint2D32f pt; \
|
||||
int id;
|
||||
|
||||
#define CV_SUBDIV2D_VIRTUAL_POINT_FLAG (1 << 30)
|
||||
|
||||
typedef struct CvQuadEdge2D
|
||||
{
|
||||
CV_QUADEDGE2D_FIELDS()
|
||||
}
|
||||
CvQuadEdge2D;
|
||||
|
||||
typedef struct CvSubdiv2DPoint
|
||||
{
|
||||
CV_SUBDIV2D_POINT_FIELDS()
|
||||
}
|
||||
CvSubdiv2DPoint;
|
||||
|
||||
#define CV_SUBDIV2D_FIELDS() \
|
||||
CV_GRAPH_FIELDS() \
|
||||
int quad_edges; \
|
||||
int is_geometry_valid; \
|
||||
CvSubdiv2DEdge recent_edge; \
|
||||
CvPoint2D32f topleft; \
|
||||
CvPoint2D32f bottomright;
|
||||
|
||||
typedef struct CvSubdiv2D
|
||||
{
|
||||
CV_SUBDIV2D_FIELDS()
|
||||
}
|
||||
CvSubdiv2D;
|
||||
|
||||
|
||||
typedef enum CvSubdiv2DPointLocation
|
||||
{
|
||||
CV_PTLOC_ERROR = -2,
|
||||
CV_PTLOC_OUTSIDE_RECT = -1,
|
||||
CV_PTLOC_INSIDE = 0,
|
||||
CV_PTLOC_VERTEX = 1,
|
||||
CV_PTLOC_ON_EDGE = 2
|
||||
}
|
||||
CvSubdiv2DPointLocation;
|
||||
|
||||
typedef enum CvNextEdgeType
|
||||
{
|
||||
CV_NEXT_AROUND_ORG = 0x00,
|
||||
CV_NEXT_AROUND_DST = 0x22,
|
||||
CV_PREV_AROUND_ORG = 0x11,
|
||||
CV_PREV_AROUND_DST = 0x33,
|
||||
CV_NEXT_AROUND_LEFT = 0x13,
|
||||
CV_NEXT_AROUND_RIGHT = 0x31,
|
||||
CV_PREV_AROUND_LEFT = 0x20,
|
||||
CV_PREV_AROUND_RIGHT = 0x02
|
||||
}
|
||||
CvNextEdgeType;
|
||||
|
||||
/* get the next edge with the same origin point (counterwise) */
|
||||
#define CV_SUBDIV2D_NEXT_EDGE( edge ) (((CvQuadEdge2D*)((edge) & ~3))->next[(edge)&3])
|
||||
|
||||
|
||||
/* Contour approximation algorithms */
|
||||
enum
|
||||
{
|
||||
|
@ -57,6 +57,8 @@ int icvIntersectLines( double x1, double dx1, double y1, double dy1,
|
||||
double* t2 );
|
||||
|
||||
|
||||
void icvCreateCenterNormalLine( CvSubdiv2DEdge edge, double* a, double* b, double* c );
|
||||
|
||||
void icvIntersectLines3( double* a0, double* b0, double* c0,
|
||||
double* a1, double* b1, double* c1,
|
||||
CvPoint2D32f* point );
|
||||
|
@ -2923,74 +2923,6 @@ CVAPI(void) cvPyrSegmentation( IplImage* src, IplImage* dst,
|
||||
* Planar subdivisions *
|
||||
\****************************************************************************************/
|
||||
|
||||
typedef size_t CvSubdiv2DEdge;
|
||||
|
||||
#define CV_QUADEDGE2D_FIELDS() \
|
||||
int flags; \
|
||||
struct CvSubdiv2DPoint* pt[4]; \
|
||||
CvSubdiv2DEdge next[4];
|
||||
|
||||
#define CV_SUBDIV2D_POINT_FIELDS()\
|
||||
int flags; \
|
||||
CvSubdiv2DEdge first; \
|
||||
CvPoint2D32f pt; \
|
||||
int id;
|
||||
|
||||
#define CV_SUBDIV2D_VIRTUAL_POINT_FLAG (1 << 30)
|
||||
|
||||
typedef struct CvQuadEdge2D
|
||||
{
|
||||
CV_QUADEDGE2D_FIELDS()
|
||||
}
|
||||
CvQuadEdge2D;
|
||||
|
||||
typedef struct CvSubdiv2DPoint
|
||||
{
|
||||
CV_SUBDIV2D_POINT_FIELDS()
|
||||
}
|
||||
CvSubdiv2DPoint;
|
||||
|
||||
#define CV_SUBDIV2D_FIELDS() \
|
||||
CV_GRAPH_FIELDS() \
|
||||
int quad_edges; \
|
||||
int is_geometry_valid; \
|
||||
CvSubdiv2DEdge recent_edge; \
|
||||
CvPoint2D32f topleft; \
|
||||
CvPoint2D32f bottomright;
|
||||
|
||||
typedef struct CvSubdiv2D
|
||||
{
|
||||
CV_SUBDIV2D_FIELDS()
|
||||
}
|
||||
CvSubdiv2D;
|
||||
|
||||
typedef enum CvSubdiv2DPointLocation
|
||||
{
|
||||
CV_PTLOC_ERROR = -2,
|
||||
CV_PTLOC_OUTSIDE_RECT = -1,
|
||||
CV_PTLOC_INSIDE = 0,
|
||||
CV_PTLOC_VERTEX = 1,
|
||||
CV_PTLOC_ON_EDGE = 2
|
||||
}
|
||||
CvSubdiv2DPointLocation;
|
||||
|
||||
typedef enum CvNextEdgeType
|
||||
{
|
||||
CV_NEXT_AROUND_ORG = 0x00,
|
||||
CV_NEXT_AROUND_DST = 0x22,
|
||||
CV_PREV_AROUND_ORG = 0x11,
|
||||
CV_PREV_AROUND_DST = 0x33,
|
||||
CV_NEXT_AROUND_LEFT = 0x13,
|
||||
CV_NEXT_AROUND_RIGHT = 0x31,
|
||||
CV_PREV_AROUND_LEFT = 0x20,
|
||||
CV_PREV_AROUND_RIGHT = 0x02
|
||||
}
|
||||
CvNextEdgeType;
|
||||
|
||||
/* get the next edge with the same origin point (counterwise) */
|
||||
#define CV_SUBDIV2D_NEXT_EDGE( edge ) (((CvQuadEdge2D*)((edge) & ~3))->next[(edge)&3])
|
||||
|
||||
|
||||
/* Initializes Delaunay triangulation */
|
||||
CVAPI(void) cvInitSubdivDelaunay2D( CvSubdiv2D* subdiv, CvRect rect );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user