blob: b5ad65c8bc28b7d85b26d3535c81d28a90033413 [file] [log] [blame]
Brian Silverman6ae77dd2013-03-29 22:28:08 -07001
2#ifndef _SENSOR_PROCESSOR_H_
3#define _SENSOR_PROCESSOR_H_
4
5// struct maps a single point x to to a value f of x
6typedef struct {
7 double x;
8 double fx;
9} Interpolation;
10
11// a set of mapping to use to determine distance
12// in inches given a pixel offset
13const Interpolation pixel_to_dist[4] = {
14 {43.0, 495.0},
15 {98.0, 260.0},
16 {145.75, 174.0},
17 {216.75, 110.0}};
18const Interpolation pixel_to_dist640x480[4] = {
19 {86.0, 495.0},
20 {196.0, 260.0},
21 {291.5, 176.0},
22 {433.5, 110.0}};
23
24double interpolate(int num_interp_vals,
25 const Interpolation *interp, double value);
26
27#endif //_SENSOR_PROCESSOR_H_
28