Raspberry Pi Tutorial 12 - Take a Picture with Python

preview_player
Показать описание
How to take a picture using Python Programming language on your Raspberry Pi.

This video is part of a series of building a practically 'useful' security system using Raspberry Pi to catch the Cookie Thief. I am not a computer scientist, software engineer, programmer or electrical engineer. Everything I cover was self taught using resources I found on the web. I thought it would be great to put together a series of videos that consolidates what I have learned to yield a single resource to cover many interesting topics about the Raspberry Pi! Having said that, due to my relatively little experience, I may have made mistakes or could have done certain things better. If you are aware of such a mistake, please let me know either in the comments or through email!

Рекомендации по теме
Комментарии
Автор

thank you thank you thank you!!!! You just saved me. I have been having a problem with the camera for several hours. It turned out to be not closing it after using it. When I was trying to use it again in the loop, it was giving me error for the second time. I really appreciate this tutorial.

madry
Автор

hey can you tell me how to take image with hardware support i.e. push of button will capture the image? Also, how can we process the image in pi to compare or applying filters to it?

udaychhajed
Автор

thank you for your tuto, if i use a webcam other than that of raspberry pi, any tuto about that plz ?

mejdithabet
Автор

Is there a different python script to take pics using a usb web-cam?

jatinsoni
Автор

Thanks a lot dude...this video done a almost 90% part of my project.Thank you once again....

dhananjaynewaskar
Автор

Sir, does the same code hold good for a RaspberryPi camera Rev1.3 attached to cam0 port of Rpi Compute Module Development Kit 1 ?

I did try and got an attribute error for the line : with picamera.Picamera() as camera:
Error: module 'picamera' has no attribute 'Picamera'

Silent_Shishya
Автор

Hi, thanks for sharing.
I have two questions, where do you store the camera image? and why when I run the program, it seemed that I couldn't find my module PiCamera.

ffidham
Автор

hi I have connected a pi camera to store the images to storage account it is storing perfectly with one of my wifi and it is not storing with other wifi or mobile hotspot what would be the problem Please try to help.application and azure storage account I don't have problem. the problem is with raspberry Pi.

Techfacts_Vinod_Telugu
Автор

How take and save photo using crontab -e. Using only python or raspistill is ok. I don't know were is problem using only raspberry without monitor, does not save photos.

albertast.
Автор

i have problem when i run the code...the output is

About to take a picture..
Traceback (most recent call last):
File "/home/pi/picure.py", line 8, in <module>
with picamera.PiCamera() as camera :
File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 415, line 415, in __init__
self._init_camera(camera_num, stereo_mode, stereo_decimate)
File "/usr/lib/python2.7/dist-packages/picamera/camera/camera.py, line 444, in _init_camera
"Camera is not enable. try running 'sudo raspi-config' "
PiCameraError: Camera is not enable. Try running 'sudo raspi-config' and ensure that the camera has been enable.

what is problem??? can you help me?

dinyaaa
Автор

do you know a way to do this in windows ? Just asking

VodkaVivy
Автор

may I ask if you can show me how you got the colors in your terminal on pi3. mine won't save

KennethStokes
Автор

I'm getting an attribute error saying module picamera has no attribute I have to do?

hemanthkumar
Автор

Hii..
Can we Access any camera to raspberry pi which is not a picamera ??

Saikiran-tymo
Автор

hey dude, how we can take pictures that named time using pi camera

aayasmuhammed
Автор

Hello,
After doing these configurations, I've got a message error:

mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
Traceback (most recent call last):
File "Rpi_cam.py", line 5, in <module>
with picamera.PiCamera() as camera:
File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 431, in __init__
self._init_camera(camera_num, stereo_mode, stereo_decimate)
File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 460, in _init_camera
"Camera is not enabled. Try running 'sudo raspi-config' "
picamera.exc.PiCameraError: Camera is not enabled. Try running 'sudo raspi-config' and ensure that the camera has been enabled.
Any help would be appreciated !

oussamaaatiq
Автор

So i made the camera work and everything but the image i get is black. the camera does work and i did everything like you did, ...

jackpotx
Автор

Hi Alexander,
Is there such a thing as a desktop type version for Raspberry Pi, an interface that just has a button in the interface that you can press and it takes a pic or video? Something that you just download and install...?
Cheers,
Jeff

clickdrawing
Автор

hello, i have a problem. i work with opencv3 and python 2 and when i instaled opencv i had to make a virtualenv. the import picamera works fine on normal, but in order to vork with cv i have to make a command: workon cv to use open cv, but then the import picamera gives me an error:
Traceback (most recent call last):
File "t.py", line 3, in <module>
from picamera import PiCamera
ImportError: No module named picamera
how do i fix this problem?

jackpotx
Автор

if i want to screen record, which command shud i adjust?

nurasyiqinhamzah