hsm.h
Go to the documentation of this file.
1 #ifndef H_CSM_HSM
2 #define H_CSM_HSM
3 
4 #include <stdlib.h>
7 struct hsm_params {
9  double max_norm;
14 
17 
20 
21 
24 
27 
28 
31 
34 
35 
36 
38 
42  double debug_true_x[3];
43 };
44 
45 
51 
54 
57 
59  double rho_min, rho_max;
60 
62  double **ht;
63 
65  double *hs;
66 
71 
74 
76  double **results;
77 
79  double *results_quality;
80 
81 
83  double *theta;
84 
86  double *sint,*cost;
87 
89  double *hs_cross_corr;
90 
92  double disp[3];
94 };
95 
96 typedef struct hsm_buffer_struct* hsm_buffer;
97 
98 
101 
104 
106  void hsm_compute_ht_point(hsm_buffer, double x, double y, double weight);
107 
108 
109  void hsm_match(struct hsm_params*p, hsm_buffer b1, hsm_buffer b2);
110 
114  void hsm_compute_ht_base(hsm_buffer, const double base_pose[3]);
115 
118 
120 
124  void hsm_find_local_maxima_circ(int n, const double*f, int*maxima, int*nmaxima);
125 
127  int hsm_is_angle_between_smaller_than_deg(double angle1, double angle2, double threshold_deg);
128 
129 
132  int hsm_rho2index(hsm_buffer b, double rho, int *rho_index, double *alpha);
133 
135  void hsm_circular_cross_corr_stupid(int n, const double *a, const double *b, double*res);
136 
138  void hsm_find_peaks_circ(int n, const double*f, double min_angle_deg, int unidir, int max_peaks,
139  int*peaks, int* npeaks) ;
140 
141  void hsm_find_peaks_linear(int n, const double*f, double min_dist, int max_peaks,
142  int*peaks, int* npeaks);
143  void hsm_find_local_maxima_linear(int n, const double*f, int*maxima, int*nmaxima);
144 
145  void hsm_linear_cross_corr_stupid(int na, const double *a, int nb, const double *b, double*res, int*lags, int min_lag, int max_lag);
146 
147  void hsm_generate_combinations(int nslots, const int possible_choices[],
148  int i, int i_choice[]) ;
149 
150  /* a mod b >= 0 */
151  int pos_mod(int a, int b);
152 
154  void qsort_descending(int *indexes, size_t nmemb, const double*values);
155 
156  /* used by qsort_descending */
157  int compare_descending(const void *index_pt1, const void *index_pt2);
158 
159 
160 #endif
hsm_params::xc_directions_min_distance_deg
double xc_directions_min_distance_deg
Definition: hsm.h:26
hsm_buffer_struct::sint
double * sint
Definition: hsm.h:86
hsm_buffer_struct::rho_min
double rho_min
Definition: hsm.h:59
hsm_params::linear_xc_max_npeaks
int linear_xc_max_npeaks
Definition: hsm.h:30
hsm_params::debug_true_x
double debug_true_x[3]
Definition: hsm.h:42
hsm_find_peaks_linear
void hsm_find_peaks_linear(int n, const double *f, double min_dist, int max_peaks, int *peaks, int *npeaks)
Definition: hsm.c:460
p
struct @0 p
hsm_buffer_struct::theta
double * theta
Definition: hsm.h:83
hsm_buffer_struct::hs
double * hs
Definition: hsm.h:65
hsm_buffer_struct::linear_cell_size
double linear_cell_size
Definition: hsm.h:56
pos_mod
int pos_mod(int a, int b)
Definition: hsm.c:591
hsm_buffer
struct hsm_buffer_struct * hsm_buffer
Definition: hsm.h:96
hsm_buffer_struct::ht
double ** ht
Definition: hsm.h:62
qsort_descending
void qsort_descending(int *indexes, size_t nmemb, const double *values)
Definition: hsm.c:582
compare_descending
int compare_descending(const void *index_pt1, const void *index_pt2)
Definition: hsm.c:575
hsm_params::linear_xc_peaks_min_distance
double linear_xc_peaks_min_distance
Definition: hsm.h:33
hsm_params::max_norm
double max_norm
Definition: hsm.h:9
hsm_params::xc_ndirections
int xc_ndirections
Definition: hsm.h:23
hsm_is_angle_between_smaller_than_deg
int hsm_is_angle_between_smaller_than_deg(double angle1, double angle2, double threshold_deg)
Definition: hsm.c:509
hsm_buffer_struct::cost
double * cost
Definition: hsm.h:86
hsm_buffer_struct::disp_th_sin
double disp_th_sin
Definition: hsm.h:93
hsm_compute_ht_point
void hsm_compute_ht_point(hsm_buffer, double x, double y, double weight)
Definition: hsm.c:90
hsm_compute_spectrum_norm
void hsm_compute_spectrum_norm(hsm_buffer b)
Definition: hsm.c:148
hsm_find_local_maxima_linear
void hsm_find_local_maxima_linear(int n, const double *f, int *maxima, int *nmaxima)
Definition: hsm.c:526
hsm_params::linear_cell_size
double linear_cell_size
Definition: hsm.h:11
hsm_buffer_struct::num_valid_results
int num_valid_results
Definition: hsm.h:73
hsm_buffer_alloc
hsm_buffer hsm_buffer_alloc(struct hsm_params *)
Definition: hsm.c:10
hsm_buffer_struct::results
double ** results
Definition: hsm.h:76
hsm_compute_spectrum
void hsm_compute_spectrum(hsm_buffer)
Definition: hsm.c:140
hsm_buffer_struct
Definition: hsm.h:46
hsm_generate_combinations
void hsm_generate_combinations(int nslots, const int possible_choices[], int i, int i_choice[])
Definition: hsm.c:392
hsm_buffer_struct::hs_cross_corr
double * hs_cross_corr
Definition: hsm.h:89
hsm_params::max_translation
double max_translation
Definition: hsm.h:37
hsm_params::num_angular_hypotheses
int num_angular_hypotheses
Definition: hsm.h:16
hsm_rho2index
int hsm_rho2index(hsm_buffer b, double rho, int *rho_index, double *alpha)
Definition: hsm.c:119
hsm_params::angular_hyp_min_distance_deg
double angular_hyp_min_distance_deg
Definition: hsm.h:19
hsm_find_peaks_circ
void hsm_find_peaks_circ(int n, const double *f, double min_angle_deg, int unidir, int max_peaks, int *peaks, int *npeaks)
Definition: hsm.c:401
hsm_buffer_struct::max_num_results
int max_num_results
Definition: hsm.h:70
hsm_buffer_struct::disp
double disp[3]
Definition: hsm.h:92
hsm_params::debug_true_x_valid
int debug_true_x_valid
Definition: hsm.h:40
hsm_buffer_struct::num_linear_cells
int num_linear_cells
Definition: hsm.h:53
hsm_buffer_struct::num_angular_cells
int num_angular_cells
Definition: hsm.h:50
hsm_find_local_maxima_circ
void hsm_find_local_maxima_circ(int n, const double *f, int *maxima, int *nmaxima)
Definition: hsm.c:514
hsm_buffer_struct::rho_max
double rho_max
Definition: hsm.h:59
hsm_buffer_struct::results_quality
double * results_quality
Definition: hsm.h:79
hsm_compute_ht_base
void hsm_compute_ht_base(hsm_buffer, const double base_pose[3])
Definition: hsm.c:82
hsm_match
void hsm_match(struct hsm_params *p, hsm_buffer b1, hsm_buffer b2)
Definition: hsm.c:156
hsm_linear_cross_corr_stupid
void hsm_linear_cross_corr_stupid(int na, const double *a, int nb, const double *b, double *res, int *lags, int min_lag, int max_lag)
Definition: hsm.c:551
hsm_buffer_struct::disp_th_cos
double disp_th_cos
Definition: hsm.h:93
hsm_params::angular_cell_size_deg
double angular_cell_size_deg
Definition: hsm.h:13
hsm_buffer_free
void hsm_buffer_free(hsm_buffer)
Definition: hsm.c:62
hsm_circular_cross_corr_stupid
void hsm_circular_cross_corr_stupid(int n, const double *a, const double *b, double *res)
Definition: hsm.c:539
hsm_params
Definition: hsm.h:7


csm
Author(s): Andrea Censi
autogenerated on Wed Aug 17 2022 02:50:33