I hope you will be able to read this ASAP, because i am really running out of time and i have a graduation project to deliver after 4 days! ....
Once i post a thread about, "How to Control the CameraFPS using a regular webcam!" and someone post me a helpful response that i am thankful about, but it doesn't work just exactly what i am looking for!
Again, my project is basically about getting a snapshot from the webcam every 0.1 second, and then analyze this image using matlab to determine which is greater, the blue value in the Image or red value! ...
and stores the result in a text file as a percentage(eg. if the Red value would be 70, then the blue would be 30), that is readable in the irrlicht code.
So ... if the red Value is higher than the blue's the camera would look at right.
And if the Blue is the Higher one, the camera would turn left.
now lets say the webcam took a snap shot and that the red value was the higher value, the webcam would turn right, AND if the webcam took a second snapshot and still the red value is Higher the blue, i will turn right Again, and it will keep in turning right until the webcam takes a snapshot with a Blue Value higher than the red's
The only 2 variables i get from the matlab is:
float red;
float blue;
you post this:
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));