2

I'm working on a project where I use a Pi + camera + sensors. I would like to use the picamera module and overlay a moving plot of the real-time sensor readings on the video output by using the picamera.add_overlay(sensor readings)....

Im thinking of using matplotlib to generate a cumulative readings.jpg file every second and then use that as the overlay. Would this method work ?

Stretch goal would be to output to a network stream but am not sure if picamera supports this level of overlay. Ive seen somewhere that it works only for preview - so am a bit confused.

Thanks!

1

I tried different approaches to do this but finally settled on using picamera's add_overlay function to overlay an "image" of a graph of the sensor readings. I believe you can use pygame to develop a more fully functional result but this worked for me.

In a nutshell, I generated saved the output of a matplotlib graph of the sensor readings to the same image file. I then use picamera's add_overlay and update overlay functions to update the image-graph.

I documented how to do this here with a link to code

https://medium.com/a-r-g-o/argo-nyc-big-apps-2015-7c565eec4c60

  • 1
    While technically an answer, link only answers are usually frowned upon in the stack exchange community. Links to your own site are seen as traffic fishing, and links in general are susceptible to link rot. Please do consider including the answer in your post. – Bex Jan 2 '16 at 14:02
  • ...and that link is gone.. :( – Edward Jan 4 at 14:28
  • @Edward I have updated the link. Thanks for flagging! – vr00n Feb 9 at 2:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.