Giter Site home page Giter Site logo

caomw / 3d-eyeposition-estimation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yutaitoh/3d-eyeposition-estimation

0.0 2.0 0.0 5.86 MB

An eye-tracking software designed for color, close-range eye images

License: MIT License

CMake 12.41% C++ 85.19% Objective-C 2.40%

3d-eyeposition-estimation's Introduction

3D-EyePosition-Estimation

An eye-tracking software designed for color, close-up eye images

This program computes an eyeball position in 3D given a calibrated camera image.

Why eye(-pose) tracker?

With the growing market of Virtual-/Augmented-Reality (VR/AR) headsets such as Oculus Rift, Google Glass, and Microsoft HoloLens, the eye-tracking technology has become not only a key user interface, but also the prime technique to realize more realistic, emmersive VR/AR experieces.

Since I am working on this field, and needed to develop an eye-position tracking software for HMD calibration, I decided to share my preliminary, yet working, code with you.

A particular feature of the current implementation is that it estimates the center position (and 2-DoF orientation) of an eyeball in 3D.

What it does:

Given a closeup image of an eye, this program estimates the 3D potision of the center and the oriation (two rotation axes) of an eye ball: (Left) A detected limbus (iris) area, (Middle left) 2D iris ellipse candidates from extracted edge segments, (Middle right) Best-fit 2D iris ellipse, (Right) Final 3D eyeball pose(s) estimated from the 2D ellipse.

Overview

main.cpp should give you a brief usage. In short, there are two steps to detect eyeball position from an image:

  1. eye_tracker::IrisDetector::DetectIris detects iris region and outputs a 2D iris ellipse (eye_tracker::Ellipse), then
  2. the ellipse computes the eyeball position given a few eyeball parameters (eye_tracker::Ellipse::ComputeEllipsePose).

eye_tracker::IrisDetector is in iris_detector.h and eye_tracker::Ellipse in iris_geometry.h

By default, some debug output are enabled by preprocessor macros (DEBUG_*) in iris_detector.cpp and iris_geometry.h.

How to compile:

A CMakeLists.txt is provided for building a solution via CMake.

Platform:

  • Only tested on Windows (7, x86 and x64)

Requirements:

  • OpenCV 2.4.X (not 3.0.0 aplha yet)
  • Eigen 3
  • Boost > 1.49
  • Intel TBB

You would need to set their root directories manually in Cmake, search their library names to find related variables in Cmake GUI when you get an error.

In addition to the above libraries, this repository contains codes from the following external open-source libraries:

The former is slightly modified (PupilTracker.cpp) and the latter is editted so that it works on OpenCV 2.X.

How to use:

Run main.exe in ./bin_win_x86 (vc10, x86 build) to get the example result above.

>> main.exe [image file]

Limitations

  • Debug build crashes with an error related to TBB used in the iris detector.
  • The code is not optimized, thus not real-time capable, yet
  • The tracking is unstable for light-color eyes

Note

  • The algorithm returns two possible eye positions, so we need a postprocessing to determine the right one. Our work in the reference introduces a disambiguation method
  • Our coodinate system is right-handed and the image origin is assumed to be top-left. In other words, we follow the OpenGL convention, not OpenCV.

Reference:

Please refer to the following publication, which explaines the detail of the algorithm with a code table:

@article{itoh2014-3dui
  author    = {Itoh, Yuta and Klinker, Gudrun},
  title     = {Interaction-Free Calibration for Optical See-Through 
               Head-Mounted Displays based on 3D Eye Localization},
  booktitle = {{Proceedings of the 9th IEEE Symposium on 3D User Interfaces (3D UI)}},
  month     = {march},
  pages     = {75-82},
  year      = {2014}
}

Licence

This repository is provided under MIT license.

3d-eyeposition-estimation's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.