|
Ocean
|
This class implements functions allowing for triangulation. More...
#include <Triangulation.h>
Data Structures | |
| class | IndexTriangle |
| This class holds coordinate index of a triangle. More... | |
Public Types | |
| using | IndexTriangles = std::vector< IndexTriangle > |
| Definition of a vector holding index triangle objects. | |
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. | |
| 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. | |
Private Types | |
| using | PixelPositionPair = std::pair< unsigned int, bool > |
| Definition of a pair combining a pixel position index and a boolean state. | |
| using | PixelPositionPairs = std::vector< PixelPositionPair > |
| Definition of a vector holding pixel position pairs. | |
This class implements functions allowing for triangulation.
| using Ocean::CV::Segmentation::Triangulation::IndexTriangles = std::vector<IndexTriangle> |
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" |