Eye tracking code for iPhone and Android

Discussion in 'Public Game Developers Forum' started by 1stSPIN, Sep 13, 2015.

  1. 1stSPIN

    1stSPIN Well-Known Member

    Nov 15, 2014
    605
    0
    0
    Own 1stSPIN
    China / Canadian
    I need some help to find information how to incorporate eye tracking code in a game. We want to track where the player is looking.
     
  2. Destined

    Destined Well-Known Member

    Aug 11, 2013
    1,063
    0
    0
    This isn't trivial so a few lines of code won't cut it.

    This plugin does it well http://www.faceshift.com/#1 and even has a unity wrapper.

    If you are looking to code yourself I reckon he limiting factor will be he camera on the phone. I have a 6+ and even taking a frame of he live video isn't that great and would hard to image processing around the eye.

    Unless you are planning to put a lot of effort and time into this I would look for a plugin and then you need to expect it won't work all the time and have a backup plan for when tracking is lost. Part of the issue of holding a phone is it moves a lot as you play. Also your eyes don't move as much as you think so it could end up very jittery in a lot of implementations.
     
  3. 1stSPIN

    1stSPIN Well-Known Member

    Nov 15, 2014
    605
    0
    0
    Own 1stSPIN
    China / Canadian
    Thank you. The demo is very interesting. But I am looking for eye tracking. Open source software that tracks the direction you are looking in.
     
  4. SpiritBomb Studios

    SpiritBomb Studios Well-Known Member

    Oct 16, 2013
    84
    0
    0
    Game Developer
    Saigon, Vietnam
    So you really think a few "open-source" lines of code can track where a user is looking at?
     
  5. 1stSPIN

    1stSPIN Well-Known Member

    Nov 15, 2014
    605
    0
    0
    Own 1stSPIN
    China / Canadian
    I am sure there is very complex code which has to pick up the data from the front video, detect the eyes and then the pupils then have a test screen that has a dot moving tp different positions on the screen and record the data. Then it will be fairly accurate and can be used for various applications.
     
  6. SpiritBomb Studios

    SpiritBomb Studios Well-Known Member

    Oct 16, 2013
    84
    0
    0
    Game Developer
    Saigon, Vietnam
  7. 1stSPIN

    1stSPIN Well-Known Member

    Nov 15, 2014
    605
    0
    0
    Own 1stSPIN
    China / Canadian
    Umove has developed some software that allows your phone to be all the hardware you need. The program I am sure is complex but the method is easy. All you need to do is connect with your front camera, pickup the data of the users face, especially the eyes. Then put up on the screen different positions and pickup the eye movement and you have all that is needed to know where the users is looking on the screen. It may not be a 100% accurate but it is a good start.
     
  8. Destined

    Destined Well-Known Member

    Aug 11, 2013
    1,063
    0
    0
    #8 Destined, Sep 15, 2015
    Last edited: Sep 15, 2015
  9. 1stSPIN

    1stSPIN Well-Known Member

    Nov 15, 2014
    605
    0
    0
    Own 1stSPIN
    China / Canadian
    I think your right. The method looks simple, not sure if the coding is that hard.
     
  10. Destined

    Destined Well-Known Member

    Aug 11, 2013
    1,063
    0
    0
    A good API always looks simple. It also depends on if it is reliable. It is easy to make something work with a known set of conditions. When you open it to the world you start to see how limited it actually can be.
     

Share This Page