Ocean
|
This class implements functions allowing for triangulation. More...
Data Structures | |
class | IndexTriangle |
This class holds coordinate index of a triangle. More... | |
Public Types | |
typedef std::vector< IndexTriangle > | IndexTriangles |
Definition of a vector holding index triangle objects. More... | |
Static Public Member Functions | |
template<typename T > | |
static IndexTriangles | triangulate (const PixelContourT< T > &pixelContour, const bool forceTriangulation=false, bool *triangulationForced=nullptr) |
Triangulates a given (sparse or dense) contour. More... | |
template<typename T > | |
static std::vector< Advanced::PixelTriangleT< T > > | triangulation2triangles (const std::vector< PixelPositionT< T >> &coordinates, const IndexTriangles &triangulation) |
Converts a given set of pixel coordinates and a corresponding triangulation into triangle objects. More... | |
Private Types | |
typedef std::pair< unsigned int, bool > | PixelPositionPair |
Definition of a pair combining a pixel position index and a boolean state. More... | |
typedef std::vector< PixelPositionPair > | PixelPositionPairs |
Definition of a vector holding pixel position pairs. More... | |
This class implements functions allowing for triangulation.
typedef std::vector<IndexTriangle> Ocean::CV::Segmentation::Triangulation::IndexTriangles |
Definition of a vector holding index triangle objects.
|
private |
Definition of a pair combining a pixel position index and a boolean state.
|
private |
Definition of a vector holding pixel position pairs.
|
static |
Triangulates a given (sparse or dense) contour.
Due to performance reasons and due to irregular coordinates a sparse contours is recommended.
pixelContour | The contour to be triangulated |
forceTriangulation | True, to return a triangulation even if some of the coordinates does not allow a valid triangulation |
triangulationForced | Optional resulting state whether the triangulation needed to be forced |
T | The data type of the pixel contour, can be 'int' or 'unsigned int' |
|
inlinestatic |
Converts a given set of pixel coordinates and a corresponding triangulation into triangle objects.
coordinates | Set of pixel coordinates |
triangulation | Corresponding triangulation |
T | The data type of the pixel coordinates, can be "int" or "unsigned int" |