1
votes

I'm trying to open and capture a usb webcam with mathematica on raspberrypi 2. there are some command for example "CurrentImage","ImageCapture",... but no one worked on it.just a serial picamera was work. do you have any idea ????

1

1 Answers

1
votes

A Mathematica function

DeviceRead["RaspiCam"]

returns an image with default camera settings.

A more powerful and versatile way is to reach out to the RPi's function raspistill:

image = Import[ "!raspistill -n -w 600 -h 400 -t 120 -o -", "JPG"];

This form gives you access to the cam's exposure options, descriptions of which can be found from the RPi in Terminal with

raspistill -?

The best source of support is, I think, the Raspberry Pi group on Wolfram Community.