Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

move mouse with pupil (eye writer)

hello i write program for 1-detect face 2-detect eye 3-detect pupil (circle hough) 4-move mouse

Here are the codes: https://github.com/Ehsan-Shahnazi/EyeWriter/blob/master/22-22.cpp

The problem I have is that ‌Move the mouse range is low. the range of motion mouse is 20 x 20 pixels.

thanks

move mouse with pupil (eye writer)

hello i write program for 1-detect face 2-detect eye 3-detect pupil (circle hough) 4-move mouse

Here are the codes: https://github.com/Ehsan-Shahnazi/EyeWriter/blob/master/22-22.cpp

The problem I have is that ‌Move the mouse range is low. the range of motion mouse is 20 x 20 pixels.

Perhaps the problem of how to track pupil or codes to move the mouse or...???

thanks

move mouse with pupil (eye writer)

hello i write program for 1-detect face 2-detect eye 3-detect pupil (circle hough) 4-move mouse

Here are the codes: https://github.com/Ehsan-Shahnazi/EyeWriter/blob/master/22-22.cpp

The problem I have is that ‌Move the mouse range is low. the range of motion mouse is 20 x 20 pixels.pixels. Mouse cursor moves only in a very small area of the desktop. i need Mouse cursor moves in all area of the desktop.

Perhaps the problem of how to track pupil or codes to move the mouse or...???

thanks

move mouse with pupil (eye writer)

hello i write program for 1-detect face 2-detect eye 3-detect pupil (circle hough) 4-move mouse

Here are the codes: https://github.com/Ehsan-Shahnazi/EyeWriter/blob/master/22-22.cpp

The problem I have is that ‌Move the mouse range is low. the range of motion mouse is 20 x 20 pixels. Mouse cursor moves only in a very small area of the desktop. desktop.

i need Mouse cursor moves in all area of the desktop.

Perhaps the problem of how to track pupil or codes to move the mouse or...???

thanks

move mouse with pupil (eye writer)

hello i write program for 1-detect face 2-detect eye 3-detect pupil (circle hough) 4-move mouse

Here are the codes: https://github.com/Ehsan-Shahnazi/EyeWriter/blob/master/22-22.cpp

The problem I have is that ‌Move the mouse range is low. the range of motion mouse is 20 x 20 pixels. Mouse cursor moves only in a very small area of the desktop.

i I need Mouse cursor moves in all area of the desktop.

Perhaps the problem of how to track pupil or codes to move the mouse or...???

thanks

move mouse with pupil (eye writer)

hello i write program for 1-detect face 2-detect eye 3-detect pupil (circle hough) 4-move mouse

Here are the codes: https://github.com/Ehsan-Shahnazi/EyeWriter/blob/master/22-22.cpp

......
......
.....

 void mousemove(int x_pos, int y_pos)
{
    ///Strings that will contain the conversions
    string xcord; string ycord;

    ///These are buffers or something? I don't really know... lol.
    stringstream sstr; stringstream sstr2;

    ///Conversion to regular string happens here
    sstr<<5*x_pos;
    xcord = sstr.str();
    sstr2<<5*y_pos;
    ycord = sstr2.str();

    ///Getting the command string
    string command = "xdotool mousemove " + xcord + " " + ycord;

    ///Converting command string to a form that system() accepts.
    const char *com = command.c_str();
    system(com);
}


