Loading [MathJax]/extensions/tex2jax.js
_StatFeature.hpp
1 #pragma once
2 
3 #include "opals/config.hpp"
4 
5 namespace opals {
6 
7  class OPALS_API StatFeature
8  {
9  public:
10  /// Enumeration defining different cell feature types (used by opalsCell)
11  /** Used for indexing. Hence unscoped, with implicit conversion to int. */
12  struct Type
13  {
14  enum Enum
15  {
16  unknown = -1,
17  min = 0, ///< lowest
18  max, ///< highest
19  range, ///< difference between highest and lowest
20  nmin, ///< n lowest
21  nmax, ///< n highest
22  mean, ///< mean
23  median, ///< median
24  sum, ///< sum
25  stdDev, ///< standard deviation \f$\sqrt{\sum_{i=1}^{N}(r_i - \bar{r})^2 / (N-1) }\f$
26  variance, ///< (sample) variance \f$\sum_{i=1}^{N}(r_i - \bar{r})^2 / (N-1)\f$
27  rms, ///< root mean square \f$\sqrt{\sum_{i=1}^{N} r_i^2 / N}\f$
28  stdDevMAD, ///< robust standard deviation estimator computed from the median of absolute deviations from the median \f$1.4826 \cdot median_i(\left|r_i - median_j(r_j)\right|)\f$.
29  ///< In literature this robust estimator is often referred to as normalized MAD (NMAD)
30  minority, ///< the class with the lowest relative frequency (histogram based)
31  majority, ///< the class with the highest relative frequency (histogram based)
32  pdens, ///< point density
33  pcount, ///< point count
34  quantile, ///< p-quantile (p=0..1)
35  shannonEntropy, ///< shannon entropy, measure of information content
36  quadraticEntropy, ///< quadratic entropy, measure of information content
37  center, ///< select closest to cell center
38  rank, ///< quantile rank [0..100]
39  posOpenness, ///< positive openness
40  negOpenness, ///< negative openness
41  pdist, ///< average linear point distance (see DM::ILinearDistance2D for details)
42  null, ///< respresenting void feature
43  Count ///< number of available StatFeatures
44  };
45  };
46 
47  StatFeature();
48  StatFeature(Type::Enum type);
49  StatFeature(Type::Enum type, unsigned n); ///< only for nmin and nmax
50  StatFeature(Type::Enum type, double value); ///< only for quantile, minority and majority
51  virtual ~StatFeature();
52 
53  private:
54  Type::Enum e_featureType;
55  unsigned u_n; ///< value for n in case of "n lowest" or "n highest" (only relevant if e_featureType is Type::nmin or Type::nmax)
56  double d_p; ///< p-value for quantile estimation (Type::quantile)
57  double d_binWidth; ///< bin width for the minority and majority feature (default value 1)
58 
59  public:
60  Type::Enum e_getFeatureType() const;
61  unsigned u_getN() const;
62  double d_getP() const;
63  double d_getBinWidth() const;
64  void v_setFeatureType(const Type::Enum&Ire_featureType);
65  void v_setN(const unsigned &Iru_n);
66  void v_setP(const double &Ird_p);
67  void v_setBinWidth(const double &Ird_binWidth);
68 
69  ///returns minimum number of elements needed to be computable
70  unsigned u_minNumberOfElement() const;
71  };
72 
73 }
forcezero
Definition: _linReg.py:76
Definition: _StatFeature.hpp:7
singleFile
Definition: _export.py:51
_boundsfiles
Definition: _overlap.py:49
thrown if a strip name was provided that is unknown
Definition: c++_api/inc/opals/Exception.hpp:281
gridfiles
Definition: _grid.py:63
Definition: _setCRS.py:55
def convertTiePointsObs()
Converts Pix4D tie point image (pixel) coordinates observations to opalsStripAdjust format.
Definition: _pix4dUtils.py:113
@ median
median
Definition: _StatFeature.hpp:23
@ pdist
average linear point distance (see DM::ILinearDistance2D for details)
Definition: _StatFeature.hpp:41
def readCalibCamParsEntry(file)
Read a single image file entry in calibrated camera parameters file.
Definition: _pix4dUtils.py:248
def convert3dTiePoints(tpFile, tpIds)
Args: tpFile: name of file receiving 3d coordinates of tie points including tie point id.
Definition: _pix4dUtils.py:366
infile
Definition: _setCRS.py:104
def getProjectNameAndParsDir()
Definition: _pix4dUtils.py:88
a
Definition: _linReg.py:77
thrown if the provided filename doesn't exist.
Definition: c++_api/inc/opals/Exception.hpp:238
logger
Definition: _import.py:32
Y
Definition: _linReg.py:17
stats
Definition: _linReg.py:19
Definition: _overlap.py:26
@ range
difference between highest and lowest
Definition: _StatFeature.hpp:19
@ nmax
n highest
Definition: _StatFeature.hpp:21
pairs
Definition: _overlap.py:34
maskfiles
Definition: _grid.py:64
@ rms
root mean square
Definition: _StatFeature.hpp:27
@ variance
(sample) variance
Definition: _StatFeature.hpp:26
feature
Definition: _grid.py:66
_odmfiles
Definition: _grid.py:101
programming error which appears if the opals framework wasn't used correctly;
Definition: c++_api/inc/opals/Exception.hpp:200
logger
Definition: _export.py:45
@ negOpenness
negative openness
Definition: _StatFeature.hpp:40
gridMaskFormula
Definition: _grid.py:81
X
Definition: _linReg.py:16
logger
Definition: _grid.py:61
_odmfiles
Definition: _bounds.py:43
@ rank
quantile rank [0..100]
Definition: _StatFeature.hpp:38
outdir
Definition: _export.py:46
@ stdDev
standard deviation
Definition: _StatFeature.hpp:25
copySource
Definition: _setCRS.py:106
def convertImageEORs()
Reads the image EORs contained in a Pix4D project and converts the content to opalsStripAdjust format...
Definition: _pix4dUtils.py:170
Enum
Definition: _StatFeature.hpp:14
@ pdens
point density
Definition: _StatFeature.hpp:32
wkt
Definition: _setCRS.py:105
@ center
select closest to cell center
Definition: _StatFeature.hpp:37
@ shannonEntropy
shannon entropy, measure of information content
Definition: _StatFeature.hpp:35
Enumeration defining different cell feature types (used by opalsCell)
Definition: _StatFeature.hpp:12
expfiles
Definition: _export.py:48
def composeOutfile(self, exp, infile)
Definition: _export.py:24
logger
Definition: _bounds.py:34
postfixMap
Definition: _grid.py:65
def getWKT(self)
returns WKT string (or empty) from command-line parameters
Definition: _setCRS.py:64
odmfiles
Definition: _import.py:34
Contains the public interface of OPALS.
Definition: AbsValueOrQuantile.hpp:8
@ max
highest
Definition: _StatFeature.hpp:18
lim
Definition: _linReg.py:18
@ sum
sum
Definition: _StatFeature.hpp:24
logger
Definition: _overlap.py:33
def initPix4dUtils(p4DPjFile, imgDir, tsFile)
Initialization function setting globla variables Pix4D project file, image file path and time stamp f...
Definition: _pix4dUtils.py:40
@ minority
the class with the lowest relative frequency (histogram based)
Definition: _StatFeature.hpp:30
logger
Definition: _setCRS.py:102
def _fillPosfixMap(self, mod)
Definition: _grid.py:41
@ majority
the class with the highest relative frequency (histogram based)
Definition: _StatFeature.hpp:31
@ nmin
n lowest
Definition: _StatFeature.hpp:20
Definition: _bounds.py:26
axistitle
Definition: _linReg.py:21
boundsfiles
Definition: _bounds.py:46
b
Definition: _linReg.py:75
extension
Definition: _export.py:25
@ pcount
point count
Definition: _StatFeature.hpp:33
def getStripIndexForImages(imgEosAndTimeStamps, stripIdAndTimeRange, imgCamIDs)
This function takes a dictionary containing the eos and time stamps for each image,...
Definition: _pix4dUtils.py:335
title
Definition: _linReg.py:20
a general parameter error (usually comes from boost::program_options)
Definition: c++_api/inc/opals/Exception.hpp:206
@ quantile
p-quantile (p=0..1)
Definition: _StatFeature.hpp:34
@ mean
mean
Definition: _StatFeature.hpp:22
Definition: _grid.py:29
@ quadraticEntropy
quadratic entropy, measure of information content
Definition: _StatFeature.hpp:36
Definition: _linReg.py:73
plt
Definition: _linReg.py:22
def getImgListAndCamPars()
This function parses the Pix4D calibrated_camera_parameters.txt file containing the list of all image...
Definition: _pix4dUtils.py:283
outfile
Definition: _export.py:47
Definition: _import.py:25
Definition: _linReg.py:14
Definition: _export.py:21
thrown if the provided file cannot be accessed for reading.
Definition: c++_api/inc/opals/Exception.hpp:244
@ posOpenness
positive openness
Definition: _StatFeature.hpp:39