OpenCV  3.1.0
Open Source Computer Vision
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cv::Subdiv2D Class Reference

#include "imgproc.hpp"

Classes

struct  QuadEdge
 
struct  Vertex
 

Public Types

enum  {
  NEXT_AROUND_ORG = 0x00,
  NEXT_AROUND_DST = 0x22,
  PREV_AROUND_ORG = 0x11,
  PREV_AROUND_DST = 0x33,
  NEXT_AROUND_LEFT = 0x13,
  NEXT_AROUND_RIGHT = 0x31,
  PREV_AROUND_LEFT = 0x20,
  PREV_AROUND_RIGHT = 0x02
}
 
enum  {
  PTLOC_ERROR = -2,
  PTLOC_OUTSIDE_RECT = -1,
  PTLOC_INSIDE = 0,
  PTLOC_VERTEX = 1,
  PTLOC_ON_EDGE = 2
}
 

Public Member Functions

 Subdiv2D ()
 
 Subdiv2D (Rect rect)
 
int edgeDst (int edge, Point2f *dstpt=0) const
 
int edgeOrg (int edge, Point2f *orgpt=0) const
 
int findNearest (Point2f pt, Point2f *nearestPt=0)
 
int getEdge (int edge, int nextEdgeType) const
 
void getEdgeList (std::vector< Vec4f > &edgeList) const
 
void getTriangleList (std::vector< Vec6f > &triangleList) const
 
Point2f getVertex (int vertex, int *firstEdge=0) const
 
void getVoronoiFacetList (const std::vector< int > &idx, std::vector< std::vector< Point2f > > &facetList, std::vector< Point2f > &facetCenters)
 
void initDelaunay (Rect rect)
 
int insert (Point2f pt)
 
void insert (const std::vector< Point2f > &ptvec)
 
int locate (Point2f pt, int &edge, int &vertex)
 
int nextEdge (int edge) const
 
int rotateEdge (int edge, int rotate) const
 
int symEdge (int edge) const
 

Protected Member Functions

void calcVoronoi ()
 
void checkSubdiv () const
 
void clearVoronoi ()
 
int connectEdges (int edgeA, int edgeB)
 
void deleteEdge (int edge)
 
void deletePoint (int vtx)
 
int isRightOf (Point2f pt, int edge) const
 
int newEdge ()
 
int newPoint (Point2f pt, bool isvirtual, int firstEdge=0)
 
void setEdgePoints (int edge, int orgPt, int dstPt)
 
void splice (int edgeA, int edgeB)
 
void swapEdges (int edge)
 

Protected Attributes

Point2f bottomRight
 
int freePoint
 
int freeQEdge
 
std::vector< QuadEdgeqedges
 
int recentEdge
 
Point2f topLeft
 
bool validGeometry
 
std::vector< Vertexvtx
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NEXT_AROUND_ORG 
NEXT_AROUND_DST 
PREV_AROUND_ORG 
PREV_AROUND_DST 
NEXT_AROUND_LEFT 
NEXT_AROUND_RIGHT 
PREV_AROUND_LEFT 
PREV_AROUND_RIGHT 

◆ anonymous enum

anonymous enum
Enumerator
PTLOC_ERROR 
PTLOC_OUTSIDE_RECT 
PTLOC_INSIDE 
PTLOC_VERTEX 
PTLOC_ON_EDGE 

Constructor & Destructor Documentation

◆ Subdiv2D() [1/2]

cv::Subdiv2D::Subdiv2D ( )

◆ Subdiv2D() [2/2]

cv::Subdiv2D::Subdiv2D ( Rect  rect)

Member Function Documentation

◆ calcVoronoi()

void cv::Subdiv2D::calcVoronoi ( )
protected

◆ checkSubdiv()

void cv::Subdiv2D::checkSubdiv ( ) const
protected

◆ clearVoronoi()

void cv::Subdiv2D::clearVoronoi ( )
protected

◆ connectEdges()

int cv::Subdiv2D::connectEdges ( int  edgeA,
int  edgeB 
)
protected

◆ deleteEdge()

void cv::Subdiv2D::deleteEdge ( int  edge)
protected

◆ deletePoint()

void cv::Subdiv2D::deletePoint ( int  vtx)
protected

◆ edgeDst()

int cv::Subdiv2D::edgeDst ( int  edge,
Point2f dstpt = 0 
) const

◆ edgeOrg()

int cv::Subdiv2D::edgeOrg ( int  edge,
Point2f orgpt = 0 
) const

◆ findNearest()

int cv::Subdiv2D::findNearest ( Point2f  pt,
Point2f nearestPt = 0 
)

◆ getEdge()

int cv::Subdiv2D::getEdge ( int  edge,
int  nextEdgeType 
) const

◆ getEdgeList()

void cv::Subdiv2D::getEdgeList ( std::vector< Vec4f > &  edgeList) const

◆ getTriangleList()

void cv::Subdiv2D::getTriangleList ( std::vector< Vec6f > &  triangleList) const

◆ getVertex()

Point2f cv::Subdiv2D::getVertex ( int  vertex,
int *  firstEdge = 0 
) const

◆ getVoronoiFacetList()

void cv::Subdiv2D::getVoronoiFacetList ( const std::vector< int > &  idx,
std::vector< std::vector< Point2f > > &  facetList,
std::vector< Point2f > &  facetCenters 
)

◆ initDelaunay()

void cv::Subdiv2D::initDelaunay ( Rect  rect)

◆ insert() [1/2]

int cv::Subdiv2D::insert ( Point2f  pt)

◆ insert() [2/2]

void cv::Subdiv2D::insert ( const std::vector< Point2f > &  ptvec)

◆ isRightOf()

int cv::Subdiv2D::isRightOf ( Point2f  pt,
int  edge 
) const
protected

◆ locate()

int cv::Subdiv2D::locate ( Point2f  pt,
int &  edge,
int &  vertex 
)

◆ newEdge()

int cv::Subdiv2D::newEdge ( )
protected

◆ newPoint()

int cv::Subdiv2D::newPoint ( Point2f  pt,
bool  isvirtual,
int  firstEdge = 0 
)
protected

◆ nextEdge()

int cv::Subdiv2D::nextEdge ( int  edge) const

◆ rotateEdge()

int cv::Subdiv2D::rotateEdge ( int  edge,
int  rotate 
) const

◆ setEdgePoints()

void cv::Subdiv2D::setEdgePoints ( int  edge,
int  orgPt,
int  dstPt 
)
protected

◆ splice()

void cv::Subdiv2D::splice ( int  edgeA,
int  edgeB 
)
protected

◆ swapEdges()

void cv::Subdiv2D::swapEdges ( int  edge)
protected

◆ symEdge()

int cv::Subdiv2D::symEdge ( int  edge) const

Member Data Documentation

◆ bottomRight

Point2f cv::Subdiv2D::bottomRight
protected

◆ freePoint

int cv::Subdiv2D::freePoint
protected

◆ freeQEdge

int cv::Subdiv2D::freeQEdge
protected

◆ qedges

std::vector<QuadEdge> cv::Subdiv2D::qedges
protected

◆ recentEdge

int cv::Subdiv2D::recentEdge
protected

◆ topLeft

Point2f cv::Subdiv2D::topLeft
protected

◆ validGeometry

bool cv::Subdiv2D::validGeometry
protected

◆ vtx

std::vector<Vertex> cv::Subdiv2D::vtx
protected

The documentation for this class was generated from the following file: