Image Component Library (ICL)
|
#include <OpenSurfLib.h>
Public Member Functions | |
~Kmeans () | |
Destructor. | |
Kmeans () | |
Constructor. | |
void | Run (IpVec *ipts, int clusters, bool init=false) |
Do it all! | |
void | SetIpoints (IpVec *ipts) |
Set the ipts to be used. | |
void | InitRandomClusters (int n) |
Randomly distribute 'n' clusters. | |
bool | AssignToClusters () |
Assign Ipoints to clusters. | |
void | RepositionClusters () |
Calculate new cluster centers. | |
float | Distance (Ipoint &ip1, Ipoint &ip2) |
Function to measure the distance between 2 ipoints. | |
Public Attributes | |
IpVec * | ipts |
Vector stores ipoints for this run. | |
IpVec | clusters |
Vector stores cluster centers. |
Kmeans clustering.
Kmeans clustering class (under development)
icl::cv::opensurf::Kmeans::~Kmeans | ( | ) | [inline] |
Destructor.
icl::cv::opensurf::Kmeans::Kmeans | ( | ) | [inline] |
Constructor.
Assign Ipoints to clusters.
float icl::cv::opensurf::Kmeans::Distance | ( | Ipoint & | ip1, |
Ipoint & | ip2 | ||
) |
Function to measure the distance between 2 ipoints.
void icl::cv::opensurf::Kmeans::InitRandomClusters | ( | int | n | ) |
Randomly distribute 'n' clusters.
Calculate new cluster centers.
void icl::cv::opensurf::Kmeans::Run | ( | IpVec * | ipts, |
int | clusters, | ||
bool | init = false |
||
) |
Do it all!
void icl::cv::opensurf::Kmeans::SetIpoints | ( | IpVec * | ipts | ) |
Set the ipts to be used.
Vector stores cluster centers.
Vector stores ipoints for this run.