![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include "qColorimetricSegmenter.h"#include "HSV.h"#include "HSVDialog.h"#include "KmeansDlg.h"#include "QuantiDialog.h"#include "RgbDialog.h"#include "ScalarDialog.h"#include <CVLog.h>#include <ecvPointCloud.h>#include <DistanceComputationTools.h>#include <algorithm>#include <map>#include <QMainWindow>Typedefs | |
| typedef QSharedPointer< cloudViewer::ReferenceCloud > | _Region |
| typedef std::vector< _Region > | _RegionSet |
| typedef std::vector< _RegionSet > | SetOfRegionSet |
| typedef std::map< size_t, std::vector< unsigned > > | ClusterMap |
Functions | |
| static void | ShowDurationNow (const std::chrono::high_resolution_clock::time_point &startTime) |
| static bool | Inside (ColorCompType lower, ColorCompType value, ColorCompType upper) |
| static bool | KNNRegions (ccPointCloud *basePointCloud, const _RegionSet ®ions, const _Region ®ion, unsigned k, _RegionSet &neighbourRegions, unsigned thresholdDistance) |
| KNNRegions Determines the neighboring regions of a region. More... | |
| static double | ColorimetricalDifference (ecvColor::Rgb c1, ecvColor::Rgb c2) |
| colorimetricalDifference Compute colorimetrical difference between two RGB color values. More... | |
| static ecvColor::Rgb | ComputeAverageColor (const ccPointCloud &cloud, cloudViewer::ReferenceCloud *subset) |
| double | ColorimetricalDifference (const ccPointCloud &basePointCloud, cloudViewer::ReferenceCloud *c1, cloudViewer::ReferenceCloud *c2) |
| colorimetricalDifference compute mean colorimetrical difference between two reference clouds. The points in both clouds must be represented in RGB value. More... | |
| static int | FindRegion (const std::vector< _RegionSet > &container, cloudViewer::ReferenceCloud *region) |
| findRegion Find a given region in a vector of reference clouds. More... | |
| static bool | GetKeyCluster (const ccPointCloud &cloud, size_t clusterPerDim, ClusterMap &clusterMap) |
| static ecvColor::Rgb | ComputeAverageColor (const ccPointCloud &cloud, const std::vector< unsigned > &bucket) |
| static int | ColorDistance (const ecvColor::Rgb &c1, const ecvColor::Rgb &c2) |
| static ccPointCloud * | ComputeKmeansClustering (ccPointCloud *theCloud, unsigned K, int maxIterationCount) |
Variables | |
| static const unsigned | TNN = 1 |
| static const double | TPP = 2.0 |
| static const double | TD = 2.0 |
| static const double | TRR = 2.0 |
| static const unsigned | Min = 2 |
| typedef QSharedPointer<cloudViewer::ReferenceCloud> _Region |
| typedef std::vector<_Region> _RegionSet |
| typedef std::map<size_t, std::vector<unsigned> > ClusterMap |
Generate nxnxn clusters of points according to their color value (RGB)
| cloud | : the cloud which we work with |
| clusterPerDim | : coefficient uses to split each RGB component Returns a map of nxnxn keys, for each key a vector of the points index in the partition |
| typedef std::vector<_RegionSet> SetOfRegionSet |
|
static |
Compute the distance between two colors /!\ the formula can be modified, here it is simple to be as quick as possible
References ecvColor::RgbTpl< Type >::b, ecvColor::RgbTpl< Type >::g, and ecvColor::RgbTpl< Type >::r.
Referenced by ComputeKmeansClustering().
| double ColorimetricalDifference | ( | const ccPointCloud & | basePointCloud, |
| cloudViewer::ReferenceCloud * | c1, | ||
| cloudViewer::ReferenceCloud * | c2 | ||
| ) |
colorimetricalDifference compute mean colorimetrical difference between two reference clouds. The points in both clouds must be represented in RGB value.
| basePointCloud | The base cloud on which the reference clouds are based. |
| c1 | The first reference cloud. |
| c2 | The second reference cloud. |
References ColorimetricalDifference(), and ComputeAverageColor().
|
static |
colorimetricalDifference Compute colorimetrical difference between two RGB color values.
| c1 | First color value. |
| c2 | Second color value. |
References ecvColor::RgbTpl< Type >::b, ecvColor::RgbTpl< Type >::g, and ecvColor::RgbTpl< Type >::r.
Referenced by ColorimetricalDifference().
|
static |
Compute the average color (RGB)
| cloud | : cloud which contains the points |
| subset | : subset of points Returns average color (RGB) |
References count, ccPointCloud::getPointColor(), cloudViewer::ReferenceCloud::getPointGlobalIndex(), ecvColor::MAX, rgb, cloudViewer::ReferenceCloud::size(), and ecvColor::white().
Referenced by ColorimetricalDifference(), and ComputeKmeansClustering().
|
static |
Compute the average color (RGB)
| cloud | : cloud which contains the points |
| bucket | : vector of indexes of points Returns average color (RGB) |
References ecvColor::RgbTpl< Type >::b, count, ecvColor::RgbTpl< Type >::g, ccPointCloud::getPointColor(), ecvColor::MAX, ecvColor::RgbTpl< Type >::r, and ecvColor::white().
|
static |
K-means algorithm
| k | : k clusters |
| it | : limit of iterations before returns a result Returns a cloud quantified |
References cloudViewer::utility::ceil(), ccPointCloud::cloneThis(), color, ColorDistance(), ComputeAverageColor(), ccPointCloud::getPointColor(), CVLog::Print(), ccPointCloud::resize(), ccObject::setName(), ccPointCloud::setPointColor(), cloudViewer::PointCloudTpl< T >::size(), and CVLog::Warning().
|
static |
findRegion Find a given region in a vector of reference clouds.
| container | Container containing all the regions. |
| region | Region to search for in the vector. |
|
static |
References ccPointCloud::getPointColor(), ecvColor::MAX, rgb, and cloudViewer::PointCloudTpl< T >::size().
|
inlinestatic |
|
static |
KNNRegions Determines the neighboring regions of a region.
| basePointCloud | The base cloud containing the points. |
| regions | The list containing all the regions in the base cloud point. |
| region | The region to compare with others. |
| k | Max number of neighbours to find. |
| neighbours | The resulting nearest regions. |
| thresholdDistance | The maximum distance to search for neighbors. |
References a, cloudViewer::DistanceComputationTools::computeCloud2CloudDistances(), cloudViewer::DistanceComputationTools::Cloud2CloudDistancesComputationParams::kNNForLocalModel, cloudViewer::DistanceComputationTools::Cloud2CloudDistancesComputationParams::maxSearchDist, ccPointCloud::partialClone(), and result.
|
static |
References CVLog::Print().
|
static |
|
static |
Referenced by ccPlane::SetQuadTexture().
|
static |
|
static |
|
static |