Skip to content

This repo is the implementation of the master thesis Enabling 2D Continous Touch Interface on Fingertips using Thumb-worn Camera. It implements a quantitative mechanism to track thumb’s pinch-and-sliding position related to the index finger. The required hardware is Raspberry Pi and Pi Camera Module. A ring enclosure is also required for attache…

Notifications You must be signed in to change notification settings

BowenBZ/2D_Continuous_Thumb_Pinch_and_Sliding_Tracking

Repository files navigation

MicroPinch

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.

Requirements

  • Raspberry Pi 3B+
  • Pi Camera Module
  • Python 3.7.6
  • OpenCV-Python 3.4.2.16 and other libaries in requirement.txt

How to Run

  1. Clone or download this repo to Raspberry Pi
  2. Install Python 3.7.6 in Raspberry Pi
  3. Install the required packages by
    pip3 install -r requirements/run_requirement.txt
  4. Run the script by
    python3 tracking_immodel.py 

Functions of scripts

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

Reference

  1. Histogram Backprojection
  2. Otsu thresholding
  3. Convex Hull and Convex Defect
  4. Kalman Filter

About

This repo is the implementation of the master thesis Enabling 2D Continous Touch Interface on Fingertips using Thumb-worn Camera. It implements a quantitative mechanism to track thumb’s pinch-and-sliding position related to the index finger. The required hardware is Raspberry Pi and Pi Camera Module. A ring enclosure is also required for attache…

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published