Saturday, February 18, 2012

How to programmatically  control the Logitech Orbit Camera  using C++,VC++

Today I am going to share my knowledge on how to control the Logitech Orbit camera using C++.

This camera has the feature of turning pan-Horizontal movement,Tilt-Vertical Movement and Zoom up to 4X.
When we are building applications where we need to manually control the motion of the camera,we can't use the software provided by Logitech.Instead we need to write our own peace of code to control this.

I think it's better to discuss about only one function of this code for the readers to get a good understanding about the code 



//This method is used to control the rotation of the camera.
void Cameramen::RotateCamera(long valueX,long valueY,long z)
{   
enum_devices("Pan",valueX,0);
enum_devices("Tilt",valueY,0);
enum_devices("Zoom",0,z);
}

This peace of code is used to control all the movements of the camera.I'll describe how.
What is the actual work needed to be done by the programmer is to call this method with the required values for the rotation.

 valueX is the Pan value-Positive numbers to turn the camera into right and negative number to turn the camera to the left.
valueY is the Tilt value-Positive numbers to turn the camera upwards and negative  number to turn the camera downwards.
z is for zoom- value 100 would be the least zoom ,value 400 would be the maximum zoom and Values in between will result in different zoom levels.


No comments:

Post a Comment