4
$\begingroup$

I'm trying to set up a raspberry pi as a webcam server and I need to import images into a Mathematica notebook on the raspberry pi. I tried using CurrentImage[] just to test it but I got an error just saying $Failed in Mathematica, and in my terminal it said

Not a JPEG file: starts with 0x6d 0x6d

Not a JPEG file: starts with 0x6d 0x6d

Not a JPEG file: starts with 0x6d 0x6d

Not a JPEG file: starts with 0x6d 0x6d

So then I rand $ImagingDevices in Mathematica and it said (Raspicam), then I tried

DeviceOpen["Raspicam"]

but it said

DeviceOpen::noclass: A driver for Raspicam was not found on your

local computer. Please add the driver directory to $Path or load it with Get.

But I'm not sure if that's necessary just yet. A few other things I tried didn't work, like ImageCapture[] and various permutations of DeviceRead but without being able to use DeviceOpen that won't work.

I think part of the problem might be that I'm using just a basic usb webcam and not the raspberry pi camera module so maybe Mathematica doesn't recognise it but I can capture images using the command fswebcam in my terminal on the raspberry pi so I think there's enough power to the device.

$\endgroup$
  • $\begingroup$ I met the same problem on my project, watching for answers. $\endgroup$ – Feng Zhou Apr 9 '18 at 13:02

Your Answer

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

Browse other questions tagged or ask your own question.