Skip to content

sidstudio/RaspberryWebcamMotion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Raspberry Webcap Motion project

Software requirement:

  • Qt version > 5.3
  • opencv (in project uses version 2.4.9)

This is client/server app for capture video from webcam and detection motions on the image from webcam and recognition faces on image.

Server app using opencv for capture from webcam and motion detection on image. When we have detections on the image we recognition faces. If we find some one we send image for all conections client.

server and client using ssl certification for transmit data.

For generate certification you can use openssl:

openssl req -x509 -newkey rsa:1024 -keyout key.key -out key.pem -days 365 -nodes

the server app uses motions filter for skip small contours. You can change value for more sensitivity. Go to videocapture.h and change


/* the minimum area of the circuit for filtering small changes */
static constexpr double MIN_CONTOUR_AREA = 200.0;

in file videocapture.cpp in startCapture() you can see where using this MIN_CONTOUR_AREA:


 /* We go through all the found contours and filter excess */
for (int i=0; i < contours.size(); i++) {
    /* We calculate the area of the contour */
    double area = cv::contourArea(contours[i]);
    /* if the area is less than the minimum circuit then go to the next contour found*/
    if (area < MIN_CONTOUR_AREA) {
        continue;
    } 
    /* We define a rectangle which includes a circuit */
    cv::Rect rect = cv::boundingRect(contours[i]);
    isDetection = true;
}

If client have connection with server they can view image from webcam. For less traffic sent each FRAME_OFFSET frame in void VideoCapture::startCapture(). for default

int FRAME_OFFSET=3

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published