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
- Host: GitHub
- URL: https://github.com/alfed2/motion-detect
- Owner: Alfed2
- Created: 2023-10-09T09:41:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-18T16:06:31.000Z (over 2 years ago)
- Last Synced: 2025-03-02T21:13:20.819Z (over 1 year ago)
- Topics: h264-encoder, mmal, motion-detection, raspberry-camera, raspberry-pi, raspberry-pi-camera, raspberrypi
- Language: C++
- Homepage:
- Size: 5.49 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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