How bright it is outside using a security camera image?

Has someone done this? Any ideas on how it might be possible? I was thinking about installing a light sensor outside but why do that when I should be able to pull an image from a security camera and figure it out :slight_smile:

I collected some links that I can research.

http://docs.opencv.org/3.1.0/d5/daf/tutorial_py_histogram_equalization.html

https://mail.python.org/pipermail/image-sig/2008-January/004761.html

http://pillow.readthedocs.io/en/3.1.x/reference/ImageEnhance.html

Or maybe with imagemagick…

http://www.imagemagick.org/discourse-server/viewtopic.php?t=11304

http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=11297

@bbrendon I think you will really struggle. The camera’s image will be nonlinear as it will automatically adjust the exposure. I see no way to calibrate the image’s brightness to actual brightness.

A simple light sensor may serve you better.

Have a look at this ÂŁ15 Wifi sensor: https://www.youtube.com/watch?v=jpjfVc-9IrQ&t=616s

1 Like

You can probably make one and get change from ÂŁ5

https://www.aliexpress.com/item/ESP8266-ESP12-ESP-12-WeMos-D1-Mini-WIFI-Dev-Kit-Development-Board-NodeMCU-Lua/32653918483.html ÂŁ2.60

https://www.aliexpress.com/item/1PCS-Optical-Sensitive-Resistance-Light-Detection-Photosensitive-Sensor-Module-for-Arduino-4pin-DIY-Kit/32723947241.html ÂŁ0.61

Old phone charger will power it but you will need a box of some sort, tho it would fit in a matchbox :smiley:

1 Like

Good point. It appears I can set the shutter, exposure, etc statically in the URL to work around these issues for the camera but that should also have an effect on the recording. Hmm.

If you are able to set the image parameters to be static then you would overcome some of the issues but not all of them. You may still struggle as the sensor temperature is not stabilized so will very it’s reported luminosity with temperature. I’ve worked with peltier cooled CCD photometers which overcome this issue by cooling the sensor to a constant temperature (around 5 degree Celsius) Essentially you are trying to create a photometer with a CCTV camera. When looking for more information I would suggest using the words like for photometer, which may help find more information.

I threw together a quick shell script using imagemagick and made a command line sensor to see what will happen. Here is what I have so far. It’s cloudy right now.

Okay, I’m going to skip on this. I’d basically have to waste an expensive security camera to do this.

It was a fun experiment and I learned a bit :slight_smile:

Thanks guys!