histogram to keep track which values are found over which run lengths Reference: http://www.nlpr.ia.ac.cn/2008papers/gjhy/gh87.pdf http://www.roborealm.com/help/ShapeHistogram.php
More...
#include <RunLengthHistogram.h>
stira::histogram::RunLengthHistogram::RunLengthHistogram |
( |
int |
maxWidth, |
|
|
int |
maxLengthHistogram |
|
) |
| |
constructor
- Parameters
-
maxValue | maximal possible value in histogram |
maxLength | maximal possible segment length |
bool stira::histogram::RunLengthHistogram::Analyse |
( |
std::vector< int > |
vYarnWidths, |
|
|
int |
startIndex = 0 |
|
) |
| |
analyse run lengths of yarn widths
- Parameters
-
vYarnWidths | vector of yarn width per point along the yarn |
startIndex | index from where to start |
double stira::histogram::RunLengthHistogram::ComputeEntropy |
( |
| ) |
|
Gets longest segment with specified width.
- Parameters
-
width | specified width to find longest segments |
int stira::histogram::RunLengthHistogram::CountSegmentsWithGivenWidthOfGivenLength |
( |
int |
width, |
|
|
int |
length |
|
) |
| |
Counts all segments with a specified width of a given length.
- Parameters
-
width | specified width to find all segments of |
std::vector< CurveSegment > stira::histogram::RunLengthHistogram::GetLongestSegmentsWithGivenWidth |
( |
int |
width, |
|
|
unsigned int |
nrSegments |
|
) |
| |
Gets a number of the longest segments with specified width.
- Parameters
-
width | specified width to find longest segments |
std::vector< CurveSegment > stira::histogram::RunLengthHistogram::GetSegmentsWithGivenWidthOfGivenLength |
( |
int |
width, |
|
|
int |
length |
|
) |
| |
Gets all segments with a specified width of a given length.
- Parameters
-
width | specified width to find all segments of |
length | width specified lengthwidth to find all segments of |
std::vector< CurveSegment > stira::histogram::RunLengthHistogram::GetSegmentsWithWidth |
( |
int |
width | ) |
|
Gets all segments with a specified width.
- Parameters
-
width | specified width to find all segments of |
void stira::histogram::RunLengthHistogram::WriteHistogram |
( |
std::string |
fileName, |
|
|
int |
index |
|
) |
| |
Writes current run length histogram to a file on disk.
- Parameters
-
fileName | the name of the file to write to |
void stira::histogram::RunLengthHistogram::WriteSegments |
( |
std::string |
fileName, |
|
|
int |
index |
|
) |
| |
Writes current run length segments to a file on disk.
- Parameters
-
fileName | the name of the file to write to |
The documentation for this class was generated from the following files:
- histogram/histogram/RunLengthHistogram.h
- histogram/histogram/RunLengthHistogram.cpp