#include "smt.h"Defines | |
| #define | MAX_ID_EX 65535 |
| #define | MAXLABEL 10000 |
| #define | FALSE 0 |
| #define | TRUE 1 |
| #define | ELEM(x, i, j) x[((i)*mt_ncol_proc) + (j)] |
| #define | NO_GESTURE -1 |
Functions | |
| void | runsmtwin32 (int *x, int *y, int ntouch) |
| void | addtouch (int x, int y) |
| void | gonext (void) |
| int | computedist2 (int x1, int y1, int x2, int y2) |
| int | flick (void) |
| int | rotate (void) |
| int | rotate_old (void) |
| int | scale (void) |
| void | event_to_string (char *s, int e) |
| void | state_machine (void) |
| void | initeventlist (void) |
| void | print_touchevent (int event_index) |
| void | notifyevent (int eventid, TOUCHBLOB *touch, TOUCHEVENT *tevent, int event_index, float x, float y, float dx, float dy, int num_touch, int info) |
| void | initblob (TOUCHBLOB *b) |
| void | copyblob (TOUCHBLOB *src, TOUCHBLOB *dest) |
| void | initsmt (void) |
| void | setoffset (void) |
| void | preprocessing (void) |
| void | savearray (FILE *fp, const char *filename, int *x, int n) |
| void | savesnapshot (void) |
| unsigned char | ucminarray (unsigned char *x, int n) |
| signed char | scminarray (signed char *x, int n) |
| unsigned char | ucmaxarray (unsigned char *x, int n) |
| float | favgarray (int *x, int n) |
| void | meanfilter (int *Iy, int *Ix, int numrow, int numcol, int n) |
| void | meanfilter_threshold (int *Iy, int *Ix, int numrow, int numcol, int n, int apply_filter_threshold) |
| float | fminarray (float *x, int n) |
| float | fmaxarray (float *x, int n) |
| unsigned int | uimin (unsigned int x, unsigned int y) |
| unsigned int | uimax (unsigned int x, unsigned int y) |
| void | cclabel (void) |
| void | blobprops (void) |
| void | runsmt (void) |
| void | identtouch (void) |
| void | tracktouch (void) |
| int | iminarray (int *x, int n) |
| int | imaxarray (int *x, int n) |
| void | imresizenearest (int *x, int nrowx, int ncolx, int *y, int nrowy, int ncoly) |
| void | imresizebilinear (int *x, int nrowx, int ncolx, int *y, int nrowy, int ncoly) |
| void | imresizebicubic (int *x, int nrowx, int ncolx, int *y, int nrowy, int ncoly) |
| int | ilimit (int x, int l, int u) |
| float | flimit (float x, float l, float u) |
| float | interpcc (float v1, float v2, float v3, float v4, float d) |
| float | ucmse (unsigned char *x, unsigned char *y, int n) |
| float | fpower (float a, int b) |
| void | icopyarray (int *src, int *dst, int nlength) |
| void | copyeventlist (TOUCHEVENT *src, TOUCHEVENT *dst, int n) |
| void | computecaliparams (float *x, float *y, float *xd, float *yd, float *cali) |
| float | computecalipos (float x, float y, float a, float b, float c) |
| float | linearscale (float x, float min_x, float max_x, float min_y, float max_y) |
| void | gesture_recognition (void) |
| void | cwise2rwise (int *src, int *dst, int row, int col) |
| void | rwise2cwise (int *src, int *dst, int row, int col) |
| void | backgroundfiltering (unsigned char *src, unsigned char *dst, int row, int col) |
Variables | |
| int | mt_do_smoothing = TRUE |
| int | mt_do_highpass = TRUE |
| int | mt_do_smoothing2 = TRUE |
| int | mt_ncol_sensor |
| original size of sensor (of columns of camera or pad) | |
| int | mt_nrow_sensor |
| original size of sensor (of rows of camera or pad) | |
| int | mt_ncol_proc |
| int | mt_nrow_proc |
| int | mt_masksize |
| Filter size of smoothing filter. | |
| int | mt_masksize1 |
| Filter size of edge detection filter. | |
| float | mt_min_amplification_range |
| float | mt_max_amplification_range |
| int | mt_max_sensor |
| Max value of sensor data, usually 255. | |
| int | mt_npower |
| int | mt_bwthreshold1 |
| Obsolete. | |
| int | mt_bwthreshold2 |
| Upper bound of amplification result. | |
| int | mt_th_min_area |
| int | mt_th_max_area |
| mt_th_min_area < VALID_TOUCH_SIZE < mt_th_max_area | |
| float | mt_th_dist2 |
| Threshold to determine if a touch point moves or not. | |
| int | mt_sensor_data [MAXCOL *MAXROW] |
| int | mt_sensor_data_temp [MAXCOL *MAXROW] |
| int | mt_resized [MAXCOL *MAXROW] |
| int | mt_offset [MAXCOL *MAXROW] |
| int | mt_diff [MAXCOL *MAXROW] |
| After background filter. | |
| int | mt_smoothing [MAXCOL *MAXROW] |
| int | mt_highpass [MAXCOL *MAXROW] |
| int | mt_highpass_smoothing [MAXCOL *MAXROW] |
| Edge detection. Useful for DI system. | |
| float | mt_amplification [MAXCOL *MAXROW] |
| int | mt_BW [MAXCOL *MAXROW] |
| int | mt_LABEL [MAXCOL *MAXROW] |
| Labeling result. | |
| int | LABEL_MAP [MAXCOL *MAXROW] |
| Interim data for labeling. | |
| int | result [MAXCOL *MAXROW] |
| Obsolete. | |
| int | mt_nlabel |
| number of blobs | |
| int | mt_ntouch |
| number of valid touches | |
| int | mt_noldtouch |
| number of previous valid touches | |
| int | mt_nevent = 0 |
| number of events for current time | |
| int | mt_noldevent |
| number of old events | |
| int | mt_id_ex = 0 |
| counter to assign id_ex to a touch point | |
| FILE * | fp_sensor_data |
| FILE * | fp_offset |
| FILE * | fp_diff |
| FILE * | fp_smoothing |
| FILE * | fp_highpass |
| FILE * | fp_highpass_smoothing |
| FILE * | fp_amplification |
| FILE * | fp_label |
| float | mt_calibration_params [6] = {1, 0, 0, 0, 1, 0} |
| int | mt_angle |
| float | mt_scale |
| int | mt_oldangle |
| float | mt_oldscale |
| float | mt_xmin_n |
| float | mt_xmax_n |
| float | mt_ymin_n |
| float | mt_ymax_n |
| int | mt_touch_state |
| int | mt_cnt_up |
| int | mt_cnt_ip |
| int | mt_cnt_down |
| int | mt_max_cnt_up |
| int | mt_max_cnt_ip |
| int | mt_max_cnt_down |
| unsigned int | label_map [MAXROW][MAXCOL] = {0, } |
| #define ELEM | ( | x, | |
| i, | |||
| j | |||
| ) | x[((i)*mt_ncol_proc) + (j)] |
| #define FALSE 0 |
| #define MAX_ID_EX 65535 |
| #define MAXLABEL 10000 |
| #define NO_GESTURE -1 |
| #define TRUE 1 |
| void addtouch | ( | int | x, |
| int | y | ||
| ) |
| void backgroundfiltering | ( | unsigned char * | src, |
| unsigned char * | dst, | ||
| int | row, | ||
| int | col | ||
| ) |
| void blobprops | ( | void | ) |
| void cclabel | ( | void | ) |
| void computecaliparams | ( | float * | x, |
| float * | y, | ||
| float * | xd, | ||
| float * | yd, | ||
| float * | cali | ||
| ) |
| float computecalipos | ( | float | x, |
| float | y, | ||
| float | a, | ||
| float | b, | ||
| float | c | ||
| ) |
| int computedist2 | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
| void copyeventlist | ( | TOUCHEVENT * | src, |
| TOUCHEVENT * | dst, | ||
| int | n | ||
| ) |
| void cwise2rwise | ( | int * | src, |
| int * | dst, | ||
| int | row, | ||
| int | col | ||
| ) |
| void event_to_string | ( | char * | s, |
| int | e | ||
| ) |
| float favgarray | ( | int * | x, |
| int | n | ||
| ) |
| int flick | ( | void | ) |
| float flimit | ( | float | x, |
| float | l, | ||
| float | u | ||
| ) |
| float fmaxarray | ( | float * | x, |
| int | n | ||
| ) |
| float fminarray | ( | float * | x, |
| int | n | ||
| ) |
| float fpower | ( | float | a, |
| int | b | ||
| ) |
| void gesture_recognition | ( | void | ) |
| void gonext | ( | void | ) |
| void icopyarray | ( | int * | src, |
| int * | dst, | ||
| int | nlength | ||
| ) |
| void identtouch | ( | void | ) |
| int ilimit | ( | int | x, |
| int | l, | ||
| int | u | ||
| ) |
| int imaxarray | ( | int * | x, |
| int | n | ||
| ) |
| int iminarray | ( | int * | x, |
| int | n | ||
| ) |
| void imresizebicubic | ( | int * | x, |
| int | nrowx, | ||
| int | ncolx, | ||
| int * | y, | ||
| int | nrowy, | ||
| int | ncoly | ||
| ) |
| void imresizebilinear | ( | int * | x, |
| int | nrowx, | ||
| int | ncolx, | ||
| int * | y, | ||
| int | nrowy, | ||
| int | ncoly | ||
| ) |
| void imresizenearest | ( | int * | x, |
| int | nrowx, | ||
| int | ncolx, | ||
| int * | y, | ||
| int | nrowy, | ||
| int | ncoly | ||
| ) |
| void initblob | ( | TOUCHBLOB * | b ) |
| void initeventlist | ( | void | ) |
| void initsmt | ( | void | ) |
| float interpcc | ( | float | v1, |
| float | v2, | ||
| float | v3, | ||
| float | v4, | ||
| float | d | ||
| ) |
| float linearscale | ( | float | x, |
| float | min_x, | ||
| float | max_x, | ||
| float | min_y, | ||
| float | max_y | ||
| ) |
| void meanfilter | ( | int * | Iy, |
| int * | Ix, | ||
| int | numrow, | ||
| int | numcol, | ||
| int | n | ||
| ) |
| void meanfilter_threshold | ( | int * | Iy, |
| int * | Ix, | ||
| int | numrow, | ||
| int | numcol, | ||
| int | n, | ||
| int | apply_filter_threshold | ||
| ) |
| void notifyevent | ( | int | eventid, |
| TOUCHBLOB * | touch, | ||
| TOUCHEVENT * | tevent, | ||
| int | event_index, | ||
| float | x, | ||
| float | y, | ||
| float | dx, | ||
| float | dy, | ||
| int | num_touch, | ||
| int | info | ||
| ) |
| void preprocessing | ( | void | ) |
| void print_touchevent | ( | int | event_index ) |
| int rotate | ( | void | ) |
| int rotate_old | ( | void | ) |
| void runsmt | ( | void | ) |
| void runsmtwin32 | ( | int * | x, |
| int * | y, | ||
| int | ntouch | ||
| ) |
| void rwise2cwise | ( | int * | src, |
| int * | dst, | ||
| int | row, | ||
| int | col | ||
| ) |
| void savearray | ( | FILE * | fp, |
| const char * | filename, | ||
| int * | x, | ||
| int | n | ||
| ) |
| void savesnapshot | ( | void | ) |
| int scale | ( | void | ) |
| signed char scminarray | ( | signed char * | x, |
| int | n | ||
| ) |
| void setoffset | ( | void | ) |
| void state_machine | ( | void | ) |
| void tracktouch | ( | void | ) |
| unsigned char ucmaxarray | ( | unsigned char * | x, |
| int | n | ||
| ) |
| unsigned char ucminarray | ( | unsigned char * | x, |
| int | n | ||
| ) |
| float ucmse | ( | unsigned char * | x, |
| unsigned char * | y, | ||
| int | n | ||
| ) |
| unsigned int uimax | ( | unsigned int | x, |
| unsigned int | y | ||
| ) |
| unsigned int uimin | ( | unsigned int | x, |
| unsigned int | y | ||
| ) |
| FILE* fp_amplification |
| FILE* fp_diff |
| FILE* fp_highpass |
| FILE* fp_highpass_smoothing |
| FILE* fp_label |
| FILE* fp_offset |
| FILE* fp_sensor_data |
| FILE* fp_smoothing |
| int LABEL_MAP[MAXCOL *MAXROW] |
Interim data for labeling.
| unsigned int label_map[MAXROW][MAXCOL] = {0, } |
| float mt_amplification[MAXCOL *MAXROW] |
| int mt_angle |
| int mt_BW[MAXCOL *MAXROW] |
| int mt_bwthreshold1 |
Obsolete.
| int mt_bwthreshold2 |
Upper bound of amplification result.
| float mt_calibration_params[6] = {1, 0, 0, 0, 1, 0} |
| int mt_cnt_down |
| int mt_cnt_ip |
| int mt_cnt_up |
| int mt_diff[MAXCOL *MAXROW] |
After background filter.
| int mt_do_highpass = TRUE |
| int mt_do_smoothing = TRUE |
| int mt_do_smoothing2 = TRUE |
| int mt_highpass[MAXCOL *MAXROW] |
| int mt_highpass_smoothing[MAXCOL *MAXROW] |
Edge detection. Useful for DI system.
| int mt_id_ex = 0 |
counter to assign id_ex to a touch point
| int mt_LABEL[MAXCOL *MAXROW] |
Labeling result.
| int mt_masksize |
Filter size of smoothing filter.
| int mt_masksize1 |
Filter size of edge detection filter.
| int mt_max_cnt_down |
| int mt_max_cnt_ip |
| int mt_max_cnt_up |
| int mt_max_sensor |
Max value of sensor data, usually 255.
| int mt_ncol_proc |
| int mt_ncol_sensor |
original size of sensor (of columns of camera or pad)
| int mt_nevent = 0 |
number of events for current time
| int mt_nlabel |
number of blobs
| int mt_noldevent |
number of old events
| int mt_noldtouch |
number of previous valid touches
| int mt_npower |
| int mt_nrow_proc |
| int mt_nrow_sensor |
original size of sensor (of rows of camera or pad)
| int mt_ntouch |
number of valid touches
| int mt_offset[MAXCOL *MAXROW] |
| int mt_oldangle |
| float mt_oldscale |
| int mt_resized[MAXCOL *MAXROW] |
| float mt_scale |
| int mt_sensor_data[MAXCOL *MAXROW] |
| int mt_sensor_data_temp[MAXCOL *MAXROW] |
| int mt_smoothing[MAXCOL *MAXROW] |
| float mt_th_dist2 |
Threshold to determine if a touch point moves or not.
| int mt_th_max_area |
mt_th_min_area < VALID_TOUCH_SIZE < mt_th_max_area
| int mt_th_min_area |
| int mt_touch_state |
| float mt_xmax_n |
| float mt_xmin_n |
| float mt_ymax_n |
| float mt_ymin_n |
| int result[MAXCOL *MAXROW] |
Obsolete.
1.7.2