8 #include <opencv2/core/utility.hpp> 9 #include "opencv2/objdetect/objdetect.hpp" 10 #include <opencv2/tracking.hpp> 11 #include <opencv2/videoio.hpp> 12 #include <opencv2/highgui.hpp> 13 #include <opencv2/imgcodecs.hpp> 14 #include "opencv2/face.hpp" 36 vector<vector<Point> >
cnts;
43 Mat ProcessContours(Mat camerafeed);
60 int loadcascade(String cascadename);
61 int detect(Mat ReferenceFrame,
double scale_factor,
int neighbours,clock_t startTime);
74 Scalar color = Scalar(255, 0, 0);
76 Ptr<LBPHFaceRecognizer> recogniser = LBPHFaceRecognizer::create(1,8,8,8,123);
77 double confidence = 0.0;
92 double secondsPassed = 0.0;
95 int face(Mat ReferenceFrame, clock_t startTime);
96 int QRUnlock(Mat frame, clock_t startTime);
97 int QRLock(Mat frame);
98 int Deactivate(Mat frame);
122 int opencam(
int camport);
Mat scaled_avg
8-bit Absolute value frame
Definition: guardmypi.h:35
Mat grayscale
Grayscaled version of the camera frame.
Definition: guardmypi.h:33
Analyses video feed by using background subtraction with a running average to detect motion changes...
Definition: guardmypi.h:30
QRCodeDetector qrDecoder
Instance of the QR Code detection object.
Definition: guardmypi.h:79
VideoCapture video
Video input capture object.
Definition: guardmypi.h:112
Mat rectifiedImage
Holds the rectified QR Code and position of the QR Code.
Definition: guardmypi.h:80
int pet_timerflag
Timer flag used solely for pet detection.
Definition: guardmypi.h:115
MotionDetector motiondetector
Instance of the Motion Detection.
Definition: guardmypi.h:107
Mat testframe
Empty testframe used to reset the running average frame for the Motion Detector.
Definition: guardmypi.h:111
Interfaces in the main program to open/close the camera and create new threads.
Definition: guardmypi.h:105
Mat frame
Frame that will be assigned to the incoming frames from the VideoCapture object.
Definition: guardmypi.h:110
clock_t recognise_startTime
With no pet detetected then a time stamp is taken before running the appropriate unlock method...
Definition: guardmypi.h:118
CascadeClassifier cascade
cascade classifier object
Definition: guardmypi.h:53
ObjectDetector petdetector
Instance of the object detector that will be accessing the ped detection method.
Definition: guardmypi.h:109
Point pt1
Start point/coordinate for the object rectangle.
Definition: guardmypi.h:55
Point pt2
End point/coordinate for the contour rectangle.
Definition: guardmypi.h:39
Contains various methods to unlock the system.
Definition: guardmypi.h:70
int recognise_timerflag
Human unlocking timer flag used in the unlock methods.
Definition: guardmypi.h:116
Mat GrayFrame
Various members to contain a grayscale, threshold, running average and difference frame...
Definition: guardmypi.h:72
int hour
Hour time in GMT.
Definition: guardmypi.h:113
Mat GrayFrame
grayscale frame for processing
Definition: guardmypi.h:54
Rect rect
Up-right rectangle to highlight detected contours.
Definition: guardmypi.h:37
vector< vector< Point > > cnts
Vector of points of detected contours.
Definition: guardmypi.h:36
clock_t pet_startTime
Used to capture a time stamp whenever motion is detected originally.
Definition: guardmypi.h:117
Point pt1
Start point/coordinate for the contour rectangle.
Definition: guardmypi.h:38
Mat avg
Running average of the camerafeed.
Definition: guardmypi.h:42
Unlock recognise
Instance of the unlock class with uses of facial recognition, QR Detection.
Definition: guardmypi.h:108
Mat frame_thresh
Threshold frame.
Definition: guardmypi.h:34
string name
Name of the recognised resident.
Definition: guardmypi.h:78
CascadeClassifier face_cascade
Instance of the HAAR classifier for facial detection.
Definition: guardmypi.h:75
Mat frame_diff
Difference output between frames.
Definition: guardmypi.h:32
Used to analyse incoming feed from the camera for different objects such as Pets etc...
Definition: guardmypi.h:51
Point pt2
End point/coordinate for the object rectangle.
Definition: guardmypi.h:56
CascadeClassifier hand_cascade
Instance of the HAAR cascade object.
Definition: guardmypi.h:73