An open API service indexing awesome lists of open source software.

https://github.com/alfed2/motion-detect

Raspberry Pi motion detector
https://github.com/alfed2/motion-detect

h264-encoder mmal motion-detection raspberry-camera raspberry-pi raspberry-pi-camera raspberrypi

Last synced: 3 months ago
JSON representation

Raspberry Pi motion detector

Awesome Lists containing this project

README

          

Raspberry Pi motion detector

main example of working with MMAL -> https://github.com/tasanakorn/rpi-mmal-demo.git

Device:

  Raspberry Pi 2 Model B Rev 1.1

  Raspberry Pi Camera Module

  3,5” RPi LCD 480×320

FPS

  motion-h264-detect-opencv ~ max 4 FPS

  motion-h264-detect-vector ~ max 29 FPS

  motion-final ~ 15 FPS

Examples ( directory - 'images' ) :

creates files in the directory(variable "DirSave"):

  *-f.jpg, *-f-small.jpg - first frame motion detect

  *-s.jpg, *-s-small.jpg - frame after ~ 1.5sec from the motion detect

  *.mp4 - Video

  \* - yyyymmdd_hhmmss



Start the alert in ~1.5 sec:

  running script(send.sh), parameter($1): "varable Dirsave"+20231009_142258-s.jpg

  running script(sendvideo.sh) after video file recording is complete, parameter($1): "varable Dirsave"+20231009_142258.mp4

Build
-----
0. Install pre-required packages

libopencv-dev ffmpeg ffmpeg-devel

1. Place Raspberry Pi userland project in /home/pi/src/raspberrypi/userland

$ mkdir -p /home/pi/src/raspberrypi

$ cd /home/pi/src/raspberrypi

$ git clone --depth 1 https://github.com/raspberrypi/userland.git

2. Build pre-required libraries

$ make -C /opt/vc/src/hello_pi/libs/vgfont

3. Build project

$ mkdir build

$ cd build

$ cmake ../

$ make