int main()
{
    CascadeClassifier face_cascade("/home/elinux/opencv-3.1.0/data/haarcascades_cuda/haarcascade_frontalface_alt2.xml");
    CascadeClassifier eye_cascade("/home/elinux/opencv-3.1.0/data/haarcascades_cuda

/haarcascade_righteye_2splits.xml");
    ....
    ....
    ...
morphologyEx(framepupil, morph_grad, MORPH_GRADIENT,se,Point(-1,-1),1);
HoughCircles(morph_grad,  circles,  HOUGH_GRADIENT, 1,  1000,  100,15, 10,20);
if(circles.size()!=0){
        (circles[t][0])=(circles[t][0])*((circles[t][0])/10);
        (circles[t][1])=(circles[t][1])*((circles[t][1])/10);
        mousemove((circles[t][0]),(circles[t][1]));
        }
....
.....
....

The problem I have is that ‌Move the mouse range is low. the range of motion mouse is 20 x 20 pixels. Mouse cursor moves only in a very small area of the desktop.

I need Mouse cursor moves in all area of the desktop.

Perhaps the problem of how to track pupil or codes to move the mouse or...???

thanks

move mouse with pupil (eye writer)

hello i write program for 1-detect face 2-detect eye 3-detect for detect face & then detect Right eye & then detect pupil (circle hough) 4-move mouse

Here are the codes: https://github.com/Ehsan-Shahnazi/EyeWriter/blob/master/22-22.cpp

......
......
.....

 void mousemove(int x_pos, int y_pos)
{
    ///Strings that will contain the conversions
    string xcord; string ycord;

    ///These are buffers or something? I don't really know... lol.
    stringstream sstr; stringstream sstr2;

    ///Conversion to regular string happens here
    sstr<<5*x_pos;
    xcord = sstr.str();
    sstr2<<5*y_pos;
    ycord = sstr2.str();

    ///Getting the command string
    string command = "xdotool mousemove " + xcord + " " + ycord;

    ///Converting command string to a form that system() accepts.
    const char *com = command.c_str();
    system(com);
}


int main()
{
    CascadeClassifier face_cascade("/home/elinux/opencv-3.1.0/data/haarcascades_cuda/haarcascade_frontalface_alt2.xml");
    CascadeClassifier eye_cascade("/home/elinux/opencv-3.1.0/data/haarcascades_cuda

/haarcascade_righteye_2splits.xml");
    ....
    ....
    ...
morphologyEx(framepupil, morph_grad, MORPH_GRADIENT,se,Point(-1,-1),1);
HoughCircles(morph_grad,  circles,  HOUGH_GRADIENT, 1,  1000,  100,15, 10,20);
if(circles.size()!=0){
        (circles[t][0])=(circles[t][0])*((circles[t][0])/10);
        (circles[t][1])=(circles[t][1])*((circles[t][1])/10);
        mousemove((circles[t][0]),(circles[t][1]));
        }
....
.....
....
hough) Finally move mouse.

The problem I have is that ‌Move the mouse range is low. the range of motion mouse is 20 x 20 pixels. Mouse cursor moves only in a very small area of the desktop.

I need Mouse cursor moves in all area of the desktop.

This code get the coordinates of the center of the circular Hough and then cursor is moved .

......
......
.....

 void mousemove(int x_pos, int y_pos)
{
    ///Strings that will contain the conversions
    string xcord; string ycord;

    ///These are buffers or something? I don't really know... lol.
    stringstream sstr; stringstream sstr2;

    ///Conversion to regular string happens here
    sstr<<5*x_pos;
    xcord = sstr.str();
    sstr2<<5*y_pos;
    ycord = sstr2.str();

    ///Getting the command string
    string command = "xdotool mousemove " + xcord + " " + ycord;

    ///Converting command string to a form that system() accepts.
    const char *com = command.c_str();
    system(com);
}


int main()
{
    CascadeClassifier face_cascade("/home/elinux/opencv-3.1.0/data/haarcascades_cuda/haarcascade_frontalface_alt2.xml");
    CascadeClassifier eye_cascade("/home/elinux/opencv-3.1.0/data/haarcascades_cuda

/haarcascade_righteye_2splits.xml");
    ....
    ....
    ...
morphologyEx(framepupil, morph_grad, MORPH_GRADIENT,se,Point(-1,-1),1);
HoughCircles(morph_grad,  circles,  HOUGH_GRADIENT, 1,  1000,  100,15, 10,20);
if(circles.size()!=0){
        (circles[t][0])=(circles[t][0])*((circles[t][0])/10);
        (circles[t][1])=(circles[t][1])*((circles[t][1])/10);
        mousemove((circles[t][0]),(circles[t][1]));
        }
....
.....
....

Here are the all codes: https://github.com/Ehsan-Shahnazi/EyeWriter/blob/master/22-22.cpp

Perhaps the problem of how to track pupil or codes to move the mouse or...???

thanks

calibration between move mouse with & move pupil (eye writer)

hello i write program for detect face & then detect Right eye & then detect pupil (circle hough) Finally move mouse.

The problem I have is that ‌Move the mouse range is low. the range of motion mouse is 20 x 20 pixels. Mouse cursor moves only in a very small area of the desktop.

I need Mouse cursor moves in all area of the desktop.

This code get the coordinates of the center of the circular Hough and then cursor is moved .

......
......
.....

 void mousemove(int x_pos, int y_pos)
{
    ///Strings that will contain the conversions
    string xcord; string ycord;

    ///These are buffers or something? I don't really know... lol.
    stringstream sstr; stringstream sstr2;

    ///Conversion to regular string happens here
    sstr<<5*x_pos;
    xcord = sstr.str();
    sstr2<<5*y_pos;
    ycord = sstr2.str();

    ///Getting the command string
    string command = "xdotool mousemove " + xcord + " " + ycord;

    ///Converting command string to a form that system() accepts.
    const char *com = command.c_str();
    system(com);
}


int main()
{
    CascadeClassifier face_cascade("/home/elinux/opencv-3.1.0/data/haarcascades_cuda/haarcascade_frontalface_alt2.xml");
    CascadeClassifier eye_cascade("/home/elinux/opencv-3.1.0/data/haarcascades_cuda

/haarcascade_righteye_2splits.xml");
    ....
    ....
    ...
morphologyEx(framepupil, morph_grad, MORPH_GRADIENT,se,Point(-1,-1),1);
HoughCircles(morph_grad,  circles,  HOUGH_GRADIENT, 1,  1000,  100,15, 10,20);
if(circles.size()!=0){
        (circles[t][0])=(circles[t][0])*((circles[t][0])/10);
        (circles[t][1])=(circles[t][1])*((circles[t][1])/10);
        mousemove((circles[t][0]),(circles[t][1]));
        }
....
.....
....

Here are the all codes: https://github.com/Ehsan-Shahnazi/EyeWriter/blob/master/22-22.cpp

Perhaps How should calibration between eye positions and cursor positions. Do you have code samples? (Perhaps the problem of how to track pupil or codes to move the mouse or...???or...???)

thanks

calibration between move mouse & move pupil (eye writer)

hello i write program for detect face & then detect Right eye & then detect pupil (circle hough) Finally move mouse.

The problem I have is that ‌Move the mouse range is low. the range of motion mouse is 20 x 20 pixels. Mouse cursor moves only in a very small area of the desktop.

I need Mouse cursor moves in all area of the desktop.

This code get the coordinates of the center of the circular Hough and then cursor is moved .

......
......
.....

 void mousemove(int x_pos, int y_pos)
{
    ///Strings that will contain the conversions
    string xcord; string ycord;

    ///These are buffers or something? I don't really know... lol.
    stringstream sstr; stringstream sstr2;

    ///Conversion to regular string happens here
    sstr<<5*x_pos;
    xcord = sstr.str();
    sstr2<<5*y_pos;
    ycord = sstr2.str();

    ///Getting the command string
    string command = "xdotool mousemove " + xcord + " " + ycord;

    ///Converting command string to a form that system() accepts.
    const char *com = command.c_str();
    system(com);
}


int main()
{
    CascadeClassifier face_cascade("/home/elinux/opencv-3.1.0/data/haarcascades_cuda/haarcascade_frontalface_alt2.xml");
    CascadeClassifier eye_cascade("/home/elinux/opencv-3.1.0/data/haarcascades_cuda

/haarcascade_righteye_2splits.xml");
    ....
    ....
    ...
morphologyEx(framepupil, morph_grad, MORPH_GRADIENT,se,Point(-1,-1),1);
HoughCircles(morph_grad,  circles,  HOUGH_GRADIENT, 1,  1000,  100,15, 10,20);
if(circles.size()!=0){
        (circles[t][0])=(circles[t][0])*((circles[t][0])/10);
        (circles[t][1])=(circles[t][1])*((circles[t][1])/10);
        mousemove((circles[t][0]),(circles[t][1]));
        }
....
.....
....

Here are the all codes: https://github.com/Ehsan-Shahnazi/EyeWriter/blob/master/22-22.cpp

How should calibration between eye positions and cursor positions.positions?? Do you have code samples? samples?

(Perhaps the problem of how to track pupil or codes to move the mouse or...???)

thanks

calibration between mouse move mouse & pupil move pupil (eye writer)

hello i write program for detect face & then detect Right eye & then detect pupil (circle hough) Finally move mouse.

The problem I have is that ‌Move the mouse range is low. the range of motion mouse is 20 x 20 pixels. Mouse cursor moves only in a very small area of the desktop.

I need Mouse cursor moves in all area of the desktop.

This code get the coordinates of the center of the circular Hough and then cursor is moved .

......
......
.....

 void mousemove(int x_pos, int y_pos)
{
    ///Strings that will contain the conversions
    string xcord; string ycord;

    ///These are buffers or something? I don't really know... lol.
    stringstream sstr; stringstream sstr2;

    ///Conversion to regular string happens here
    sstr<<5*x_pos;
    xcord = sstr.str();
    sstr2<<5*y_pos;
    ycord = sstr2.str();

    ///Getting the command string
    string command = "xdotool mousemove " + xcord + " " + ycord;

    ///Converting command string to a form that system() accepts.
    const char *com = command.c_str();
    system(com);
}


int main()
{
    CascadeClassifier face_cascade("/home/elinux/opencv-3.1.0/data/haarcascades_cuda/haarcascade_frontalface_alt2.xml");
    CascadeClassifier eye_cascade("/home/elinux/opencv-3.1.0/data/haarcascades_cuda

/haarcascade_righteye_2splits.xml");
    ....
    ....
    ...
morphologyEx(framepupil, morph_grad, MORPH_GRADIENT,se,Point(-1,-1),1);
HoughCircles(morph_grad,  circles,  HOUGH_GRADIENT, 1,  1000,  100,15, 10,20);
if(circles.size()!=0){
        (circles[t][0])=(circles[t][0])*((circles[t][0])/10);
        (circles[t][1])=(circles[t][1])*((circles[t][1])/10);
        mousemove((circles[t][0]),(circles[t][1]));
        }
....
.....
....

Here are the all codes: https://github.com/Ehsan-Shahnazi/EyeWriter/blob/master/22-22.cpp

How should calibration between eye positions and cursor positions?? Do you have code samples?

(Perhaps the problem of how to track pupil or codes to move the mouse or...???)

thanks