简体   繁体   中英

Raspberry pi:enable camera module

I have attached an usb camera with raspberry pi and also enable it using sudo raspi-config command . I rebooted the raspberry pi after enabling it, but it doesn't enable - so getting error ( error is..mmal: Camera is not detected. Please check carefully the camera module is installed correctly )

When run command ( raspistill -o image.jpg ) to capture an image, I have also run update and upgrade command to update raspberry pi but doesn't solve problem.

And main thing when I run ffnpng -i /dev/video video.avi , it records video so camera working so why this error coming? And what is the solution for that.

Is there any other way or command to cature image? plz help me. Thank u in advance.

Have you installed the fswebcam module? You can get it using:

sudo apt-get install fswebcam

Images are taken using the command fswebcam <image_name>.jpg

A full tutorial can be found here from raspberrypi.org.

It looks like the problem is the connection between camera module and Raspberry PI CSI interface. Check if the CSI cable is correctly connected to CSI interface on the Raspberry PI board or try to unplug camera cable and plug it again.

raspistillyuv and raspistill are official image capturing programs for the camera module: link

USB cameras are not mounted under mmal (Only CSI). Try running v4l2-ctl --list-devices to see if your camera is mounted correctly. You will see there is a /dev/videoX like string under your camera if it's mounted correctly. Use that X value to access the camera.

As an example, in OpenCV(Python) you can capture an image as bellow,

import cv2
cap = cv2.VideoCapture(X)
ret, frame = cap.read()
cv2.imwrite("image_name.jpg",frame)
cap.release()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM