#include <pgh.h>
Inheritance diagram for mimas::pgh:
Public Types | |
typedef boost::numeric::ublas::vector< double > | Vector |
< ?? | |
Public Member Functions | |
pgh (void) | |
~pgh (void) | |
void | initialise (pgh_type newpairs_type, double newdbin_max, double newdbin_size, double newdist_ramp, int newnum_abin, double newangle_sigma) |
void | initialise (void) |
void | describeLine (const line &ref_line, const line_ptr_list &l) |
void | init_pairs_entry (void) |
bool | adjust_for_distance_ramp (double *weight, double *min_d, double *max_d, double dbin_min, double dist_ramp) |
void | build_normalized_pairwise (const line &ref_line, const line_ptr_list &geom) |
void | compare_lines (const line &refline, const line &line) |
void | compare_lines_mirror (const line &l1, const line &l2) |
void | make_entry_mirror (double min_d, double max_d, double angle, double weight) |
void | make_entry_rotate (double min_d, double max_d, double angle, double weight) |
void | compare_lines_rotate (const line &l1, const line &l2) |
void | make_entry_directed (double min_d, double max_d, double angle, double weight) |
void | make_entry_direct (double min_d, double max_d, double angle, double weight) |
void | compare_lines_directed (const line &l1, const line &l2) |
Vector | dir_vec (const Vector &isct, const Vector &p1, const Vector &p2) |
void | get_pdist (double *pdist, double pdmin, double pdmax, double bin_width, double ramp, int *low_bin, int *high_bin) |
void | sqr_root_and_normalize (void) |
Protected Attributes | |
pgh_type | pairs_type |
specifies the encoding used to create the histogram | |
double | dbin_max |
double | dbin_min |
distance range which the histogram spans | |
double | dbin_size |
double | dist_ramp |
range of each histogram bin wrt distance, number of angle bins in hist | |
int | num_abin |
double | angle_sigma |
double | abin_size |
range of each angle bin, sigma= angle m'ment error estimate | |
double * | pair_dist |
double * | real_pair_dist |
?? | |
double * | pair_angle |
double * | real_pair_angle |
Pairwise geometric histograms. see the many papers by Evans,Thacker,Ashbrook and Caparrelli This flaky implementation by stuart meikle 22.02.2000, based on original Tina tool source code.
A pairwise geometric histogram is a special kind of hough transform. Much of the code here was taken from Tina, and modified to cope with the new base classes. Its easy enough to use, just do
pgh my_pgh; my_pgh.initialise(); my_pgh.describeLine( ref_line, set_of_lines );
pgh
. Also please note that the 'directed' kind of histogram is now formed correctly unlike in Tina. Also i think there should be a warning somewher ein the creation process to say : Hang about mate, you've given me an object which is 500x500 and you want me to use histograms with a max distance axis of 50? Ie the histogram should scale with the model. Because the pgh is an image type, to do a bhattacharyya comparison between two do: pgh p1,p2; // ... enter values into p1 and p2 ... p1.sqr_root_and_normalize(); p2.sqr_root_and_normalize(); result =p1.dotProduct(p2);
Definition at line 58 of file pgh.h.
typedef boost::numeric::ublas::vector< double > mimas::pgh::Vector |
mimas::pgh::pgh | ( | void | ) |
mimas::pgh::~pgh | ( | void | ) |
void mimas::pgh::initialise | ( | pgh_type | newpairs_type, | |
double | newdbin_max, | |||
double | newdbin_size, | |||
double | newdist_ramp, | |||
int | newnum_abin, | |||
double | newangle_sigma | |||
) |
void mimas::pgh::initialise | ( | void | ) |
void mimas::pgh::describeLine | ( | const line & | ref_line, | |
const line_ptr_list & | l | |||
) |
void mimas::pgh::init_pairs_entry | ( | void | ) |
bool mimas::pgh::adjust_for_distance_ramp | ( | double * | weight, | |
double * | min_d, | |||
double * | max_d, | |||
double | dbin_min, | |||
double | dist_ramp | |||
) |
void mimas::pgh::build_normalized_pairwise | ( | const line & | ref_line, | |
const line_ptr_list & | geom | |||
) |
void mimas::pgh::get_pdist | ( | double * | pdist, | |
double | pdmin, | |||
double | pdmax, | |||
double | bin_width, | |||
double | ramp, | |||
int * | low_bin, | |||
int * | high_bin | |||
) |
void mimas::pgh::sqr_root_and_normalize | ( | void | ) |
pgh_type mimas::pgh::pairs_type [protected] |
double mimas::pgh::dbin_max [protected] |
double mimas::pgh::dbin_min [protected] |
double mimas::pgh::dbin_size [protected] |
double mimas::pgh::dist_ramp [protected] |
int mimas::pgh::num_abin [protected] |
double mimas::pgh::angle_sigma [protected] |
double mimas::pgh::abin_size [protected] |
double* mimas::pgh::pair_dist [protected] |
double * mimas::pgh::real_pair_dist [protected] |
double* mimas::pgh::pair_angle [protected] |
double * mimas::pgh::real_pair_angle [protected] |