Ask Your Question
2

accurate eye center localisation by means of gradients

asked 2016-01-20 12:07:26 -0600

sarmad gravatar image

updated 2016-01-21 10:07:28 -0600

Hi

I'm trying to run the implementation of this paper

which is at : github

The code is not running , does any one tried to run it ? can you help me to fix it

Regards

I'm getting this error messages :

Error   2   error LNK2019: unresolved external symbol "class cv::Point_<int> __cdecl findEyeCenter(class cv::Mat,class cv::Rect_<int>,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?findEyeCenter@@YA?AV?$Point_@H@cv@@VMat@2@V?$Rect_@H@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "void __cdecl findEyes(class cv::Mat,class cv::Rect_<int>)" (?findEyes@@YAXVMat@cv@@V?$Rect_@H@2@@Z)  C:\Users\sarmad\documents\visual studio 2013\Projects\opencvt\opencvt\Source.obj    opencvt





 Error  3   error LNK2019: unresolved external symbol "void __cdecl createCornerKernels(void)"   (?createCornerKernels@@YAXXZ) referenced in function main  C:\Users\sarmad\documents\visual studio 2013\Projects\opencvt\opencvt\Source.obj    opencvt


 Error  4   error LNK2019: unresolved external symbol "void __cdecl releaseCornerKernels(void)" (?releaseCornerKernels@@YAXXZ) referenced in function main  C:\Users\sarmad\documents\visual studio 2013\Projects\opencvt\opencvt\Source.obj    opencvt



       Error    5   error LNK2019: unresolved external symbol "class cv::Point_<float> __cdecl findEyeCorner(class cv::Mat,bool,bool)" (?findEyeCorner@@YA?AV?$Point_@M@cv@@VMat@2@_N1@Z) referenced in function "void __cdecl findEyes(class cv::Mat,class cv::Rect_<int>)" (?findEyes@@YAXVMat@cv@@V?$Rect_@H@2@@Z)   C:\Users\sarmad\documents\visual studio 2013\Projects\opencvt\opencvt\Source.obj    opencvt



       Error    6   error LNK1120: 4 unresolved externals   C:\opencv\build\x64\vc12\bin\opencvt.exe    1   1   opencvt
edit retag flag offensive close merge delete

Comments

thanks for the link. the code is OK except it needs only updating cvCaptureFromCAM -> cv::VideoCapture. i have compiled and tested with OpenCV 3.1 - Code::Blocks

sturkmen gravatar imagesturkmen ( 2016-01-20 13:07:31 -0600 )edit

Hi @sturkmen , I have changed capture = cvCaptureFromCAM( -1 );to `cv::VideoCapture( 0 ); still this erros displayed using opencv 2.4.10 :

   `C:\Documents\opencv\face\main.o:main.cpp|| undefined reference to `createCornerKernels()'

   'C:\Documents\opencv\face\main.o:main.cpp|| undefined reference to `findEyeCenter(cv::Mat, cv::Rect_<int>, std::string)'
tofi gravatar imagetofi ( 2016-01-20 13:29:12 -0600 )edit

is your output like this image ?

tofi gravatar imagetofi ( 2016-01-20 15:18:21 -0600 )edit

you can see my output in my answer :)

sturkmen gravatar imagesturkmen ( 2016-01-20 15:24:00 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2016-01-20 15:06:55 -0600

updated 2016-01-21 06:36:51 -0600

you can try test.cpp i did some small changes and reformed the code in one cpp file ( tested with OpenCV 3.1 and OpenCV 2.4.12 )

note : sometimes fails to locate pupils

image description

edit flag offensive delete link more

Comments

thanks very much for help , I tried plying video file but was not working , what should be changed to play video files

tofi gravatar imagetofi ( 2016-01-20 15:27:09 -0600 )edit

it is ready to use with both webcam and videofiles

   // Read the video stream
  if( argc > 1)
  capture.open( argv[1] );
  else
    capture.open( 0 );

just run the program giving videofilename as an argument ( if you run on windows drag the videofile on the exe and drop)

sturkmen gravatar imagesturkmen ( 2016-01-20 15:34:12 -0600 )edit

Thanks @sturkmen for help I very appreciate it ,

thanks @tofi for participating

sarmad gravatar imagesarmad ( 2016-01-20 15:44:10 -0600 )edit

@sarmad, @tofi I'm glad to help, also i learned some new approach too. however I think you should apologize to @LorenaGdL

sturkmen gravatar imagesturkmen ( 2016-01-20 15:45:15 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2016-01-20 12:07:26 -0600

Seen: 1,092 times

Last updated: Jan 21 '16