Macros | Functions | Variables
hsm.c File Reference
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <assert.h>
#include "../csm_all.h"
#include "hsm.h"
Include dependency graph for hsm.c:

Go to the source code of this file.

Macros

#define MAX_NPEAKS   1024
 

Functions

int compare_descending (const void *index_pt1, const void *index_pt2)
 
hsm_buffer hsm_buffer_alloc (struct hsm_params *p)
 
void hsm_buffer_free (hsm_buffer b)
 
void hsm_circular_cross_corr_stupid (int n, const double *a, const double *b, double *res)
 
void hsm_compute_ht_base (hsm_buffer b, const double base_pose[3])
 
void hsm_compute_ht_point (hsm_buffer b, double x0, double y0, double weight)
 
void hsm_compute_spectrum (hsm_buffer b)
 
void hsm_compute_spectrum_norm (hsm_buffer b)
 
void hsm_find_local_maxima_circ (int n, const double *f, int *maxima, int *nmaxima)
 
void hsm_find_local_maxima_linear (int n, const double *f, int *maxima, int *nmaxima)
 
void hsm_find_peaks_circ (int n, const double *f, double min_angle_deg, int unidir, int max_peaks, int *peaks, int *npeaks)
 
void hsm_find_peaks_linear (int n, const double *f, double min_dist, int max_peaks, int *peaks, int *npeaks)
 
void hsm_generate_combinations (int nslots, const int possible_choices[], int i, int i_choice[])
 
int hsm_is_angle_between_smaller_than_deg (double angle1, double angle2, double threshold_deg)
 
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)
 
void hsm_match (struct hsm_params *p, hsm_buffer b1, hsm_buffer b2)
 
int hsm_rho2index (hsm_buffer b, double rho, int *rho_index, double *alpha)
 
double mdax (double a, double b)
 
int pos_mod (int a, int b)
 
void qsort_descending (int *indexes, size_t nmemb, const double *values)
 

Variables

const double * qsort_descending_values = 0
 

Macro Definition Documentation

#define MAX_NPEAKS   1024

Function Documentation

int compare_descending ( const void *  index_pt1,
const void *  index_pt2 
)

Definition at line 575 of file hsm.c.

hsm_buffer hsm_buffer_alloc ( struct hsm_params )

Allocates the buffer structures. Remember to call hsm_buffer_free afterwards

Definition at line 10 of file hsm.c.

void hsm_buffer_free ( hsm_buffer  )

Frees the buffer structure

Definition at line 62 of file hsm.c.

void hsm_circular_cross_corr_stupid ( int  n,
const double *  a,
const double *  b,
double *  res 
)

Creates circular cross-correlation in a stupid way

Definition at line 539 of file hsm.c.

void hsm_compute_ht_base ( hsm_buffer  ,
const double  base_pose[3] 
)

Private interface This adds a base displacement to the point added by hsm_compute_ht_point

Definition at line 82 of file hsm.c.

void hsm_compute_ht_point ( hsm_buffer  ,
double  x,
double  y,
double  weight 
)

Adds a point to the Hough Transform

Definition at line 90 of file hsm.c.

void hsm_compute_spectrum ( hsm_buffer  )

Computes the spectrum in the buffer

Definition at line 140 of file hsm.c.

void hsm_compute_spectrum_norm ( hsm_buffer  b)

Definition at line 148 of file hsm.c.

void hsm_find_local_maxima_circ ( int  n,
const double *  f,
int *  maxima,
int *  nmaxima 
)

Finds the local maxima for a circular function. is a pointer to a struct of size n returns the number of maxima found

Definition at line 514 of file hsm.c.

void hsm_find_local_maxima_linear ( int  n,
const double *  f,
int *  maxima,
int *  nmaxima 
)

Definition at line 526 of file hsm.c.

void hsm_find_peaks_circ ( int  n,
const double *  f,
double  min_angle_deg,
int  unidir,
int  max_peaks,
int *  peaks,
int *  npeaks 
)

Finds the peaks of a circular function of length
.

Definition at line 401 of file hsm.c.

void hsm_find_peaks_linear ( int  n,
const double *  f,
double  min_dist,
int  max_peaks,
int *  peaks,
int *  npeaks 
)

Definition at line 460 of file hsm.c.

void hsm_generate_combinations ( int  nslots,
const int  possible_choices[],
int  i,
int  i_choice[] 
)

Definition at line 392 of file hsm.c.

int hsm_is_angle_between_smaller_than_deg ( double  angle1,
double  angle2,
double  threshold_deg 
)

Returns true if (rad) and (rad) are closer than (degrees!)

Definition at line 509 of file hsm.c.

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 at line 551 of file hsm.c.

void hsm_match ( struct hsm_params p,
hsm_buffer  b1,
hsm_buffer  b2 
)

Definition at line 156 of file hsm.c.

int hsm_rho2index ( hsm_buffer  b,
double  rho,
int *  rho_index,
double *  alpha 
)

Returns 0 if out of the buffer. rho_index is the closest cell, alpha between -0.5 and 0.5 specifies the distance from the center of the cell.

Definition at line 119 of file hsm.c.

double mdax ( double  a,
double  b 
)

Definition at line 113 of file hsm.c.

int pos_mod ( int  a,
int  b 
)

Positive modulo

Definition at line 591 of file hsm.c.

void qsort_descending ( int *  indexes,
size_t  nmemb,
const double *  values 
)

Sorts the indexes based on the values

Definition at line 582 of file hsm.c.

Variable Documentation

const double* qsort_descending_values = 0

Definition at line 573 of file hsm.c.



csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23