#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>
Go to the source code of this file.
|
| 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) |
| |
|
| 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 |
| |
◆ _Region
◆ _RegionSet
◆ ClusterMap
| typedef std::map<size_t, std::vector<unsigned> > ClusterMap |
Generate nxnxn clusters of points according to their color value (RGB)
- Parameters
-
| 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 |
Definition at line 1029 of file qColorimetricSegmenter.cpp.
◆ SetOfRegionSet
◆ ColorDistance()
◆ ColorimetricalDifference() [1/2]
colorimetricalDifference compute mean colorimetrical difference between two reference clouds. The points in both clouds must be represented in RGB value.
- Parameters
-
| basePointCloud | The base cloud on which the reference clouds are based. |
| c1 | The first reference cloud. |
| c2 | The second reference cloud. |
- Returns
- Colorimetrical difference.
Definition at line 537 of file qColorimetricSegmenter.cpp.
References ColorimetricalDifference(), and ComputeAverageColor().
◆ ColorimetricalDifference() [2/2]
◆ ComputeAverageColor() [1/2]
Compute the average color (RGB)
- Parameters
-
| cloud | : cloud which contains the points |
| subset | : subset of points Returns average color (RGB) |
Definition at line 493 of file qColorimetricSegmenter.cpp.
References ecvColor::RgbTpl< Type >::b, count, ecvColor::RgbTpl< Type >::g, ccPointCloud::getPointColor(), cloudViewer::ReferenceCloud::getPointGlobalIndex(), ecvColor::MAX, min(), ecvColor::RgbTpl< Type >::r, cloudViewer::ReferenceCloud::size(), and ecvColor::white().
Referenced by ColorimetricalDifference(), and ComputeKmeansClustering().
◆ ComputeAverageColor() [2/2]
◆ ComputeKmeansClustering()
K-means algorithm
- Parameters
-
| k | : k clusters |
| it | : limit of iterations before returns a result Returns a cloud quantified |
Definition at line 1193 of file qColorimetricSegmenter.cpp.
References abs(), 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().
◆ FindRegion()
findRegion Find a given region in a vector of reference clouds.
- Parameters
-
| container | Container containing all the regions. |
| region | Region to search for in the vector. |
- Returns
- The index of the region if found, -1 in the other case.
Definition at line 635 of file qColorimetricSegmenter.cpp.
◆ GetKeyCluster()
◆ Inside()
◆ KNNRegions()
◆ ShowDurationNow()
| static void ShowDurationNow |
( |
const std::chrono::high_resolution_clock::time_point & |
startTime | ) |
|
|
static |
◆ Min
◆ TD
◆ TNN
◆ TPP
◆ TRR