nagyistoce / ehci

Automatically exported from code.google.com/p/ehci
0 stars 0 forks source link

Errors "Identifier not found" and others #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, 

Im new to this and am looking for codes that can give me the head pose 
information from videos. I came across your code and found that I could use 
this. It is great work!!

I copied and pasted your "6dofhead.cpp" file into my "headposegoogle.cpp" file 
and added the "echi.h", "echi.cpp" and "boxView3d.cpp" files, as directed in 
the "Compiling on Windows" page. On building this, I am getting the following 
errors. 

"Error  23  error C3861: 'isEhciTextureCreated': identifier not found   d:\demo 
project\headposegoogle\headposegoogle\headposegoogle.cpp    602 headposegoogle
Error   24  error C3861: 'getEhciGlTexture': identifier not found   d:\demo 
project\headposegoogle\headposegoogle\headposegoogle.cpp    614 headposegoogle
Error   25  error C3861: 'getGeneratedImage': identifier not found  d:\demo 
project\headposegoogle\headposegoogle\headposegoogle.cpp    632 headposegoogle
Error   26  error C3861: 'setGeneratedImage': identifier not found  d:\demo 
project\headposegoogle\headposegoogle\headposegoogle.cpp    633 headposegoogle
Error   27  error C2227: left of '->imageData' must point to 
class/struct/union/generic type d:\demo 
project\headposegoogle\headposegoogle\headposegoogle.cpp    641 headposegoogle
Error   28  error C2227: left of '->widthStep' must point to 
class/struct/union/generic type d:\demo 
project\headposegoogle\headposegoogle\headposegoogle.cpp    642 headposegoogle
Error   29  error C3861: 'getGeneratedImage': identifier not found  d:\demo 
project\headposegoogle\headposegoogle\headposegoogle.cpp    641 headposegoogle
Error   30  error C3861: 'getGeneratedImage': identifier not found  d:\demo 
project\headposegoogle\headposegoogle\headposegoogle.cpp    641 headposegoogle
Error   31  error C2227: left of '->width' must point to 
class/struct/union/generic type d:\demo 
project\headposegoogle\headposegoogle\headposegoogle.cpp    643 headposegoogle
Error   32  error C3861: 'getGeneratedImage': identifier not found  d:\demo 
project\headposegoogle\headposegoogle\headposegoogle.cpp    643 headposegoogle
Error   33  error C3861: 'getGeneratedImage': identifier not found  d:\demo 
project\headposegoogle\headposegoogle\headposegoogle.cpp    662 headposegoogle
Error   34  error C3861: 'getGeneratedImage': identifier not found  d:\demo 
project\headposegoogle\headposegoogle\headposegoogle.cpp    663 headposegoogle
Error   35  error C3861: 'getEhciModelScale': identifier not found  d:\demo 
project\headposegoogle\headposegoogle\headposegoogle.cpp    745 headposegoogle
"

On googling this, I found some solutions. But I did not really understand how 
to solve this. Is there any advice from you regarding this?

Also, just letting you know, I am intending to use this code for extracting 
head pose information from recorded videos and use that information for further 
work in my research. I want to be able to get the head pose information in the 
form of numbers into a file. Thanks in advance for any help. 

Cheers,
Jinesh

Original issue reported on code.google.com by jines...@gmail.com on 3 Oct 2010 at 5:28

GoogleCodeExporter commented 9 years ago
Hi Jinesh,
thanks for your feedback, you are welcome :)
It seems you are not including ehci.h correctly, since it cannot find the 
definitions. Where are you compiling the code? Are you sure you have included 
ehci.h as a header of your project?
You got a cool use for the project, but I'm afraid it's only going to work if, 
at some point, the people in the video face the camera so it can bootstrap.

Please write back,
best regards,
Daniel

Original comment by danielba...@gmail.com on 5 Oct 2010 at 2:13

GoogleCodeExporter commented 9 years ago
Hey Daniel,

Thanks for the reply. 

I have copied the file ehci.h in the folder of the source file. 
I have included the file in the header of the project. I also included the lib 
folder containing this file in the Tools>Options..>etc...include option!!Still 
the same errors. 

