loading
 
Detecting room light level
Dr. Bruce from United States  [5 posts]
9 years
Is there a way to measure / report the light level in the room using RR?  I'd like my robot to know when it's getting dark enough to turn on the lights.

Dr. Bruce.
Anonymous 9 years
In theory yes, but you'd have to ensure that the camera is set to NOT auto adjust for different lighting levels. At that point it can be used as a basic light sensor by reading the average RGB value (from the color statistics module).

If you leave the camera to autoadjust you'd need to know what those values are in order to offset your absolute lighting value correctly. This currently can't be done .. but there is a directX camera control module coming soon that will. For example, in a dark room the camera will autoadjust such that the average lighting value will be around 128 (half of 0 - 255). Same when the lights come on ... this is normally how cameras will adapt over a large range. What you'd need to know is what the absolute value is rather than the relative values to tell you night/day difference.

There still might be issues if the camera just happens to point to a very dark spot (i.e. shadow) whilst the rest of the scene might still be light. A wide angle lens would also reduce this issue.

STeven.
Dr. Bruce from United States  [5 posts] 9 years
I see what you mean about the autoadjust feature.  With autoadjust turned off, I can reliably see a difference in the histogram:luminance level as I turn a light on and off in the room.  But with the AA feature turned on, the camera adjusts the luminace to always keep it around 120.

It'd be nice to have a RR command to turn AA on or off.  It's also be nice to have a watch variable in the histogram module for peak luminance.

Dr. Bruce.
Billy from United States  [26 posts] 9 years
Is there a better way to do this?  I tried this.. and the color statistics module spikes the CPU pretty hard.. 100% on my 1.8Ghz Epia mobo..  
Anonymous 9 years
Billy,

We tried to grab the exposure value directly from the camera but alas directX does not provide for this in a reliable way.

So the next best thing is to speed up the color_stats module. We added in a Basic mode radio button that when selected will only calculate some of the stats. This should help to decrease your CPU requirements.

Please have a look at v1.8.23.33 and see if this helps your situation.

STeven.
Billy from United States  [26 posts] 8 years
Thanks for the effort, and thanks for new option in the color_stats module.

Thanks, Billy

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index