Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8080061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:18:33+00:00 2026-06-05T16:18:33+00:00

I have to develop an Intensity Meter, which will basically display the average intensity

  • 0

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:

enter image description here

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:18:35+00:00Added an answer on June 5, 2026 at 4:18 pm

    I’ll suggest two options.

    1. Use a library: something like WxIndustrialControls which I linked in the comments.
    2. If you really want to draw things in opencv, please post the code that you have so far so that answers can focus on the part that has you stuck.

    I haven’t done drawing in opencv, but I think I found the parts you would need:

    • simple image load (e.g. imread or cvLoadImage)
    • drawing functions (e.g. fillPoly to draw your needle
    • seems like you can update images quickly using simple cvShowImage as this person did with a camera feed
    • an equation that converts your input intensity value to a set of points for fillPoly

    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:

    • left of center ==> 180 deg
    • right of center ==> 0 deg
    • image origin is top left
    • pixel order is [column, row] (i.e. [x, y])

    Configuration Variables:

    • min_v ==> the value to go on the left edge of the dial
    • max_v ==> the value to go on the right edge of the dial
    • arc_size ==> the number of degrees at the top of a circle that you want to use for your intensity range
    • radius ==> the distance from the top of your dial to the center of a virtual circle (larger radius ==> flatter dial)
    • top_padding ==> the distance from the top of the static image to the needle when pointing straight up
    • needle_l ==> the length of the needle / polygon you want drawn

    Input Variables:

    • needle_v ==> value for the needle to represent

    Output Variables:

    • needle_end ==> the outer point of the needle in terms of your image coordinates
    • needle_start ==> the inner point of the needle in terms of your image coordinates

    Calculation:

    for readability:

    left_a =  90 + (arc_size / 2)             (angle for min_v)
    right_a = 90 - (arc_size / 2)             (angle for max_v)
    value_range = (max_v - min_v)
    

    get the angle for the needle

    value_proportion = (needle_v - min_v) / value_range
    needle_a = left_a - (value_proportion * arc_size)
    

    get the virtual center of the circle (e.g. the center for the one in your example image would be outside the image)

    dial_origin = [int(image_width / 2) , top_padding + radius]
    

    get the needle start and end points

    needle_end[x] = dial_origin[x] - radius * cos(needle_a)
    needle_end[y] = dial_origin[y] - radius * sin(needle_a)
    needle_start[x] = dial_origin[x] - (radius - needle_l) * cos(needle_a)
    needle_start[y] = dial_origin[x] - (radius - needle_l) * sin(needle_a)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to develop an application with which my client will do visual design.
I have to develop a online product catalog which will eventually developed into a
i have to develop windows service which will copy files to different servers. So
I have to develop an android app for which I have to use camera
I have to develop plug-in module which will allow us to stream live video
We have to develop an Ecommerce site with 20+ pages of static content which
I have to develop a site which has to accomodate around 2000 users a
I have to develop a Java ME (formerly known as J2ME) application that will
I will have to develop some android applications. Witch mobile phone is better for
Hi i have develop an android application in which i want to prevent user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.