Yes. That was one thing I noticed in the executable version of your code that 
once the frontal view was lost, it caused errors in the animated face 
orientation. That was the next thing I wanted to discuss with you actually. 

Regards,
Jinesh

Original comment by jines...@gmail.com on 5 Oct 2010 at 4:02

GoogleCodeExporter commented 9 years ago
Hi Jinesh,
I'm assuming you are using Visual Studio, ok? 
So, you should right click your project, properties.
In the Configuration Properties, on the left, C/C++. Now, look for a line 
called "Additional Include Directories", on the right.
Click the "..." and make sure you add the folder in which ehci.h is located.
Now, your include errors should be gone.

About the frontal view problem, well... this is an hypothesis of this approach. 
It considers the user will face the camera at some point. So, if you cannot 
make sure it's true for the videos you are using, chances are this is not the 
best approach for what you are looking for. But I'm open for discussing other 
ideas.

Best regards, 
Daniel

Original comment by danielba...@gmail.com on 6 Oct 2010 at 2:43

GoogleCodeExporter commented 9 years ago
Hey Daniel,

Yes. I am using Visual Studio 2008. I followed the procedure you have given. 
Unfortunately that still doesn't seem to solve the errors. !!??!!

About our other discussion, the subject in the video does surely provide a 
frontal face at many times in the video. So that's fine. But there are times 
when the head is turned more than 90 degrees on either side of the frontal 
view. In those situations, the estimation loses accuracy. But the subject 
surely comes back. From your executable, I feel that this problem can be solved 
if we can somehow do the re-initialization automatically. 

Thanks and Regards,
Jinesh

Original comment by jines...@gmail.com on 6 Oct 2010 at 5:42

GoogleCodeExporter commented 9 years ago
Hey,

I realised the stupid mistake that I have done. Or rather, the step that I have 
not done. I have not installed EHCI 0.6 itself. Basically I havent done any of 
the steps in the Install file as below.

Installation instructions for EHCI 0.4
--------------------------------------

In order to install the library, go to the directory in which you've copied the 
ehci-0.4.tar.gz and issue the following commands:

  % tar xvfz ehci-0.4.tar.gz
  % cd ehci-0.4             
  % ./configure             
  % make      
Now, log as super user, go to the ehci-0.4 directory and run              
  % make install            

This is the explanation of the commands:

  % tar xvfz ehci-0.4.tar.gz   # unpack the sources
  % cd ehci-0.4                # change to the toplevel directory
  % ./configure                # run the `configure' script
  % make                       # build EHCI
  % make install               # install EHCI

I am installing this on Windows. DO you have instructions for Windows? Kindly 
send it quickly, or let me know what I need to do. I think this should solve 
the problem Ive been having. (Stupid me)

Jinesh

Original comment by jines...@gmail.com on 14 Oct 2010 at 4:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi Jinesh :)

