a.stewart.au
Posts: 1
Joined: Mon Aug 15, 2016 5:40 am

Camera module raspistill not working!

Mon Aug 15, 2016 5:45 am

I am using a RPi with a camera module. I've installed a MATLAB support package onto it which allows the MATLAB on my PC to communicate with the RPi and take photos over the network.

I now want to be able to use commands on the RPi like 'raspistill' to take pictures, but I can't do this while it's in use by the MATLAB server! I am getting this error:

Code: Select all

pi@raspberrypi-mvHdY05c5o:~ $ sudo raspistill -o cam.jpg
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates
How can I free the camera from the MATLAB server so that I can use raspistill?

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Camera module raspistill not working!

Tue Aug 16, 2016 2:21 pm

What do you get from a vcgencmd get_camera command?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

boboyee2001
Posts: 1
Joined: Mon Aug 08, 2016 1:34 am

Re: Camera module raspistill not working!

Mon Aug 29, 2016 3:22 am

hello i am having the exact same problem
i used the vcgencmd get_camera and got
supported=1 detected=1

Dougie Lawson do you have any insight on this problem

mbelge
Posts: 3
Joined: Fri May 25, 2012 6:53 pm

Re: Camera module raspistill not working!

Fri Sep 02, 2016 2:54 pm

MATLAB server grabs the camera only when user creates a "cameraboard" object. So if you have a cameraboard object just clear it and MATLAB server will release the camera.

Example:

>> r = raspi;
>> cam = cameraboard(r);
>> img = snapshot(cam);
>> clear('cam')
>> system(r,'raspistill -o test.jpg')
>> getFile(r,'test.jpg')
>> image(imread('test.jpg'))

Return to “Troubleshooting”