This class implements functions analyzing contours.
More...
#include <ContourAnalyzer.h>
|
class | DenseObject |
| This class implements a simple storage for a point index with corresponding dense parameter. More...
|
|
|
typedef std::vector< unsigned int > | Indices |
| Definition of a vector holding indices.
|
|
This class implements functions analyzing contours.
◆ DenseObjects
Definition of a vector holding dense objects.
◆ Indices
Definition of a vector holding indices.
◆ createDenseContour() [1/2]
Creates a dense and distinct contour from any kind of given contour also ensuring that the resulting contour does not contain complex properties like loops.
In contrast to e.g., PixelContour::makeDense(), this function needs significantly more computational time while is able to handle more complex input contours.
- Parameters
-
points | The points of any kind of contour which will be converted to a dense and distinct contour |
- Returns
- The resulting dense and distinct contour
- See also
- PixelContour::makeDense().
◆ createDenseContour() [2/2]
PixelContour Ocean::CV::Segmentation::ContourAnalyzer::createDenseContour |
( |
const Vectors2 & |
points | ) |
|
|
inlinestatic |
Creates a dense and distinct contour from any kind of given contour also ensuring that the resulting contour does not contain complex properties like loops.
In contrast to e.g., PixelContour::makeDense(), this function needs significantly more computational time while is able to handle more complex input contours.
- Parameters
-
points | The points of any kind of contour which will be converted to a dense and distinct contour with sub-pixel accuracy |
- Returns
- The resulting dense and distinct contour
◆ curvature()
static Scalars Ocean::CV::Segmentation::ContourAnalyzer::curvature |
( |
const PixelPositions & |
contour, |
|
|
const unsigned int |
offset |
|
) |
| |
|
static |
Determines the curvature for each contour pixel.
The resulting values are the cosine value of the angles between two vectors starting at the interest point pointing several pixels forward and backward in the contour.
- Parameters
-
contour | The contour for which the curvature parameters will be determined |
offset | Pixel offset inside the contour between the pixel of interest and the pixels to measure the curvature, with range [1, contour.size()) |
- Returns
- Cosine values giving the curvature of the contour, one value for each pixel in the contour (a value of 1 determines an angle of 90 deg, a value of 0 determines a value of +/- 180 deg)
◆ determinePixelDirection()
Returns the pixel direction of two successive pixels in a dense contour.
- Parameters
-
pixel0 | First pixel |
pixel1 | Following pixel |
- Returns
- Resulting pixel direction
◆ equalizeContourDensity()
static Vectors2 Ocean::CV::Segmentation::ContourAnalyzer::equalizeContourDensity |
( |
const Vectors2 & |
contour | ) |
|
|
static |
Equalized a sparse contour according to the density of the locations of contour points.
- Parameters
-
contour | The contour to be equalized |
- Returns
- The resulting equalized contour
◆ pixelPositionHashValueFunction()
size_t Ocean::CV::Segmentation::ContourAnalyzer::pixelPositionHashValueFunction |
( |
const PixelPosition & |
position | ) |
|
|
inlinestaticprivate |
Calculates a hash value for a given pixel position.
- Parameters
-
position | Pixel position to determine the hash function for |
- Returns
- Resulting hash function
The documentation for this class was generated from the following file: