#include <ColorClustering.h>
Inheritance diagram for ColorClustering:
Public Member Functions | |
ColorClustering (const Image &image, const CameraMatrix &cameraMatrix, const CameraMatrix &prevCameraMatrix, Image &debugImage) | |
void | recordPrepare () |
void | recordExecute () |
void | clusteringPrepare () |
void | clusteringExecute () |
void | clusteringFinish () |
bool | scanPixel (int &is, int &ix, int &iy, int &x, int &y, Vector3< unsigned char > &color, double &radScanline, ColorRecordScanParam ¶m) |
unsigned char | assignCluster (Vector3< unsigned char > &color) |
void | saveLookupTable (const char *filename) |
bool | loadLookupTable (const char *filename) |
void | clusterImage () |
Public Attributes | |
ColorRecordScanParam | recordScanParam |
ColorCollection * | colorCollection |
ColorHistogram * | colorHistogram |
EMGaussianMixture | mixture |
double | mergeDistance |
Image & | debugImage |
Definition at line 51 of file ColorClustering.h.
ColorClustering::ColorClustering | ( | const Image & | image, | |
const CameraMatrix & | cameraMatrix, | |||
const CameraMatrix & | prevCameraMatrix, | |||
Image & | debugImage | |||
) |
Definition at line 161 of file ColorClustering.cpp.
References colorHistogram, ScanningGrid::scanningDistanceX, and ScanningGrid::scanningDistanceY.
unsigned char ColorClustering::assignCluster | ( | Vector3< unsigned char > & | color | ) |
Definition at line 263 of file ColorClustering.cpp.
References EMGaussianMixture::lookupTable, mixture, Vector3< V >::x, Vector3< V >::y, and Vector3< V >::z.
void ColorClustering::clusterImage | ( | ) |
Definition at line 275 of file ColorClustering.cpp.
References EMGaussianMixture::clusterImage(), ColorCorrector::correct(), debugImage, ScanningGrid::image, mixture, EMGaussianMixture::visualizeClusters(), and WINDEBUG.
Referenced by FastPanoramaProcessor::frameExecute().
void ColorClustering::clusteringExecute | ( | ) |
Definition at line 224 of file ColorClustering.cpp.
References mixture, and EMGaussianMixture::startEM().
Referenced by FastPanoramaProcessor::frameExecute().
void ColorClustering::clusteringFinish | ( | ) |
Definition at line 229 of file ColorClustering.cpp.
References colorHistogram, mixture, EMGaussianMixture::setTrainingSet(), and EMGaussianMixture::trainingData.
Referenced by FastPanoramaProcessor::frameExecute().
void ColorClustering::clusteringPrepare | ( | ) |
Definition at line 202 of file ColorClustering.cpp.
References ColorCollection::color, colorHistogram, debugImage, EMGaussianMixture::initMeansOnTrainingSet(), EMGaussianMixture::initRandom(), ColorCollection::length, mixture, EMGaussianMixture::setTrainingSet(), ColorCollection::showCollectedColors(), ColorHistogram::strongColorsRemoved, Vector3< V >::x, Vector3< V >::y, and Vector3< V >::z.
Referenced by FastPanoramaProcessor::frameExecute().
bool ColorClustering::loadLookupTable | ( | const char * | filename | ) |
Definition at line 271 of file ColorClustering.cpp.
References EMGaussianMixture::loadLookupTable(), and mixture.
Referenced by FastPanoramaProcessor::FastPanoramaProcessor(), and FastPanoramaProcessor::frameExecute().
void ColorClustering::recordExecute | ( | ) |
Definition at line 186 of file ColorClustering.cpp.
References debugImage, ScanningGrid::image, ColorRecordScanParam::recomputeThreshold(), recordScanParam, ColorRecordScanParam::reset(), SCAN_IMAGE, scanPixel(), and WINDEBUG.
Referenced by FastPanoramaProcessor::frameExecute().
void ColorClustering::recordPrepare | ( | ) |
Definition at line 178 of file ColorClustering.cpp.
Referenced by FastPanoramaProcessor::frameExecute().
void ColorClustering::saveLookupTable | ( | const char * | filename | ) |
Definition at line 267 of file ColorClustering.cpp.
References mixture, and EMGaussianMixture::saveLookupTable().
Referenced by FastPanoramaProcessor::frameExecute().
bool ColorClustering::scanPixel | ( | int & | is, | |
int & | ix, | |||
int & | iy, | |||
int & | x, | |||
int & | y, | |||
Vector3< unsigned char > & | color, | |||
double & | radScanline, | |||
ColorRecordScanParam & | param | |||
) | [inline] |
Definition at line 238 of file ColorClustering.cpp.
References colorDistance(), ColorRecordScanParam::count, debugImage, dist(), ColorRecordScanParam::histogram, Image::image, ColorRecordScanParam::lastColor, ColorRecordScanParam::threshold, and WINDEBUG.
Referenced by recordExecute().
Definition at line 68 of file ColorClustering.h.
Referenced by FastPanoramaProcessor::frameExecute().
Definition at line 69 of file ColorClustering.h.
Referenced by clusteringFinish(), clusteringPrepare(), and ColorClustering().
Definition at line 75 of file ColorClustering.h.
Referenced by clusterImage(), clusteringPrepare(), recordExecute(), and scanPixel().
Definition at line 72 of file ColorClustering.h.
Definition at line 70 of file ColorClustering.h.
Referenced by assignCluster(), clusterImage(), clusteringExecute(), clusteringFinish(), clusteringPrepare(), SignatureGenerator::drawTransition(), FastPanoramaProcessor::frameExecute(), loadLookupTable(), saveLookupTable(), SignatureGenerator::scanPixel(), HorizonEstimator::scanPixel(), and SignatureGenerator::scanPixelDetail().