提交 64b56d70 编写于 作者: A Andrey Kamaev

Revert "remaining C-style planar subdivisions data structures are moved to legacy"

This reverts commit 4aaaef59.

Conflicts:
    modules/imgproc/include/opencv2/imgproc/types_c.h
    modules/legacy/include/opencv2/legacy/legacy.hpp
上级 ebac3a02
...@@ -426,6 +426,79 @@ CvChainPtReader; ...@@ -426,6 +426,79 @@ CvChainPtReader;
(deltas)[6] = (step), (deltas)[7] = (step) + (nch)) (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 */ /* Contour approximation algorithms */
enum enum
{ {
......
...@@ -57,6 +57,8 @@ int icvIntersectLines( double x1, double dx1, double y1, double dy1, ...@@ -57,6 +57,8 @@ int icvIntersectLines( double x1, double dx1, double y1, double dy1,
double* t2 ); double* t2 );
void icvCreateCenterNormalLine( CvSubdiv2DEdge edge, double* a, double* b, double* c );
void icvIntersectLines3( double* a0, double* b0, double* c0, void icvIntersectLines3( double* a0, double* b0, double* c0,
double* a1, double* b1, double* c1, double* a1, double* b1, double* c1,
CvPoint2D32f* point ); CvPoint2D32f* point );
......
...@@ -2923,74 +2923,6 @@ CVAPI(void) cvPyrSegmentation( IplImage* src, IplImage* dst, ...@@ -2923,74 +2923,6 @@ CVAPI(void) cvPyrSegmentation( IplImage* src, IplImage* dst,
* Planar subdivisions * * 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 */ /* Initializes Delaunay triangulation */
CVAPI(void) cvInitSubdivDelaunay2D( CvSubdiv2D* subdiv, CvRect rect ); CVAPI(void) cvInitSubdivDelaunay2D( CvSubdiv2D* subdiv, CvRect rect );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册