C library of triangulation algorithms (for the problems of mobile robot positioning or resection)
toolbox.h
Go to the documentation of this file.
1 /**
2  * @file toolbox.h
3  */
4 
5 #ifndef __TOOLBOX_H__
6 
7 #ifdef _WIN32
8 long int random(void);
9 void srandom(unsigned int seed);
10 #endif
11 
12 #define __TOOLBOX_H__
13 
14 typedef struct {
15  double r , g , b ;
16 } color ;
17 
18 void get_angles(tfloat *a1, tfloat *a2, tfloat *a3, tfloat xr, tfloat yr, tfloat or, tfloat x1, tfloat y1, tfloat x2, tfloat y2, tfloat x3, tfloat y3);
19 
21  tfloat alpha1, tfloat alpha2, tfloat alpha3,
22  tfloat x1, tfloat y1, tfloat x2, tfloat y2, tfloat x3, tfloat y3, int method);
23 
24 tfloat mean( tfloat data[] , unsigned long N );
25 tfloat variance( tfloat data[] , unsigned long N );
26 
27 void initRand( void );
28 tfloat gaussianRand( void );
29 
30 /*tfloat angleSensitivity(tfloat xTrue, tfloat yTrue,
31  tfloat x1, tfloat y1, tfloat x2, tfloat y2, tfloat x3, tfloat y3,
32  int method, tfloat sigma, unsigned int n, int outputType, double thresh);
33 
34 tfloat beaconSensitivity(tfloat xTrue, tfloat yTrue,
35  tfloat x1, tfloat y1, tfloat x2, tfloat y2, tfloat x3, tfloat y3,
36  int method, tfloat sigma, unsigned int n, int outputType, double thresh);*/
37 
38 
40  tfloat x1, tfloat y1, tfloat x2, tfloat y2, tfloat x3, tfloat y3,
41  int method, tfloat sigmaAngle, tfloat sigmaBeacon, unsigned int n, int outputType, double thresh);
42 
44 tfloat detMatrix33(tfloat M[][3]);
45 
46 int saveMapAndScale(tfloat image[] , unsigned int Width, unsigned int Height, unsigned int Mode, unsigned int Max, tfloat P1);
47 int writePGM( tfloat image[] , unsigned int width , unsigned int height , unsigned int Max , char* fileName );
48 int writePPM( tfloat image[] , unsigned int width , unsigned int height , unsigned int Max , char* fileName );
49 color mapRGB( double v , double vmin , double vmax );
50 void grayscale2RGB( tfloat imageG[] , tfloat imageRGB[] , unsigned int width , unsigned int height , unsigned int Max );
51 
52 #endif
53