Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright (c) 2017 by Dr. E. Horvath

Similar presentations


Presentation on theme: "Copyright (c) 2017 by Dr. E. Horvath"— Presentation transcript:

1 Copyright (c) 2017 by Dr. E. Horvath
Motion Tracking The motion package gives you the ability to view images taken by the Pi Camera through a web browser Menu -> Raspberry Pi Configuration Enable Raspberry Pi Camera Reboot Copyright (c) 2017 by Dr. E. Horvath

2 Install the motion package
sudo apt-get install motion Backup the configuration file: sudo cp /etc/motion/motion.conf /etc/motion/motion.conf.backup Edit the configuration file: sudo nano /etc/motion/motion.conf Copyright (c) 2017 by Dr. E. Horvath

3 Copyright (c) 2017 by Dr. E. Horvath
Enable motion Backup the motion file: sudo cp /etc/default/motion /etc/default/motion.backup Edit the configuration file: sudo nano /etc/default/motion # set to 'yes' to enable the motion daemon start_motion_daemon=yes Copyright (c) 2017 by Dr. E. Horvath

4 Copyright (c) 2017 by Dr. E. Horvath
Image File Location Change ownership of the /var/lib/motion sudo chown motion /var/lib/motion The image files will be stored in /var/lib/motion; you may need to delete the files, since overtime many images may accumulate. Copyright (c) 2017 by Dr. E. Horvath

5 Add the PiCamera Kernel Module
Backup the module file before adding the PiCamera module. sudo cp /etc/modules /etc/modules.backup Open up the modules file by entering the following line: bcm2835-v4l2. Copyright (c) 2017 by Dr. E. Horvath

6 Add the PiCamera Kernel Module
sudo nano /etc/modules # /etc/modules: kernel modules to load at boot time. # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored. i2c-dev bcm2835-v4l2 Copyright (c) 2017 by Dr. E. Horvath

7 Add the PiCamera Kernel Module
Ctrl+O to write out Press the Enter key Ctrl+X to exit sudo reboot Copyright (c) 2017 by Dr. E. Horvath

8 Add the PiCamera Kernel Module
Ctrl+O to write out Press the Enter key Ctrl+X to exit sudo reboot Copyright (c) 2017 by Dr. E. Horvath

9 Start the motion service
sudo service motion start Check these log files for possible error messages. tail -f /var/log/syslog dmesg | tail Copyright (c) 2017 by Dr. E. Horvath

10 Accessing the motion stream
You should now be able to access the Raspberry PiCamera stream by accessing port 8081. Use your IP address in place of localhost. Stop the service sudo service motion stop Copyright (c) 2017 by Dr. E. Horvath

11 Copyright (c) 2017 by Dr. E. Horvath
Deleting Files Change the directory to the location of the files cd /var/lib/motion Delete all of the graphic files sudo rm *.jpeg View and change the immutable attribute for the video files lsattr *.avi sudo chattr –i *.avi sudo rm*.avi Copyright (c) 2017 by Dr. E. Horvath


Download ppt "Copyright (c) 2017 by Dr. E. Horvath"

Similar presentations


Ads by Google