How to Control the CameraFPS using a regular webcam!

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
mmh771
Posts: 39
Joined: Thu Apr 27, 2006 7:02 am

How to Control the CameraFPS using a regular webcam!

Post by mmh771 »

Guys,
I am working in my graduation Project, which is basically about Image Recognition using Matlab to a video stram taken by a regular PC Webcam!

The idea that i take a picture every 1 sec. to a human face, analyze it, and return whether he/she is looking left or right, then i will generate a command to the ICameraSceneNode to turn based on the analyzed direction!

I used Matlab to analyze the face, and wrote the result on a text file, which is read by C++ ... but i don't know how to make the Camera turn into the direction i want without using the MOUSE..

Any help please!
Ced666
Posts: 86
Joined: Fri Jan 13, 2006 10:29 am
Location: Belgium

Post by Ced666 »

Don't use a FPS camera. A standard camera will do the trick.
Look at the API documentation for the camera and you will see that there is a SetTarget method which you can use to specify the target viewed by the camera.

And BTW, don't cross-post !!
stef_
Posts: 53
Joined: Tue Apr 18, 2006 9:39 pm
Contact:

Post by stef_ »

You can always use setPosition/setRotation (instead of setTarget, I really don't like it)
in this way:

Code: Select all

ICameraSceneNode *camera;
camera = smgr->addCameraSceneNodeFPS (0, 100, 500);
camera->setInputReceiverEnabled (false);

then:
camera->setPosition (irr::core::vector3df (posx, posy, posz));
camera->setRotation (irr::core::vector3df (rotx, roty,rotz));
It works really well :)

I don't know why lot of people here don't use setRotation in this way and
they use instead setTarget in a very complicated way.

bye
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Your project sounds a lot like the device made by this company http://www.naturalpoint.com/
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

question

Post by juliusctw »

How are you receiving the input from the cam for irrlicht callback?
Post Reply