Well, these instructions are for ehci-0.4. I recognize they should have been 
updated, but here goes the instructions:
1- Download and install CMake: http://www.cmake.org/
2- Open the cmake-gui
3- On the "Where is the source code:" point to the place where you have 
downloaded and extracted ehci-0.7 source (find it here 
http://ehci.googlecode.com/files/ehci-0.7-src.zip in the downloads section, I 
have just updated)
4- On the "Where to build the binaries:" choose your preferred place to 
generate solution files
5- Click "Configure" and choose your installed compilers, and then Finish
6- Chances are you'll get an error in configuration process. It's ok, let's fix 
it
7- CMake hasn't found your directories for OpenCV and GLUT. For OpenCV, just 
browse to it, in case you have it installed. Else, go to sourceforge and grab 
it, install, and then point to it... it's usually at "C:/OpenCV2.1"
8- For GLUT, on windows, you will need to point to Nate Robins binaries (google 
for Nate Robins glut), http://www.xmission.com/~nate/glut.html . Download and 
extract the bin version. And then, point GLUT_INCLUDE_DIR to 
Downloads/glut-3.7.6-bin/glut-3.7.6-bin and GLUT_LIBRARY to 
Downloads/glut-3.7.6-bin/glut-3.7.6-bin/glut32.lib
9- Check the "Build_opengl_samples" for some fun
10- Hit configure again... you'll see some warnings and then something like:
"Looking for GLUT
Looking for GLUT - found : C:/Documents and Settings/Administrator/My 
Documents/Downloads/glut-3.7.6-bin/glut-3.7.6-bin
Configuring done"
11- Well done, hit "Configure" again, and then "Generate". You should see: 
"Generating done"
12- Congratulations, now you have all the solution files (in case you are with 
Visual Studio) so you can open then and change them as you wish. Go to 
"\ehci-build\samples" and open the boxView3d.vcproj, for instance. Click 
"Build->Build Solution" and Visual Studio should generate the executables on 
"ehci-build\samples\Debug". You should just go there and double click 
boxView3d.exe, for instance. And then, you might get something like: "This 
application has failed to start because cxcore210d.dll was not found". It means 
your opencv dlls are not on the path... a fast way to find them is copying all 
dll files from "C:\OpenCV2.1\bin" to your ehci-build\samples\Debug" folder.
13- Double click them again and then... oops, glut32.dll might also be missing. 
Just copy it there as well (or send to your system32). Remember that it comes 
from Nate Robins glut binaries, there's a file at 
"glut-3.7.6-bin\glut-3.7.6-bin\glut32.dll". 
14- Almost there... now your executable is looking for data files... which are 
back in your ehci source folder: "\ehci\data". Just copy the whole directory to 
your samples\Debug and then... almost there... your data\config.ini might be 
trying to open some trash. Just make sure it looks like this:
USE_RANSAC 1
RANSAC_SAMPLES 6
RANSAC_DISTANCE_THRESHOLD 30.0
RANSAC_ITERATIONS 20
CAMERA_INDEX 1
OPEN_MOVIE NO
Edit and save it, go back to boxview3d.exe and double click it :)
Voilà... you should see the 3d cube moving as your head moves. Check out the 
other samples, make changes and write back in case you had any other problems.

Thanks for posting your doubts.

Original comment by danielba...@gmail.com on 15 Oct 2010 at 12:53

GoogleCodeExporter commented 9 years ago
Hello, I am getting similar errors when Im using Ehci. I am trying to use ehci 
along with Kinect XBOX visual camera. I am running it on linux. I have openNI, 
ehci and opencv installed. When I try to compile using the following line:

g++ main.cpp  -I/usr/include/nite -I/usr/include/ni -I/usr/local/include 
-I/usr/local/include -lOpenNI  -lGL -lGLU -lglut -lehci `pkg-config --libs 
--cflags opencv` -lEGL SceneDrawer.cpp HeadTracker.cpp opengles.cpp -o trial

I get the following errors: 

HeadTracker.cpp: In function ‘void keyframeRelated()’:
HeadTracker.cpp:29:26: error: ‘isEhciTextureCreated’ was not declared in 
this scope
HeadTracker.cpp:41:41: error: ‘getEhciGlTexture’ was not declared in this 
scope
HeadTracker.cpp: In function ‘void drawHeadModel(IplImage*, float, 
XnPoint3D)’:
HeadTracker.cpp:96:25: error: ‘setGeneratedImage’ was not declared in this 
scope
HeadTracker.cpp:98:23: error: ‘getGeneratedImage’ was not declared in this 
scope
HeadTracker.cpp:99:59: error: invalid conversion from ‘int’ to 
‘IplImage*’
HeadTracker.cpp:99:59: error:   initializing argument 3 of ‘int ehciLoop(int, 
int, IplImage*)’
HeadTracker.cpp:102:59: error: invalid conversion from ‘int’ to 
‘IplImage*’
HeadTracker.cpp:102:59: error:   initializing argument 3 of ‘int 
ehciLoop(int, int, IplImage*)’

Can you please help?

Thank you, 
Charan

Original comment by charand...@gmail.com on 8 Jul 2011 at 1:48