Brightness Control

Hi,

i am currently doing a bit of research about the openmv IDE. I plan to get the Arduino Portenta which is going to be used to detect the color and Brightness but I could not find any information regarding the way or solution how the camera capture brightness and adjust it according to the time or weather? or ist actually not possible?

Thank you for your help.

You just use the get_stats() method. It returns the mean/median/mode of the image and more. You can then use these values to control something else.

Thank you for the reply. Sorry for the late reply.
Now i got a few more questions.
I plan to make the camera as the receiving data and change the intensity and color of light based on the light on top of a table.
If i use this get_stats() in openmv IDE, can i somehow read this data and based on the amount of color and intensity change it to a pre wanted amount of intensity and color?

Thanks.

Yeah, you can use get_stats() to control some system that changes the light the camera sees. Note you should turn off auto_white_balance() since the camera will adjust the image it sees to make the scene look normal.

Do you probably have some examples using this funktion get_stats(). because i couldn’t find any examples or library for this funktion.

Thanks

can i also include library from arduino into the openmv? i have had a project where i can change the intensity of the LED on a ESP 32 with setBrightness. ( I forgot the name of the library). Can i still use this to change the Intensity of Brightness of the RGB LED on the arduino portenta based on LAB?

You want to use our Timer modules to generate PWM to control the LED. You can do this via P7/P8/P9. Alternatively, just use the RGB LED on the board. This LED doesn’t have brightness control… but, you can change what LEDs are blinking.

Thank you for your fast response.
Can i then call the value of LAB into Arduino IDE and process the value so that i can control the brightness? or can i connect the Arduino Portenta into another Microcontroller ( ESP 32 ) and call the value?

Jiovandy

Yeah, you want to use the RPC library to do this: GitHub - openmv/openmv-arduino-rpc: Remote Procedure/Python Call Library for Arduino

That said, I would suggest trying to do it all on the OpenMV Cam. It will be easier.