IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseHistogram.h
1 // BaseHistogram.h:
3 // ----------------
4 //
14 
15 #ifndef __IPSDKMATH_BASEHISTOGRAM_H__
16 #define __IPSDKMATH_BASEHISTOGRAM_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::math::BaseHistogram::_histogramPopulation': class 'std::vector<ipsdk::ipUInt64,std::allocator<_Ty>>' needs to have dll-interface to be used by clients of class 'ipsdk::math::BaseHistogram'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
29 #include <IPSDKMath/Clustering/KMeansClusteringConfig.h>
30 #include <IPSDKMath/Clustering/KernelKMeansClusteringConfig.h>
31 #include <IPSDKSerialization/Engine/BaseSerializationObject.h>
32 #include <vector>
33 
34 namespace ipsdk {
35 namespace math {
36 
39 
41 {
42  // declare serial class
44 
45 public:
48  BaseHistogram();
49  virtual ~BaseHistogram() = 0;
51 
52 // methods
53 public:
55  bool isInit() const;
56 
57  //--------------------------------
60  //--------------------------------
61 
69  void initFromExisting(const ipReal64 firstHistoValue,
70  const ipReal64 lastHistoValue,
71  const ipReal64 binWidth,
72  const UInt64Vector& histogramPopulation,
75 
76  //------------------------------------
79  //------------------------------------
80 
83  void clearData();
85 
86  //-----------------------
89  //-----------------------
90 
92  virtual ipBool areDataIntegral() const = 0;
93 
97  ipReal64 getFirstValue() const;
98 
102  ipReal64 getLastValue() const;
103 
108  ipReal64 getLowerBound() const;
109 
116  ipReal64 getUpperBound() const;
117 
124  ipReal64 getRange() const;
125 
129  ipReal64 getBinWidth() const;
130 
134  ipUInt32 getNbClasses() const;
135 
141  ipUInt32 getNbBins() const;
142 
148  ipUInt32 getLowerOutOfBoundsBinIdx() const;
149 
155  ipUInt32 getUpperOutOfBoundsBinIdx() const;
156 
160  ipUInt32 getInBoundsBinOffset() const;
161 
165  const UInt64Vector& getHistogramPopulation() const;
166 
170  ipUInt64 getTotalPopulation() const;
171 
174  UInt64Vector getHistogramClassPopulation() const;
175 
181  ipReal64 getBinStartValue(const ipUInt32 binIdx) const;
182 
190  ipReal64 getBinMidValue(const ipUInt32 binIdx) const;
191 
198  ipReal64 getBinEndValue(const ipUInt32 binIdx) const;
199 
203  ipReal64 getClassStartValue(const ipUInt32 classIdx) const;
204 
210  ipReal64 getClassMidValue(const ipUInt32 classIdx) const;
211 
216  ipReal64 getClassEndValue(const ipUInt32 classIdx) const;
217 
221  ipUInt64 getClassPopulation(const ipUInt32 classIdx) const;
222 
226  ipReal64 getClassFrequency(const ipUInt32 classIdx) const;
227 
231  ipUInt64 getClassCumulatedPopulation(const ipUInt32 classIdx) const;
232 
236  ipReal64 getClassCumulatedFrequency(const ipUInt32 classIdx) const;
237 
242  ipBool isOutOfBounds(const ipReal64 value) const;
243 
248  ipBool isOutOfLowerBound(const ipReal64 value) const;
249 
254  ipBool isOutOfUpperBound(const ipReal64 value) const;
255 
261  ipBool canBeAggregated(const ipReal64 value) const;
262 
268  ipUInt32 getBinIdx(const ipReal64 value) const;
269 
273  ipUInt64 getPopulation(const ipReal64 value) const;
274 
277  ipReal64 getFrequency(const ipReal64 value) const;
278 
282  ipUInt64 getCumulatedPopulation(const ipReal64 value) const;
283 
286  ipReal64 getCumulatedFrequency(const ipReal64 value) const;
287 
289  void getFrequencies(Real64Vector& frequencies) const;
290 
292  Real64Vector getFrequencies() const;
293 
295  void getCumulatedFrequencies(Real64Vector& cumulatedFrequencies) const;
296 
298  Real64Vector getCumulatedFrequencies() const;
299 
301  Real64Vector getBinMidValues() const;
302 
308  ipUInt32 getQuantileClassIdx(const ipReal64 quantileValue) const;
309 
313  ipUInt32 getMaxPopulationClassIdx() const;
315 
316  //----------------------
319  //----------------------
320 
332  UInt32Vector findLocalMaxima(const bool bStrictExtrema = true,
333  const eExtremaBorderPolicy& extremaBorderPolicy = eExtremaBorderPolicy::eEBP_Keeped,
334  const ipReal64 minDistance = 0,
335  const ipUInt64 populationThreshold = 0) const;
336 
348  UInt32Vector findLocalMinima(const bool bStrictExtrema = true,
349  const eExtremaBorderPolicy& extremaBorderPolicy = eExtremaBorderPolicy::eEBP_Keeped,
350  const ipReal64 minDistance = 0,
351  const ipUInt64 populationThreshold = NumericLimits<ipUInt64>::max()) const;
352 
368  HistogramExtremaColl findLocalDilatedMaxima(const ipUInt64 dilateFactor,
369  const eExtremaBorderPolicy& extremaBorderPolicy = eExtremaBorderPolicy::eEBP_Keeped,
370  const ipReal64 minDistance = 0,
371  const ipUInt64 populationThreshold = 0) const;
372 
389  HistogramExtremaColl findLocalDilatedMinima(const ipUInt64 dilateFactor,
390  const eExtremaBorderPolicy& extremaBorderPolicy = eExtremaBorderPolicy::eEBP_Keeped,
391  const ipReal64 minDistance = 0,
392  const ipUInt64 populationThreshold = NumericLimits<ipUInt64>::max()) const;
394 
410  HistogramGaussianCurveFit fitGaussianCurve(const EstimationConfig& config = createNonRobustConfig(),
411  const bool bIncludeOutOfBoundsData = false) const;
412 
419  clustering::KMeansClusteringPtr applyKMeansClustering(const ipUInt32 nbClusters,
420  const bool bIncludeOutOfBoundsData = false,
422 
428  template <typename KernelType>
429  boost::shared_ptr<clustering::KernelKMeansClustering<KernelType> >
430  applyKernelKMeansClustering(const ipUInt32 nbClusters,
431  const KernelType& kernel,
432  const bool bIncludeOutOfBoundsData = false,
434 
440  template <typename KernelType>
441  boost::shared_ptr<clustering::SpectralClustering<KernelType> >
442  applySpectralClustering(const ipUInt32 nbClusters,
443  const KernelType& kernel,
444  const bool bIncludeOutOfBoundsData = false,
446 
448  void clear();
449 
450 protected:
453  void checkInit() const;
454 
456  void checkClassIdx(const ipUInt32 classIdx) const;
457 
459  void checkBinIdx(const ipUInt32 classIdx) const;
460 
466  void updateHistogramParams(const ipReal64 firstHistoValue,
467  const ipReal64 lastHistoValue,
468  const ipReal64 binWidth,
469  const eHistogramOutOfBoundsPolicy& outOfBoundsPolicy);
470 
476  void updateHistogramParams(const ipReal64 firstHistoValue,
477  const ipReal64 lastHistoValue,
478  const ipUInt32 nbClasses,
479  const eHistogramOutOfBoundsPolicy& outOfBoundsPolicy);
480 
483  ipBool insertDataInternal(const ipReal64 value);
484 
486  void clearCumulatedData();
487 
489  void collectClusteringData(const bool bIncludeOutOfBoundsData,
490  clustering::VectorColl& inputDataColl) const;
491 
492 private:
496  ipUInt32 retrieveBinIdx(const ipReal64 value) const;
497 
502  void updateCumulatedIfNeeded() const;
503 
505  void updateCumulated() const;
506 
507 // attributes
508 private:
510  ipReal64 _firstHistoValue;
511 
513  ipReal64 _lastHistoValue;
514 
516  ipReal64 _binWidth;
517 
519  ipUInt32 _nbClasses;
520 
522  ipUInt32 _lowerOutOfBoundsBinIdx;
523 
525  ipUInt32 _upperOutOfBoundsBinIdx;
526 
528  ipUInt32 _inBoundsBinOffset;
529 
531  UInt64Vector _histogramPopulation;
532 
534  mutable UInt64Vector _cumulatedHistogramPopulation;
535 };
536 
539 
540 IPSDK_FORCEINLINE bool
542 {
543  return _nbClasses != 0;
544 }
545 
546 IPSDK_FORCEINLINE ipReal64
548 {
549  // check for initialization
550  checkInit();
551 
552  return _firstHistoValue;
553 }
554 
555 IPSDK_FORCEINLINE ipReal64
557 {
558  // check for initialization
559  checkInit();
560 
561  return _lastHistoValue;
562 }
563 
564 IPSDK_FORCEINLINE ipReal64
566 {
567  return getFirstValue();
568 }
569 
570 IPSDK_FORCEINLINE ipReal64
572 {
573  if (areDataIntegral() == true)
574  return getLastValue() + 1;
575  else
576  return getLastValue();
577 }
578 
579 IPSDK_FORCEINLINE ipReal64
581 {
582  return getUpperBound() - _firstHistoValue;
583 }
584 
585 IPSDK_FORCEINLINE ipReal64
587 {
588  // check for initialization
589  checkInit();
590 
591  return _binWidth;
592 }
593 
594 IPSDK_FORCEINLINE ipUInt32
596 {
597  // check for initialization
598  checkInit();
599 
600  return _nbClasses;
601 }
602 
603 IPSDK_FORCEINLINE ipUInt32
605 {
606  // check for initialization
607  checkInit();
608 
609  return static_cast<ipUInt32>(_histogramPopulation.size());
610 }
611 
612 IPSDK_FORCEINLINE ipUInt32
614 {
615  // check for initialization
616  checkInit();
617 
618  return _lowerOutOfBoundsBinIdx;
619 }
620 
621 IPSDK_FORCEINLINE ipUInt32
623 {
624  // check for initialization
625  checkInit();
626 
627  return _upperOutOfBoundsBinIdx;
628 }
629 
630 IPSDK_FORCEINLINE ipUInt32
632 {
633  // check for initialization
634  checkInit();
635 
636  return _inBoundsBinOffset;
637 }
638 
639 IPSDK_FORCEINLINE const UInt64Vector&
641 {
642  // check for initialization
643  checkInit();
644 
645  return _histogramPopulation;
646 }
647 
648 IPSDK_FORCEINLINE ipUInt64
650 {
651  // update of cumulated data if needeed
652  updateCumulatedIfNeeded();
653 
654  return _cumulatedHistogramPopulation.back();
655 }
656 
657 IPSDK_FORCEINLINE UInt64Vector
659 {
660  // check for initialization
661  checkInit();
662 
663  return UInt64Vector(_histogramPopulation.begin() + _inBoundsBinOffset,
664  _histogramPopulation.begin() + _nbClasses);
665 }
666 
667 IPSDK_FORCEINLINE ipReal64
669 {
670  // check for bin index validity
671  checkBinIdx(binIdx);
672 
673  return _firstHistoValue + (static_cast<ipReal64>(binIdx) - _inBoundsBinOffset) * _binWidth;
674 }
675 
676 IPSDK_FORCEINLINE ipReal64
678 {
679  // check for bin index validity
680  checkBinIdx(binIdx);
681 
682  if (binIdx > _inBoundsBinOffset && (binIdx-_inBoundsBinOffset) == _nbClasses-1)
683  return (_firstHistoValue + (static_cast<ipReal64>(binIdx) - _inBoundsBinOffset) * _binWidth + _lastHistoValue) / 2;
684  else
685  return _firstHistoValue + (static_cast<ipReal64>(binIdx) - _inBoundsBinOffset + 0.5) * _binWidth;
686 }
687 
688 IPSDK_FORCEINLINE ipReal64
690 {
691  // check for bin index validity
692  checkBinIdx(binIdx);
693 
694  if (binIdx > _inBoundsBinOffset && (binIdx-_inBoundsBinOffset) == _nbClasses-1)
695  return _lastHistoValue;
696  else
697  return _firstHistoValue + (static_cast<ipReal64>(binIdx) - _inBoundsBinOffset + 1) * _binWidth;
698 }
699 
700 IPSDK_FORCEINLINE ipReal64
702 {
703  // check for class index validity
704  checkClassIdx(classIdx);
705 
706  return _firstHistoValue + classIdx * _binWidth;
707 }
708 
709 IPSDK_FORCEINLINE ipReal64
711 {
712  // check for class index validity
713  checkClassIdx(classIdx);
714 
715  if (classIdx == _nbClasses-1)
716  return (_firstHistoValue + classIdx * _binWidth + _lastHistoValue) / 2;
717  else
718  return _firstHistoValue + (classIdx + 0.5) * _binWidth;
719 }
720 
721 IPSDK_FORCEINLINE ipReal64
723 {
724  // check for class index validity
725  checkClassIdx(classIdx);
726 
727  if (classIdx == _nbClasses-1)
728  return _lastHistoValue;
729  else
730  return _firstHistoValue + (classIdx + 1) * _binWidth;
731 }
732 
733 IPSDK_FORCEINLINE ipUInt64
735 {
736  // check for class index validity
737  checkClassIdx(classIdx);
738 
739  return _histogramPopulation[classIdx + _inBoundsBinOffset];
740 }
741 
742 IPSDK_FORCEINLINE ipReal64
744 {
745  // check for class index validity
746  checkClassIdx(classIdx);
747 
748  return static_cast<ipReal64>(_histogramPopulation[classIdx + _inBoundsBinOffset]) /
749  static_cast<ipReal64>(getTotalPopulation());
750 }
751 
752 IPSDK_FORCEINLINE ipUInt64
754 {
755  // check for class index validity
756  checkClassIdx(classIdx);
757 
758  // update of cumulated data
759  updateCumulatedIfNeeded();
760 
761  return _cumulatedHistogramPopulation[classIdx + _inBoundsBinOffset];
762 }
763 
764 IPSDK_FORCEINLINE ipReal64
766 {
767  // check for class index validity
768  checkClassIdx(classIdx);
769 
770  // update of cumulated data
771  updateCumulatedIfNeeded();
772 
773  return static_cast<ipReal64>(_cumulatedHistogramPopulation[classIdx + _inBoundsBinOffset]) /
774  static_cast<ipReal64>(getTotalPopulation());
775 }
776 
777 IPSDK_FORCEINLINE ipBool
779 {
780  // check for initialization
781  checkInit();
782 
783  return value < _firstHistoValue || value > _lastHistoValue;
784 }
785 
786 IPSDK_FORCEINLINE ipBool
788 {
789  return value < getFirstValue();
790 }
791 
792 IPSDK_FORCEINLINE ipBool
794 {
795  return value > getLastValue();
796 }
797 
798 IPSDK_FORCEINLINE ipBool
800 {
801  // check for initialization
802  checkInit();
803 
804  if (value < _firstHistoValue && _lowerOutOfBoundsBinIdx == NumericLimits<ipUInt32>::max())
805  return false;
806  if (value > _lastHistoValue && _upperOutOfBoundsBinIdx == NumericLimits<ipUInt32>::max())
807  return false;
808 
809  return true;
810 }
811 
812 IPSDK_FORCEINLINE ipUInt32
814 {
815  // check for initialization
816  checkInit();
817 
818  return retrieveBinIdx(value);
819 }
820 
821 IPSDK_FORCEINLINE ipUInt64
823 {
824  const ipUInt32 binIdx = getBinIdx(value);
825  if (value != NumericLimits<ipUInt32>::max())
826  return _histogramPopulation[binIdx];
827  else
829 }
830 
831 IPSDK_FORCEINLINE ipReal64
833 {
834  // computation of requested frequency
835  const ipUInt32 binIdx = getBinIdx(value);
836  if (value != NumericLimits<ipUInt32>::max())
837  return static_cast<ipReal64>(_histogramPopulation[binIdx]) /
838  static_cast<ipReal64>(getTotalPopulation());
839  else
840  return 0;
841 }
842 
843 IPSDK_FORCEINLINE ipUInt64
845 {
846  // update of cumulated data
847  updateCumulatedIfNeeded();
848 
849  // comutation of associated cumulated population
850  const ipUInt32 binIdx = getBinIdx(value);
851  if (value != NumericLimits<ipUInt32>::max())
852  return _cumulatedHistogramPopulation[binIdx];
853  else
855 }
856 
857 IPSDK_FORCEINLINE ipReal64
859 {
860  // update of cumulated data
861  updateCumulatedIfNeeded();
862 
863  // computation of requested frequency
864  const ipUInt32 binIdx = getBinIdx(value);
865  if (value != NumericLimits<ipUInt32>::max())
866  return static_cast<ipReal64>(_cumulatedHistogramPopulation[binIdx]) /
867  static_cast<ipReal64>(getTotalPopulation());
868  else
869  return 0;
870 }
871 
872 IPSDK_FORCEINLINE Real64Vector
874 {
875  Real64Vector frequencies;
876  getFrequencies(frequencies);
877 
878  return frequencies;
879 }
880 
881 IPSDK_FORCEINLINE Real64Vector
883 {
884  Real64Vector cumulatedFrequencies;
885  getCumulatedFrequencies(cumulatedFrequencies);
886 
887  return cumulatedFrequencies;
888 }
889 
890 IPSDK_FORCEINLINE ipBool
892 {
893  // retrieve bin index associated to value
894  const ipUInt32 binIdx = retrieveBinIdx(value);
895  if (binIdx != NumericLimits<ipUInt32>::max()) {
896 
897  _histogramPopulation[binIdx] += 1;
898  return true;
899  }
900  else
901  return false;
902 }
903 
904 IPSDK_FORCEINLINE void
906 {
907  _cumulatedHistogramPopulation.clear();
908 }
909 
910 IPSDK_FORCEINLINE ipUInt32
911 BaseHistogram::retrieveBinIdx(const ipReal64 value) const
912 {
913  // case of lower out of bounds values
914  if (value < _firstHistoValue)
915  return _lowerOutOfBoundsBinIdx;
916 
917  // case of upper out of bounds values
918  if (value > _lastHistoValue)
919  return _upperOutOfBoundsBinIdx;
920 
921  // case of in bounds values
922  const ipReal64 offset = value - _firstHistoValue;
923  ipUInt32 binIdx = static_cast<ipUInt32>(offset / _binWidth);
924  if (binIdx == _nbClasses)
925  binIdx -= 1;
926 
927  return binIdx + _inBoundsBinOffset;
928 }
929 
930 IPSDK_FORCEINLINE void
931 BaseHistogram::updateCumulatedIfNeeded() const
932 {
933  // check for initialization
934  checkInit();
935 
936  // check for update need
937  if (_cumulatedHistogramPopulation.empty() == true)
938  updateCumulated();
939 }
940 
943 
944 } // end of namespace math
945 } // end of namespace ipsdk
946 
947 #pragma warning (pop)
948 
949 #endif // __IPSDKMATH_BASEHISTOGRAM_H__
UInt64Vector getHistogramClassPopulation() const
retrieve sub part of collection associated to classes (ie. excluding reserved bin associated to out o...
Definition: BaseHistogram.h:658
Definition of import/export macro for library.
ipReal64 getCumulatedFrequency(const ipReal64 value) const
retrieve histogram cumulated frequency for a given value
Definition: BaseHistogram.h:858
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
ipReal64 getBinEndValue(const ipUInt32 binIdx) const
retrieve ending value for a given histogram bin
Definition: BaseHistogram.h:689
void checkBinIdx(const ipUInt32 classIdx) const
method allowing to check validity of a bin index
ipUInt64 getClassPopulation(const ipUInt32 classIdx) const
access to population for a given class index
Definition: BaseHistogram.h:734
std::vector< ipUInt32 > UInt32Vector
stl vector collections
Definition: BaseCollections.h:33
void checkClassIdx(const ipUInt32 classIdx) const
method allowing to check validity of a class index
void clearCumulatedData()
clear of cumulated data associated to histogram
Definition: BaseHistogram.h:905
Extremal border values are keeped on output.
Definition: ExtremaTypes.h:47
ipReal64 getUpperBound() const
retrieve upper bound for histogram
Definition: BaseHistogram.h:571
ipBool canBeAggregated(const ipReal64 value) const
method allowing to check whether a value can be aggregated to histogram data regards to histogram ran...
Definition: BaseHistogram.h:799
virtual ipBool areDataIntegral() const =0
check whether histogram data are integral
std::vector< ipReal64 > Real64Vector
stl vector collections
Definition: BaseCollections.h:37
std::vector< HistogramExtrema > HistogramExtremaColl
collection of histogram extrema
Definition: HistogramTypes.h:80
ipUInt64 getPopulation(const ipReal64 value) const
retrieve histogram population for a given value
Definition: BaseHistogram.h:822
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
ipReal64 getClassMidValue(const ipUInt32 classIdx) const
retrieve mid value for a given histogram class
Definition: BaseHistogram.h:710
ipReal64 getClassStartValue(const ipUInt32 classIdx) const
retrieve starting value for a given histogram class
Definition: BaseHistogram.h:701
Basic statistical functions.
ipUInt32 getUpperOutOfBoundsBinIdx() const
retrieve bin index associated to upper out of bounds data
Definition: BaseHistogram.h:622
ipReal64 getFirstValue() const
retrieve first value for histogram
Definition: BaseHistogram.h:547
ipUInt64 getClassCumulatedPopulation(const ipUInt32 classIdx) const
access to cumulated population for a given class index
Definition: BaseHistogram.h:753
std::vector< ipUInt64 > UInt64Vector
stl vector collections
Definition: BaseCollections.h:35
Utility functions used during parameter estimation.
ipReal64 getBinMidValue(const ipUInt32 binIdx) const
retrieve mid value for a given histogram bin
Definition: BaseHistogram.h:677
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
Definition: KernelKMeansClusteringConfig.h:29
ipReal64 getLowerBound() const
retrieve lower bound for histogram
Definition: BaseHistogram.h:565
Definition: NumericLimits.h:27
boost::shared_ptr< KMeansClustering > KMeansClusteringPtr
shared pointer to KMeansClustering class
Definition: ClusteringTypes.h:96
#define IPSDK_DECLARE_ABSTRACT_SERIAL_WITH_COPY(libraryName, className)
macro enabling serialization on abstract class
Definition: SerializationHdrMacro.h:91
ipBool insertDataInternal(const ipReal64 value)
insertion of data into histogram
Definition: BaseHistogram.h:891
ipReal64 getRange() const
retrieve range for histogram
Definition: BaseHistogram.h:580
ipBool isOutOfBounds(const ipReal64 value) const
method allowing to check whether a given input value is out of histogram bounds
Definition: BaseHistogram.h:778
Definition: KMeansClusteringConfig.h:28
ipReal64 getBinWidth() const
retrieve bin width associated to histogram
Definition: BaseHistogram.h:586
Base class for histogram data management.
Definition: BaseHistogram.h:40
ipUInt32 getLowerOutOfBoundsBinIdx() const
retrieve bin index associated to lower out of bounds data
Definition: BaseHistogram.h:613
std::vector< Vector > VectorColl
collection of vectors
Definition: ClusteringTypes.h:31
ipUInt64 getTotalPopulation() const
retrieve total population for histogram
Definition: BaseHistogram.h:649
Real64Vector getFrequencies() const
compute histogram frequencies
Definition: BaseHistogram.h:873
ipReal64 getClassEndValue(const ipUInt32 classIdx) const
retrieve ending value for a given histogram class
Definition: BaseHistogram.h:722
#define IPSDKMATH_API
Import/Export macro for library IPSDKMath.
Definition: IPSDKMathExports.h:27
const UInt64Vector & getHistogramPopulation() const
access to data collection associated to histogram
Definition: BaseHistogram.h:640
ipReal64 getFrequency(const ipReal64 value) const
retrieve histogram frequency for a given value
Definition: BaseHistogram.h:832
Real64Vector getCumulatedFrequencies() const
compute histogram cumulated frequencies
Definition: BaseHistogram.h:882
Configuration structure used for estimation management.
Definition: EstimationConfig.h:34
bool isInit() const
check whether object has been initialized
Definition: BaseHistogram.h:541
structure allowing to encapsulate gaussian curve fit information
Definition: HistogramTypes.h:100
ipUInt64 getCumulatedPopulation(const ipReal64 value) const
retrieve histogram cumulated population for a given value
Definition: BaseHistogram.h:844
IPSDKMATH_API EstimationConfig createNonRobustConfig()
function allowing to create a non robust estimation configuration
Predefined base collection types for library.
bool ipBool
Base types definition.
Definition: BaseTypes.h:47
Predefined types for histogram management.
ipReal64 getClassCumulatedFrequency(const ipUInt32 classIdx) const
access to cumulated frequency for a given class index
Definition: BaseHistogram.h:765
eHistogramOutOfBoundsPolicy
enumerate use to describe histogram policy used to process out of bounds data
Definition: HistogramTypes.h:37
ipReal64 getClassFrequency(const ipUInt32 classIdx) const
access to frequency for a given class index
Definition: BaseHistogram.h:743
ipUInt32 getBinIdx(const ipReal64 value) const
retrieve histogram bin index associated to a given input value
Definition: BaseHistogram.h:813
void findLocalMaxima(const std::vector< T > &inputColl, const eExtremaBorderPolicy &extremaBorderPolicy, std::vector< IndexType > &extremaIdxColl)
function allowing to search for local maxima into a collection of values
Definition: ExtremaUtils.h:136
ipUInt32 getInBoundsBinOffset() const
retrieve index associated to first in bounds data
Definition: BaseHistogram.h:631
ipBool isOutOfLowerBound(const ipReal64 value) const
method allowing to check whether a given input value is lower than histogram lower bound ...
Definition: BaseHistogram.h:787
void findLocalMinima(const std::vector< T > &inputColl, const eExtremaBorderPolicy &extremaBorderPolicy, std::vector< IndexType > &extremaIdxColl)
function allowing to search for local minima into a collection of values
Definition: ExtremaUtils.h:120
ipUInt32 getNbBins() const
retrieve number of bins associated to histogram
Definition: BaseHistogram.h:604
ipBool isOutOfUpperBound(const ipReal64 value) const
method allowing to check whether a given input value is greater than histogram upper bound ...
Definition: BaseHistogram.h:793
Data with values not in [firstHistoValue, lastHistoValue] are ignored.
Definition: HistogramTypes.h:39
ipUInt32 getNbClasses() const
retrieve number of classes associated to histogram
Definition: BaseHistogram.h:595
Base class for serializable class.
Definition: BaseSerializationObject.h:33
eExtremaBorderPolicy
Enumerate allowing to describe border policy used during extrema extraction processing.
Definition: ExtremaTypes.h:45
ipReal64 getBinStartValue(const ipUInt32 binIdx) const
retrieve starting value for a given histogram bin
Definition: BaseHistogram.h:668
ipReal64 getLastValue() const
retrieve last value for histogram
Definition: BaseHistogram.h:556
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53