Message Boards Message Boards

GROUPS:

Snapping pictures with the Wolfram Language on the Raspberry Pi

Posted 5 years ago
84231 Views
|
22 Replies
|
20 Total Likes
|
This post shows how to use the standard Raspberry Pi camera with the Wolfram Language on a Raspberry Pi.

To recreate this experiment you will need the following hardware (in addition to the Raspberry Pi itself):

First configure your Raspberry Pi Camera Board following the instructions from the Raspberry Pi Camera web page.

From the desktop double click the 'Mathematica' icon or type 'mathematica' in a terminal to launch the notebook interface.

To take pictures, simply run the DeviceRead command:

DeviceRead["RaspiCam"]


22 Replies

The recent release of Data Drop has added new ways to interact with the camera module. Here is how to make a time lapse.

DatabinAdd Snaphot

I'm trying this from the command line because I'm running my Pi headless. I've ssh'ed into it from my Mac and I'm running wolfram in a terminal. When I try 'DeviceRead["RaspiCam"], I get the following:

mmal: Function not implemented mmal: Function not implemented mmal: Function not implemented mmal: Could not set stereo mode : error 3 mmal: main: Failed to create camera component mmal: Failed to run camera app. Please check for firmware updates

Empty input file

Import::fmterr: Cannot import data as JPEG format.

Out[4]= $Failed

I've used python scripts that have streamed the camera to a web browser, so I know it works. Any ideas?

Hi Rod, I was wondering if you could give me a little bit more info about the issue you're having. I'm trying to replicate it so I can help you figure out what is going on.

  1. Which model Raspberry Pi are you using?
  2. What kernel are you running?
  3. You mentioned being able to use a Python script to use the camera successfully. Does the raspistill command work as well?
  4. Can you use your Python script successfully, then immediately get an error from Mathematica (ie, no rebooting or anything in between)?
  5. Are you using any GPIO devices on your Pi at the same time as your camera?

Thanks, Brett

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract