I have to develop an Intensity Meter, which will basically display the average intensity level of a uniformly exposed image. As the focus of the camera is changed the pointer starts moving to the correct value in the following display:

Along with that a text field will be displaying the exact intensity value in digit as well, as can be seen in the figure.
Till now I have been able to capture the image and store its intensity values in a text file. Now I have to develop this animated image. I have never done any animations using OpenCV, so I am looking for some idea how to go about this kind of animation using OpenCV.
Any pointers here?
My complete application is based on Windows Forms (C++) and I am using OpenCV for other
Image processing tasks (not listed here).
Note: The meter will basically show average intensity level of a uniformly exposed area.
Update
I have got some solution here.
So with some research I now know the algorithm:
Theta= A * I
Where,
Theta= angle at which the pointer is rotated
A = Proportionality factor
I= Intensity Level
The angle of rotation will be directly proportional to the intensity level.
So now here is how I plan to go:
1- Create a new Window using cvNamedWindow
2- Display the static part of the image , i.e the dial in the figure, which never changes
3- Display a vertical Pointer pointing at the middle
4- Get the value of Intensity Level I, and apply the formula above to calculate Theta.
5- Based on the angle calculated above, rotate the Pointer by using OpenCv Function.
Can some verify my understanding? Especially please tell me what is the fastest function for rotating the pointer? Please let me know if you can improve it further.
I’ll suggest two options.
I haven’t done drawing in opencv, but I think I found the parts you would need:
Please update the question with more details about which parts have you stuck. Sorry if I linked to multiple versions of opencv documentation. Shouldn’t matter for these fundamental functions I guess.
update for the equation:
I haven’t tested this at all, but it seemed like something fun to come up with:
Assumptions:
Configuration Variables:
Input Variables:
Output Variables:
Calculation:
for readability:
get the angle for the needle
get the virtual center of the circle (e.g. the center for the one in your example image would be outside the image)
get the needle start and end points