This repo is used to track the thumb's touch position relative to other fingertips. It runs in Raspberry Pi with a Pi Camera Module.
- Raspberry Pi 3B+
- Pi Camera Module
- Python 3.7.6
- OpenCV-Python 3.4.2.16 and other libaries in requirement.txt
- Clone or download this repo to Raspberry Pi
- Install Python 3.7.6 in Raspberry Pi
- Install the required packages by
pip3 install -r requirements/run_requirement.txt
- Run the script by
python3 tracking_immodel.py
Script | Content |
---|---|
draw_tools.py | drawing board, user experiments board, and some useful drawing functions |
math_tools.py | math calculations, kalman filter |
picamera_control.py | configure the pi camera and get raw image data in BGR format |
image_segment.py | segment the hand part from the image with otsu thresholding method |
feature_extraction.py | functions to extract features from contour of fingers |
feature_mapping.py | classes to map feature data to pose coordinate |
train_knn_models.py | train the knn models |
train_re_models.py | train random forest models |
train_re_models_win.ipynb | train random forest models. Run in Windows |
prepare_fea_data_pca_win.ipynb | process generated image and build a feature dataset. Use PCA. Run in Windows |
tracking_knnmodel.py | tracking demo using the PCA and KNN |
tracking_rfmodel.py | tracking demo using random forest regression model |
tracking_immodel.py | tracking demo using imaging model. User experiment using absolute pose coordinate tracking |
rela_tracking_immodel.py | user experiment using relative motion tracking |