This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nicholas Cerminara was here. But how!? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd | |
mkdir opencv | |
cd opencv | |
mkdir src | |
nano motion.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd | |
cd opencv | |
nano CMakeLists.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./bin/motion & (it could be possible this throws warning: VIDIOC_QUERYMENU: Invalid argument, but that's nothing serious) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nano upload.sh (paste the rsync commando, save and close) | |
chmod +x upload.sh (makes it executable) | |
crontab -e | |
*/5 * * * * /home/pi/opencv/upload.sh (add this line below) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <opencv2/opencv.hpp> | |
#include <iostream> | |
#include <time.h> | |
#include <dirent.h> | |
#include <sstream> | |
#include <dirent.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.4) | |
PROJECT(MOTION_DETECTION) | |
# paths | |
INCLUDE_DIRECTORIES(src) | |
INCLUDE_DIRECTORIES(/usr/local/include) | |
LINK_DIRECTORIES(/usr/local/lib) | |
LINK_DIRECTORIES(/usr/lib) | |
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin) | |
SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#remove all files older than 1 days | |
date +%H:%M:%S >> /home/pi/opencv/log_upload | |
echo "removed all files, older than 1days" >> /home/pi/opencv/log_upload | |
find /home/pi/opencv/pics/* -exec sudo rm -rf {} \; >> /home/pi/opencv/log_upload | |
printf "\n\n" >> /home/pi/opencv/log_upload |
OlderNewer