Public Member Functions | |
Region () | |
void | normalize (const ScaleCalculator< GridType > &) |
computes the centroids and makes the ux,uy,gr normal numbers (m/s, rate/sec, etc. | |
void | add (const Pixel &p, double value) |
int | minx () const |
int | maxx () const |
int | miny () const |
int | maxy () const |
int | top_rt () const |
int | top_lt () const |
int | bot_rt () const |
int | bot_lt () const |
void | set_minx (int a) |
WARNING! by changing this, the cluster might become inconsistent! | |
void | set_maxx (int a) |
void | set_miny (int a) |
void | set_maxy (int a) |
void | set_top_rt (int a) |
void | set_top_lt (int a) |
void | set_bot_rt (int a) |
void | set_bot_lt (int a) |
float | cx () const |
The center of gravity. | |
float | cy () const |
The center of gravity. | |
w2img::SingleFeature | cval () const |
The center of gravity in measurement space. | |
w2img::SingleFeature | maxval () const |
Maximum value encountered. | |
w2img::SingleFeature | minval () const |
float | geo_cx () const |
The geometric center of gravity. | |
float | geo_cy () const |
The geometric center of gravity. | |
w2img::SingleFeature | geo_cval () const |
The geometric center of gravity in measurement space. | |
double | varx () const |
Variance of x. | |
double | vary () const |
Variance of y. | |
double | varxy () const |
Covariance of x,y. | |
Ellipse | bestFitEllipse () const |
Get best fit ellipse to cluster. | |
int | size () const |
Number of pixels in region. | |
void | update (int x, int y, const w2img::SingleFeature &value=w2img::SingleFeature(), float wt=1.0) |
Add a new pixel. | |
void | update (Cluster< w2img::SingleFeature > &other, std::vector< Cluster< w2img::SingleFeature > > &clusters) |
Add another cluster and update distances between the clusters. | |
float | contains (const Cluster< w2img::SingleFeature > &other) const |
Fraction of other region contained within this one. | |
float | contained_within (const Cluster< w2img::SingleFeature > &other) const |
Fraction of this one contained in other region. | |
float | computeArea () const |
Returns computed area between the bounds. | |
float | get_distance (const Cluster< w2img::SingleFeature > &other) const |
distance in pixels between these two clusters (shortest path). | |
float | get_boundingbox_distance (const Cluster< w2img::SingleFeature > &other) const |
distance between bounding boxes of the two clusters. | |
Static Public Member Functions | |
static void | computeDistances (const code::Image< int > &label, std::vector< Cluster< w2img::SingleFeature > > &clusters) |
Public Attributes | |
std::vector< PixelRow > | pixels |
double | ux |
double | uy |
double | gr |
Friends | |
std::ostream & | operator<< (std::ostream &dout, const Cluster< w2img::SingleFeature > &obj) |
w2kmeans::HierarchicalCluster< GridType >::Region::Region | ( | ) |
void w2kmeans::HierarchicalCluster< GridType >::Region::add | ( | const Pixel & | p, | |
double | value | |||
) |
Ellipse w2img::Cluster< w2img::SingleFeature >::bestFitEllipse | ( | ) | const [inline, inherited] |
Get best fit ellipse to cluster.
int w2img::Cluster< w2img::SingleFeature >::bot_lt | ( | ) | const [inline, inherited] |
int w2img::Cluster< w2img::SingleFeature >::bot_rt | ( | ) | const [inline, inherited] |
float w2img::Cluster< w2img::SingleFeature >::computeArea | ( | ) | const [inherited] |
Returns computed area between the bounds.
static void w2img::Cluster< w2img::SingleFeature >::computeDistances | ( | const code::Image< int > & | label, | |
std::vector< Cluster< w2img::SingleFeature > > & | clusters | |||
) | [static, inherited] |
float w2img::Cluster< w2img::SingleFeature >::contained_within | ( | const Cluster< w2img::SingleFeature > & | other | ) | const [inline, inherited] |
Fraction of this one contained in other region.
float w2img::Cluster< w2img::SingleFeature >::contains | ( | const Cluster< w2img::SingleFeature > & | other | ) | const [inherited] |
Fraction of other region contained within this one.
w2img::SingleFeature w2img::Cluster< w2img::SingleFeature >::cval | ( | ) | const [inline, inherited] |
The center of gravity in measurement space.
float w2img::Cluster< w2img::SingleFeature >::cx | ( | ) | const [inline, inherited] |
The center of gravity.
float w2img::Cluster< w2img::SingleFeature >::cy | ( | ) | const [inline, inherited] |
The center of gravity.
w2img::SingleFeature w2img::Cluster< w2img::SingleFeature >::geo_cval | ( | ) | const [inline, inherited] |
The geometric center of gravity in measurement space.
float w2img::Cluster< w2img::SingleFeature >::geo_cx | ( | ) | const [inline, inherited] |
The geometric center of gravity.
float w2img::Cluster< w2img::SingleFeature >::geo_cy | ( | ) | const [inline, inherited] |
The geometric center of gravity.
float w2img::Cluster< w2img::SingleFeature >::get_boundingbox_distance | ( | const Cluster< w2img::SingleFeature > & | other | ) | const [inherited] |
distance between bounding boxes of the two clusters.
float w2img::Cluster< w2img::SingleFeature >::get_distance | ( | const Cluster< w2img::SingleFeature > & | other | ) | const [inherited] |
distance in pixels between these two clusters (shortest path).
w2img::SingleFeature w2img::Cluster< w2img::SingleFeature >::maxval | ( | ) | const [inline, inherited] |
Maximum value encountered.
int w2img::Cluster< w2img::SingleFeature >::maxx | ( | ) | const [inline, inherited] |
int w2img::Cluster< w2img::SingleFeature >::maxy | ( | ) | const [inline, inherited] |
w2img::SingleFeature w2img::Cluster< w2img::SingleFeature >::minval | ( | ) | const [inline, inherited] |
int w2img::Cluster< w2img::SingleFeature >::minx | ( | ) | const [inline, inherited] |
int w2img::Cluster< w2img::SingleFeature >::miny | ( | ) | const [inline, inherited] |
void w2kmeans::HierarchicalCluster< GridType >::Region::normalize | ( | const ScaleCalculator< GridType > & | ) |
computes the centroids and makes the ux,uy,gr normal numbers (m/s, rate/sec, etc.
)
void w2img::Cluster< w2img::SingleFeature >::set_bot_lt | ( | int | a | ) | [inline, inherited] |
void w2img::Cluster< w2img::SingleFeature >::set_bot_rt | ( | int | a | ) | [inline, inherited] |
void w2img::Cluster< w2img::SingleFeature >::set_maxx | ( | int | a | ) | [inline, inherited] |
void w2img::Cluster< w2img::SingleFeature >::set_maxy | ( | int | a | ) | [inline, inherited] |
void w2img::Cluster< w2img::SingleFeature >::set_minx | ( | int | a | ) | [inline, inherited] |
WARNING! by changing this, the cluster might become inconsistent!
void w2img::Cluster< w2img::SingleFeature >::set_miny | ( | int | a | ) | [inline, inherited] |
void w2img::Cluster< w2img::SingleFeature >::set_top_lt | ( | int | a | ) | [inline, inherited] |
void w2img::Cluster< w2img::SingleFeature >::set_top_rt | ( | int | a | ) | [inline, inherited] |
int w2img::Cluster< w2img::SingleFeature >::size | ( | ) | const [inline, inherited] |
Number of pixels in region.
int w2img::Cluster< w2img::SingleFeature >::top_lt | ( | ) | const [inline, inherited] |
int w2img::Cluster< w2img::SingleFeature >::top_rt | ( | ) | const [inline, inherited] |
void w2img::Cluster< w2img::SingleFeature >::update | ( | Cluster< w2img::SingleFeature > & | other, | |
std::vector< Cluster< w2img::SingleFeature > > & | clusters | |||
) | [inherited] |
Add another cluster and update distances between the clusters.
void w2img::Cluster< w2img::SingleFeature >::update | ( | int | x, | |
int | y, | |||
const w2img::SingleFeature & | value = T() , |
|||
float | wt = 1.0 | |||
) | [inherited] |
Add a new pixel.
double w2img::Cluster< w2img::SingleFeature >::varx | ( | ) | const [inline, inherited] |
Variance of x.
This is s11 in the covariance matrix
double w2img::Cluster< w2img::SingleFeature >::varxy | ( | ) | const [inline, inherited] |
Covariance of x,y.
This is s11 in the covariance matrix
double w2img::Cluster< w2img::SingleFeature >::vary | ( | ) | const [inline, inherited] |
Variance of y.
This is s22 in the covariance matrix
std::ostream& operator<< | ( | std::ostream & | dout, | |
const Cluster< w2img::SingleFeature > & | obj | |||
) | [friend, inherited] |
double w2kmeans::HierarchicalCluster< GridType >::Region::gr |
std::vector< PixelRow > w2kmeans::HierarchicalCluster< GridType >::Region::pixels |
double w2kmeans::HierarchicalCluster< GridType >::Region::ux |
double w2kmeans::HierarchicalCluster< GridType >::Region::uy |