Hi,
I have a team of students who would like to use the PiCamera as a luminosity sensor for Mission Space Lab. Does anyone have any resources on how to do this? (They're investigating light pollution.)
Thanks,
Gail
-
- Posts: 6
- Joined: Fri Jun 02, 2017 3:17 pm
Re: PiCamera as Luminosity Sensor?
I would be looking through here to get ideas
https://picamera.readthedocs.io/
Disable automatic adjusting parts (if possible)
Collect a reading, do some maths.
Collect another reading, do some maths.
Compare reading.
Deciding what to record is probably the hard part ?
IR only, Blue only etc ?
https://picamera.readthedocs.io/
Disable automatic adjusting parts (if possible)
Collect a reading, do some maths.
Collect another reading, do some maths.
Compare reading.
Deciding what to record is probably the hard part ?
IR only, Blue only etc ?
Last edited by bensimmo on Tue Dec 05, 2017 4:56 pm, edited 1 time in total.
-
- Posts: 6
- Joined: Fri Jun 02, 2017 3:17 pm
Re: PiCamera as Luminosity Sensor?
That's great, thanks!!!
Re: PiCamera as Luminosity Sensor?
Not sure exactly what you need but you get some ideas from my auto-guider python script. https://github.com/Gordon999/Pi-AutoGuider
Ignore the auto-guider parts, but is does allow you to set the pi camera and show a graph of luminance of a star, you can also filter as R, G, or B.
Maybe give you some ideas.
Ignore the auto-guider parts, but is does allow you to set the pi camera and show a graph of luminance of a star, you can also filter as R, G, or B.
Maybe give you some ideas.
- Davespice
- Forum Moderator
- Posts: 1665
- Joined: Fri Oct 14, 2011 8:06 pm
- Location: The Netherlands
- Contact: Twitter
Re: PiCamera as Luminosity Sensor?
If you're happy with decoding some binary you could take pictures in raw YUV format, where Y is luminance.
More info here (including how the binary data is represented): http://picamera.readthedocs.io/en/relea ... yuv-format
More info here (including how the binary data is represented): http://picamera.readthedocs.io/en/relea ... yuv-format
-
- Posts: 206
- Joined: Tue Nov 27, 2012 4:37 am
Re: PiCamera as Luminosity Sensor?
I'm running raspberries with the camera modules configured as network cameras suitable for motion detect (on remote machines) like this:
to evaluate the brightness remotely I simply issue:
this throws a single number dependent on the brightness detected. There are many more options supported by 'convert'.
<ip-address> is the ip address of the camera. You can do all locally on your raspberry as well of course.
Code: Select all
/usr/bin/mjpg_streamer -o output_http.so -w ./www -i input_raspicam.so -x 1920 -y 1440 -fps 3
Code: Select all
wget -q http://<ip-address>:8080/?action=snapshot -O - | convert - -colorspace Gray -format \"%[fx:quantumrange*image.mean]\" info:
<ip-address> is the ip address of the camera. You can do all locally on your raspberry as well of course.
-
- Posts: 6
- Joined: Fri Jun 02, 2017 3:17 pm
Re: PiCamera as Luminosity Sensor?
Thanks Davespice
!
Bensimmo kindly pointed me in this direction too. Funny thing is... when I went to tell the students about this, they had actually just found it, entirely on their own. (This kind of resourcefulness and independence makes teachers really, really happy
)

Bensimmo kindly pointed me in this direction too. Funny thing is... when I went to tell the students about this, they had actually just found it, entirely on their own. (This kind of resourcefulness and independence makes teachers really, really happy

Davespice wrote: ↑Wed Dec 06, 2017 8:43 amIf you're happy with decoding some binary you could take pictures in raw YUV format, where Y is luminance.
More info here (including how the binary data is represented): http://picamera.readthedocs.io/en/relea ... yuv-format
-
- Posts: 6
- Joined: Fri Jun 02, 2017 3:17 pm
Re: PiCamera as Luminosity Sensor?
Thanks for all of your replies 

PiCamera as Luminosity Sensor - Python Code Available?
Would love a post project report and to see luminosity sensor code.
I want to use PiCamera (v1.3) to measure room light level over 24hr periods - don't need calibrated value, just continuous values from darkness to brightly lit.
I want to use PiCamera (v1.3) to measure room light level over 24hr periods - don't need calibrated value, just continuous values from darkness to brightly lit.