Coder Social home page Coder Social logo

nikhil-ko / cvheadtrack Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 69.54 MB

Custom made, Computer Vision based head tracking software made using OpenCV, DLib and OpenTrack to communicate with game.

License: GNU General Public License v3.0

C# 100.00%
opencv dlib face yaw opentrack

cvheadtrack's Introduction

CVHeadTrack

Custom made, Computer Vision based head tracking software made using OpenCV, DLib and OpenTrack to communicate with game.

I chose C# so I can learn .NET and WPF. Had to do with wrapper libraries for OpenCV and DLib but it does the job.

Progress

Prototype complete, tested on Elite Dangerous, need to do a lot of optimization, clean up the code and make the tracker overall smoother.

The core elements have been implemented where: OpenCV captures frames from webcame/DroidCam url. Dlib model used to extract face landmarks. OpenCV used again to projected into 3D space then the head yaw calculated from the rotational matrix. This data is send to the OpenTrack input UPD socket. Need to experiment with other method to possible improve this.

Left to do:

  1. Use less features landmark model for face (Immediate)
  2. Try lower resolution images to speed up
  3. Write function to smooth out camera motion
  4. Thread code where possible?
  5. Use GPU for image calculations?
  6. Add x,y,x tracking. (Currently only yaw)
  7. Variable output port

Demo

Sample face tracking

Will add more after testing

I did originally want to use SimConnect API, waiting on flight sim developers to fix/implement CameraRelative6DOF function. Guess publishers don't care about dev kits.

Sad Keanu

References:

OpenTrack

Nice software to support head tracking in a large variety of games Has a UPD port which listens for the head tracking data then it translates to which ever game the user wants https://github.com/opentrack/opentrack

Face model

Open source model from http://dlib.net/files/. Could look into using a lighter weight one to improve performance.

Modules used

  1. DlibDotNet (face nn)
  2. OpenCvSharp (to read from ip camera) - shouldn't need if you afford a real webcam

Bib

cvheadtrack's People

Contributors

nikhil-ko avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

abdiiwan1841

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.