-
Notifications
You must be signed in to change notification settings - Fork 22
Use raspberry pi camera module with OpenCV
mktk1117 edited this page Aug 2, 2016
·
3 revisions
To know how to connect, please follow this page
First, login to the raspberry pi with -X
option.
$ ssh -Y raspberry
raspberry is the name set in ~/.ssh/config
Then, make a python script.
from picamera import PiCamera
from time import sleep
camera = PiCamera()
camera.start_preview(alpha=200)
sleep(5)
camera.capture('image.jpg')
camera.stop_preview()
Run the script. An image file image.jpg
should be made.
First, install xli
pi@raspberry$ sudo apt-get install xli
Then, see it by doing
xli image.jpg
First install required packages
$ sudo apt-get install ros-indigo-image-transport ros-indigo-image-transport-plugins ros-indigo-image-transport-plugins ros-indigo-camera-info-manager
Then, clone the repository, and build it.
$ cd ~/catkin_ws/src
$ git clone https://github.com/fpasteau/raspicam_node.git
$ cd ~/catkin_ws
$ catkin_make
Since I installed OpenCV 3.1.0, raspicam_cv did not work. So, used raspicam instead.