ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
StatisticalTestingTools.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 // Local
11 #include "CVToolbox.h"
12 #include "DgmOctree.h"
13 
14 namespace cloudViewer {
15 
16 class GenericCloud;
17 class GenericDistribution;
18 class GenericIndexedCloud;
19 class GenericIndexedCloudPersist;
20 class GenericProgressCallback;
21 
25 public:
27 
50  static double computeAdaptativeChi2Dist(const GenericDistribution* distrib,
51  const GenericCloud* cloud,
52  unsigned numberOfClasses,
53  unsigned& finalNumberOfClasses,
54  bool noClassCompression = false,
55  ScalarType* histoMin = nullptr,
56  ScalarType* histoMax = nullptr,
57  unsigned* histoValues = nullptr,
58  double* npis = nullptr);
59 
61 
66  static double computeChi2Fractile(double p, int d);
67 
69 
74  static double computeChi2Probability(double chi2result, int d);
75 
78 
102  static double testCloudWithStatisticalModel(
103  const GenericDistribution* distrib,
104  GenericIndexedCloudPersist* theCloud,
105  unsigned numberOfNeighbours,
106  double pTrust,
107  GenericProgressCallback* progressCb = nullptr,
108  DgmOctree* inputOctree = nullptr);
109 
110 protected:
112 
123  static bool computeLocalChi2DistAtLevel(
124  const DgmOctree::octreeCell& cell,
125  void** additionalParameters,
126  NormalizedProgress* nProgress = nullptr);
127 };
128 
129 } // namespace cloudViewer
#define CV_CORE_LIB_API
Definition: CVCoreLibWin.h:15
Empty class - for classification purpose only.
Definition: CVToolbox.h:15
The octree structure used throughout the library.
Definition: DgmOctree.h:39
A generic class to handle a probability distribution.
A generic 3D point cloud with index-based and presistent access to points.
Generic file read and write utility for python interface.
cloudViewer::NormalizedProgress * nProgress
Octree cell descriptor.
Definition: DgmOctree.h:354