Message Boards Message Boards


ImageProcessing with your Raspberry Pi

Posted 7 years ago
3 Replies
3 Total Likes
This is a very simple example of how you can do basic image processing on a Raspberry Pi. The following takes
two pictures using the Raspberry Pi camera, and takes them about 1 second apart:

image1 = DeviceRead["RaspiCam"];
image2 = DeviceRead["RaspiCam"];

Next you can display the individual images. In my case I took a picture of the ceiling and windows of my office first and then without moving the camera I hovered my hand in front of the camera for the second picture:

{ image1, image2 }

Next I use the ImageDifference function to subtract the second image from the first one. This causes most of the image to become black, since most of the two images are the same. The only difference is the part where my hand appeared since this is different between the images:

image3 = ImageDifference[image1,image2]

3 Replies
DeviceRead["RaspiCam"] is hanging in the current release (in NOOBS / Raspbian)
It looks like raspistill no longer works with '-t 0' (a zero millisecond delay). I made a patched file here (using a 1 millisecond delay):

You can download that file and use it to replace RaspiCam.m in:

I get an error Import::fmterr : Cannot iport data as JPEG format - regardless of delay setting under Raspbian
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract