How to find brightness of given area

asked 2015-08-19 17:41:29 -0600

st5000 gravatar image

There are (combinations of) OpenCV functions/methods to find the difference between two frames of a video. After finding such areas I would then like to know the rate of change of brightness for those locations (between different frames). But I have yet to find an OpenCV function/method that given an area would return a value in proportion to the (average) brightness of that area. Did I miss something? Is there a set of OpenCV calls that might do this?

-thanks

edit retag flag offensive close merge delete

Comments

Will meanStdDev solve your problem?

unxnut gravatar imageunxnut ( 2015-08-19 19:41:49 -0600 )edit

Like @unxnut says, you basically want to see how the intensity values of your image change over time. I would look indeed at some statistical approaches like mean and standard deviation.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-08-20 02:49:52 -0600 )edit

OK, but I only want to look at a specific area in a frame of say 100dots.

st5000 gravatar imagest5000 ( 2015-08-26 20:59:35 -0600 )edit
1

And you can easily do that by specifying that area. For example, for your frame, you can do the operation on frame.operator()(rect) where rect is a rectangle defining your region of interest.

unxnut gravatar imageunxnut ( 2015-08-26 21:47:43 -0600 )edit