Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, I'm trying to install cvEyeTracker but I'm getting some strange problems. I was in general help before but after being very informative Segfault concluded something mysterious is going on ...
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    9

    cvEyeTracker install errors

    Hi,

    I'm trying to install cvEyeTracker but I'm getting some strange problems. I was in general help before but after being very informative Segfault concluded something mysterious is going on and suggested that I go to the people who know everything.

    "I'm not a programmer, IMO this means the program you are trying to compile has syntax errors, possible is the syntax is changed and the way they wrote it back in 2006 is obsolete now.
    Try posting here at Linuxforums Progamming subforum."

    Here's my error, pulled from the console:

    eyetracker@eyetracker-desktop:~/Documents/cvEyeTracker-1.2.5$ make
    g++ -c -O2 cvEyeTracker.c -O2 -I/usr/include/opencv
    cvEyeTracker.c: In function ‘void Draw_Cross(IplImage*, int, int, int, int, double)’:
    cvEyeTracker.c:660: error: conversion from ‘double’ to non-scalar type ‘CvScalar’ requested
    cvEyeTracker.c:661: error: conversion from ‘double’ to non-scalar type ‘CvScalar’ requested
    cvEyeTracker.c: In function ‘void Show_Calibration_Points()’:
    cvEyeTracker.c:668: error: cannot convert ‘CvScalar’ to ‘double’ for argument ‘6’ to ‘void Draw_Cross(IplImage*, int, int, int, int, double)’
    cvEyeTracker.c: In function ‘void process_image()’:
    cvEyeTracker.c:1023: error: conversion from ‘int’ to non-scalar type ‘CvScalar’ requested
    cvEyeTracker.c:1024: error: conversion from ‘int’ to non-scalar type ‘CvScalar’ requested
    cvEyeTracker.c:1049: error: conversion from ‘int’ to non-scalar type ‘CvScalar’ requested
    cvEyeTracker.c:1050: error: conversion from ‘int’ to non-scalar type ‘CvScalar’ requested
    cvEyeTracker.c: In function ‘void Open_GUI()’:
    cvEyeTracker.c:1145: error: invalid conversion from ‘void (*)(int, int, int, int)’ to ‘void (*)(int, int, int, int, void*)’
    cvEyeTracker.c:1145: error: initializing argument 2 of ‘void cvSetMouseCallback(const char*, void (*)(int, int, int, int, void*), void*)’
    cvEyeTracker.c:1146: error: invalid conversion from ‘void (*)(int, int, int, int)’ to ‘void (*)(int, int, int, int, void*)’
    cvEyeTracker.c:1146: error: initializing argument 2 of ‘void cvSetMouseCallback(const char*, void (*)(int, int, int, int, void*), void*)’
    cvEyeTracker.c:1154: error: cannot convert ‘CvScalar’ to ‘int’ in assignment
    cvEyeTracker.c:1155: error: cannot convert ‘CvScalar’ to ‘int’ in assignment
    cvEyeTracker.c:1156: error: cannot convert ‘CvScalar’ to ‘int’ in assignment
    cvEyeTracker.c:1157: error: cannot convert ‘CvScalar’ to ‘int’ in assignment
    cvEyeTracker.c:1158: error: cannot convert ‘CvScalar’ to ‘int’ in assignment
    cvEyeTracker.c: In function ‘void Open_Ellipse_Log()’:
    cvEyeTracker.c:1210: warning: deprecated conversion from string constant to ‘char*’
    make: *** [cvEyeTracker.o] Error 1

    Thanks very much

  2. #2
    Just Joined!
    Join Date
    Jun 2008
    Posts
    9
    Does anyone know a resolution to this problem? I'm really hoping to get cveyetracker installed and I'm nearing the end of my luck...

  3. #3
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Step one: check the installation instructions (I imagine it came with installation instructions) and see whether you followed everything to the letter.

    Step two (only if step one has been tried and found wanting): go here to get the e-mail address of the guy who wrote it, and ask him.

    Hope this helps.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  4. #4
    Just Joined!
    Join Date
    Nov 2008
    Posts
    3
    !SOLUTION!

    Hi,
    I just compiled and ran the cvEyeTracker. I got the same problem. The point is that the library inculding the CvScalar type was updated since the cvEyeTracker was written and not backward compatible. Thus casting doubles or ints to CvScalar gives errors. Simply change the relevant doubles and ints to cvScalar.

    So you need to fix your cvEyeTracker.c file:

    Step 1 - Change at line ~160:
    Code:
    int White, Red,Green,Blue,Yellow;
    to:
    Code:
    CvScalar White, Red,Green,Blue,Yellow;
    Step 2 - Change at line ~646
    Code:
    void Draw_Cross(IplImage *image, int centerx, int centery, int x_cross_length, int y_cross_length, double color)
    to
    Code:
    void Draw_Cross(IplImage *image, int centerx, int centery, int x_cross_length, int y_cross_length, CvScalar color)
    I made the fix last week and didn't documented. So, I might have stepped out something but this is the idea.

    I hope the solution was not too late.

  5. #5
    Just Joined!
    Join Date
    Nov 2008
    Posts
    3
    Additional notes on cvEyeTracker:

    Camera Setting
    There is a camera setup (dc1394_dma_setup_capture function) at about line 230. You need o specify your camera interface at the 10th parameter. (Which is "/dev/video1394" by default). I had to change it to "/dev/video1394/0" for instance.

    Sliders
    You will see four sliders on control window when you execute the program. This is not a bug, it seems that the author erased other sliders from the code in version 1.2.5. You need to add them if you want them.

    Calibration & Starting tracking
    First: click on the eye cam to locate the eye
    Second: give 9 reference points on the scene window by clicking where eye is staring at
    Third: start tracking by clicking with the middle mouse button (not the second, bug in the code) on the scene screen.
    If you do not follow this order, you may get run time errors.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...