Uploaded by kumarvishantmkcoe

How to Pi and Ocv

advertisement
Make sure that your Raspberry Pi is running the latest version of Raspbian and that you have a
Raspberry Pi camera module connected to it.
Open a terminal window and enter the command "sudo raspi-config". This will open the Raspberry Pi
configuration tool.
In the configuration tool, navigate to "Interfacing Options" and select "Camera." Enable the camera
interface by answering "Yes" when prompted.
Exit the configuration tool and enter the command "sudo apt-get update" to update the package list.
Next, install the software required to control the camera by entering the command "sudo apt-get install
python-picamera python3-picamera".
Once the software is installed, you can use the "raspivid" command to capture video and display it on
the screen. For example, the command "raspivid -o video.h264 -t 10000" will capture 10 seconds of
video and save it to a file called "video.h264".
To view the live feed, you can use the "raspivid" command with the "--preview" option. For example,
"raspivid -o - -t 0 -hf -w 800 -h 400 -fps 24 | cvlc -vvv stream:///dev/stdin --sout
'#standard{access=http,mux=ts,dst=:8160}' :demux=h264" will start a stream on port 8160, which can
be accessed by any device connected to the same network as the Raspberry Pi.
Download