Giter Site home page Giter Site logo

Comments (8)

Aravind-Suresh avatar Aravind-Suresh commented on August 25, 2024 1

Check the oic.cpp file. The lines containing the function calls: draw_eye_gaze and draw_facial_normal are relevant. The draw_eye_gaze function takes the point on the image (pupil) and the gaze vector (Both of them are Kalman-smoothed) along with other parameters. The draw_facial_normal takes the facial-pose vector along with the frame and other parameters.

These are smoothed estimates of gaze and pose respectively. How you use this information to move mouse pointer or any other object for that matter is implementation dependent. You have to control some attribute of the mouse pointer (its position or velocity) using the gaze vector. So the gaze vector (projected onto 2-dimensional space) will be the direction of the instantaneous velocity of the pointer.

We tried something similar to this and it is present in the "demo" branch of this repository. Have a look at it if needed.

Hope this information is useful.

from eye-gaze.

Aravind-Suresh avatar Aravind-Suresh commented on August 25, 2024 1

The first argument should be zero. The second argument is the scale factor of mouse movement - try with values between 1 to 100. For this to work you need to uncomment the mouse_move function call.

The demo program also simulates key-presses. Check that also.

from eye-gaze.

andreosky avatar andreosky commented on August 25, 2024

Hi,
thanks a lot for your fast answer. I had already seen the program in the demo branch (and it seems to be just what I'm looking for), but I still have problems to lunch it.
I can successfully compile it (with g++-5 compiler and -fPIC flag). But, when I try to lunch it, I get the following error messages:
"HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP
Beta : 0.855501
Beta : 0.831737
Segmentation Error (core dump created)".
I have no idea on how to solve this problem, but the created core dump file is available at the following link, if it can be useful for you: https://www.dropbox.com/sh/pkgihddzy1ztalr/AACpDsQjHOuXRzqvduT3KLila?dl=0
Thanks a lot again Aravind.
Regards.

from eye-gaze.

andreosky avatar andreosky commented on August 25, 2024

I think that the main problem is that I can't unserstand which parameters I've to give to the main function to launch it!!!

from eye-gaze.

Aravind-Suresh avatar Aravind-Suresh commented on August 25, 2024

The above bug seems to be some issue related to video drivers. Check if the drivers are proper by running some basic program to read from the camera. If it works do the following, else refer some stack-overflow posts and fix this.

Checkout the v1.0 branch as mentioned in the README. Make the binaries and try executing it. Once the executable works, try implementing the mouse-pointer logic on top of this tagged version. The demo branch might be broken (not sure though) - we were migrating between different versions of OpenCV.

from eye-gaze.

andreosky avatar andreosky commented on August 25, 2024

Now I'm able to run the program. No video drivers problems. Only missing parameters while running it. Please simply help me by explaining the role of the parameters that I need to pass. (For example: I successfully launched it with "./bin/oic 0 1 2" but the mouse pointer doesn't move (even if I enabled the commented line relative to the function mouse_move).

from eye-gaze.

andreosky avatar andreosky commented on August 25, 2024

I already solved that problem, but I want to ask few more questions:
1: Even thought I read that in the function mouse_move there are the eye gaze parameters ("vec_ce_kalman_l" that I think that it means vector_center-eye_kalman_left), it seems that the mouse movement depends only on the nose gaze. Am I right? And, if yes, how to move the pointer with the eye gaze?
2: It seems that mouse moves with relative coordinates. How to move the pointer with absolute position? Which values should I pass to XWarpPointer?
3: How to simulate a click of the mouse with my eyes? Is it already implemented?
I'm glad to talk with a brilliant person like you, you are very kind.

from eye-gaze.

andreosky avatar andreosky commented on August 25, 2024

Aravind-Suresh please help me by answering to the last message..then I'll close the issue..
Thank you again for your patience

from eye-gaze.

Related Issues (18)

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.