mirror of
https://github.com/YutaItoh/3D-Eye-Tracker.git
synced 2025-09-26 23:09:19 +08:00
updated
This commit is contained in:
parent
063f4f5f5c
commit
2a427d9f2e
26
README.md
26
README.md
@ -1,8 +1,8 @@
|
||||
# 3D Eye Tracker
|
||||
|
||||
This software aims to provide an easy-to-comiple C++ implementation of a 3D eye-tracking method.
|
||||
This software aims to provide an easy-to-compile C++ implementation of a 3D eye-tracking method.
|
||||
|
||||
Our software is designed for a wearable eye-tracking scenario where a user wears a headset with an eye camera(s) which is equipped with infrared (IR) illuminations. The camera can capture close-up shots of the user's eyes.
|
||||
Our software is designed for a wearable eye-tracking scnenario where a user wears a headset with an eye camera(s) that is equipped with infrared (IR) illuminations. The camera can capture close-up shots of the user's eyes.
|
||||
|
||||

|
||||
|
||||
@ -16,11 +16,11 @@ With this software, you can obtain the following information:
|
||||
* Pupil ellipse size [pixel] and angle [deg.]
|
||||
* Glint position(s) [pixel]
|
||||
|
||||
|
||||
[Sample video on youtube](https://www.youtube.com/watch?v=EH6UVQZgvJE) (a preliminary version and will be updated with a newer version soon).
|
||||
|
||||
## Prerequisite
|
||||
|
||||
Currently, the software is compatible with Visual Studio 2015. The test was only done on a 64bit Windows 10 machine only.
|
||||
Currently, the software is compatible with Visual Studio 2015. The test was done on a 64bit Windows 10 machine only.
|
||||
|
||||
Most of external libraries (for vc14, x64) are bundled in `./external`, yet you still need to
|
||||
install the following two libraries:
|
||||
@ -38,11 +38,11 @@ To setup your own Visual Studio project, you need to use [CMake](https://cmake.o
|
||||
* `set(BOOST_ROOT "C:/SDK/boost_1_62_0")`
|
||||
* `set(OpenCV_DIR "C:/SDK/opencv-3.1.0/build")`
|
||||
3. Start CMake GUI and set a source code path (e.g., `/your-local-path/3D-Eye-Tracker`) and a project build path (e.g., `/your-local-path/3D-Eye-Tracker/build_vc14_x64`)
|
||||

|
||||
<img src="https://raw.githubusercontent.com/YutaItoh/3D-Eye-Tracker/master/docs/cmake-1.png" width="600px" />
|
||||
4. Press `Generate` buttons, then choose a right build environment (Visual Studio 14 2015 Win64)
|
||||

|
||||

|
||||
5. Open `3d_eye_tracker.sln` in the build folder, and compile `main` module
|
||||
<img src="https://raw.githubusercontent.com/YutaItoh/3D-Eye-Tracker/master/docs/cmake-2.png" width="300px" />
|
||||
<img src="https://raw.githubusercontent.com/YutaItoh/3D-Eye-Tracker/master/docs/cmake-3.png" width="600px" />
|
||||
5. Open `3d_eye_tracker.sln` in the build folder, and compile `main` module (recommend to set it as a startup project)
|
||||
|
||||
## How to run
|
||||
|
||||
@ -54,12 +54,14 @@ The default setting uses a sinlge camera via the DirectShow filter. Check your c
|
||||
This case, the program tries to find a camera named `"Pupil Cam1 ID0"`.
|
||||
|
||||
Once the program started, it initializes a 3D eye model from 2D pupil observatios:
|
||||

|
||||
|
||||
<img src="https://raw.githubusercontent.com/YutaItoh/3D-Eye-Tracker/master/docs/runtime-2.png" width="600px" />
|
||||
|
||||
In this initialization step, a user needs to smoothly rotate his/her eye to capture various 2D shapes of the eye.
|
||||
|
||||
After the step, we get 3D eye tracking:
|
||||
|
||||

|
||||
<img src="https://raw.githubusercontent.com/YutaItoh/3D-Eye-Tracker/master/docs/runtime-3.png" width="200px" />
|
||||
|
||||
### Tips:
|
||||
|
||||
@ -71,5 +73,5 @@ Some debug keys are pre-assigned for a better control of the software:
|
||||
# Acknowledgements
|
||||
|
||||
This program integrated/modified several existing codes. Especially,
|
||||
* [2D pupil detection code](http://www.jeoresearch.com/research) by Jason Orloski
|
||||
* [3D eye model optimization code](https://github.com/LeszekSwirski/singleeyefitter ) by Leszek Swirski
|
||||
* [2D pupil detection code](https://github.com/YutaItoh/3D-Eye-Tracker/blob/master/main/pupilFitter.h) by [Jason Orlosky](http://www.jeoresearch.com/research)
|
||||
* [3D eye model optimization code](https://github.com/LeszekSwirski/singleeyefitter) (./singleeyefitter) by Leszek Swirski
|
||||
|
@ -2073,54 +2073,4 @@ int processDir(string path,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
//initialize background subtractors
|
||||
pMOG = new BackgroundSubtractorMOG();
|
||||
pMOG2_1 = new BackgroundSubtractorMOG2();
|
||||
pMOG2_2 = new BackgroundSubtractorMOG2();
|
||||
pGMG = new BackgroundSubtractorGMG();
|
||||
|
||||
threshDebug = true;
|
||||
|
||||
|
||||
//Yuta's stuff
|
||||
//processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P0A\\", 12, 0, 0, 15, 35, 90, 15, 20);
|
||||
//Jihad's stuff
|
||||
//processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P0B\\", 10, 60, 20, 15, 35, 130, 15, 20);
|
||||
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P0\\", 20, 0, 20, 10, 45, 320, 9, 20);
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P1\\", 20, 0, 20, 10, 40, 270, 8, 20);
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P3\\", 20, 0, 20, 10, 20, 150, 8, 20);
|
||||
|
||||
//some invalid
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P4\\", 20, 0, 20, 10, 14, 205, 8, 12);
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P5\\", 20, 0, 20, 10, 40, 170, 8, 20);
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P6\\", 20, 0, 20, 10, 20, 220, 10, 20);
|
||||
|
||||
//some invalid
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P7\\", 20, 0, 20, 10, 15, 240, 7, 14);
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P8\\", 20, 0, 20, 10, 60, 170, 8, 15);
|
||||
|
||||
//need to reset high ROI based on low centroid ~~
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P9\\", 20, 0, 20, 10, 20, 210, 8, 20);
|
||||
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P10\\", 20, 0, 20, 20, 30, 170, 8, 20);
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P11\\", 20, 0, 150, 15, 60, 220, 10, 24);
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P12\\", 20, 0, 20, 10, 30, 210, 8, 15);
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P13\\", 30, 160, 80, 11, 20, 140, 8, 13);
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P14\\", 20, 0, 20, 25, 45, 230, 18, 35);
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P15\\", 20, 0, 20, 10, 30, 130, 8, 15);
|
||||
|
||||
//need to reset high ROI based on low centroid ~~
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P16\\", 20, 0, 20, 8, 25, 240, 3, 9);
|
||||
erodeOn = false;
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P17\\", 20, 0, 20, 10, 20, 230, 6, 12);
|
||||
erodeOn = true;
|
||||
//probably invalid //can maybe fix with ROI reset????
|
||||
processDir("C:\\Documents\\Osaka\\Research\\Parkinson Study Data\\Raw Videos - Named\\P2\\", 40, 50, 220, 10, 25, 150, 8, 20);
|
||||
|
||||
// the camera will be deinitialized automatically in VideoCapture destructor
|
||||
return 0;
|
||||
}
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user