From 4feae472e96d7167d4723c5e2e2b1fffea9f4e82 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Fri, 23 Oct 2020 06:55:45 -0500 Subject: [PATCH] reformatting and fixing typos --- README.md | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d6af57b69..08dbd9499 100644 --- a/README.md +++ b/README.md @@ -279,29 +279,32 @@ Frigate can save video clips without any CPU overhead for encoding by simply cop Frigate attempts to detect your Coral device automatically. If you have multiple Coral devices or a version that is not detected automatically, you can specify using the `detectors` config option as shown in the example config. ## Masks and limiting detection to a certain area -If you are experancing high dectection frame rate due to unwanted movment suck as trees, bushes etc a mask will help in reducing the CPU load hence the masked ares will be ignored from motion. +Masks can be used to ignore motion and reduce your idle CPU load. If you have areas with regular motion such as timestamps or trees blowing in the wind, frigate will be constantly trying to determine if that motion is from a person or other object you are tracking. Those detections not only increase your average CPU usage, but also clog the pipeline for detecting objects elsewhere. If you are experiencing high values for `detection_fps` when no objects of interest are in the cameras, you should use masks to tell frigate to ignore movement from trees, bushes, timestamps, or any part of the image where detections should not be wasted looking for objects. + +The following types of masks are supported: +- `poly`: (Recommended) List of x,y points like zone configuration +- `base64`: Base64 encoded image file +- `image`: Path to an image file in the config directory + +`base64` and `image` masks must be the same aspect ratio and resolution as your camera. -Making a mask using an image The mask works by looking at the bottom center of any bounding box (first image, red dot below) and comparing that to your mask. If that red dot falls on an area of your mask that is black, the detection (and motion) will be ignored. The mask in the second image would limit detection on this camera to only objects that are in the front yard and not the street. -Making a mask using coordinate points (polygon) -Just like in the image examples above. Use a camera snapshot image with the same resolution as the camera feed. -Upload the image to https://www.image-map.net/ - select "shape" poly - start in the lowest left corner and place the first maker (point) and continue upwards and then to the right until the polygon shape covers the area that you want to mask out (ignore). When you are finished with the polygon click "Show me the code!" and copy all coordinates (point), ie. `"0,461,3,0,1919,0,1919,843,1699,492,1344,458,1346,336,973,317,869,375,866,432"` Adjust any -1 values to 0 and then add it all to the config indented under the camera//ffmpeg part of the configuration (see the example configuration for correct indentation and placement) +To create a poly mask: +1. Download a camera snapshot image with the same resolution as the camera feed (`//latest.jpg`). +1. Upload the image to https://www.image-map.net/ +1. Select "shape" poly - start in the lowest left corner and place the first marker (point) and continue upwards and then to the right until the polygon shape covers the area that you want to mask out (ignore). +1. When you are finished with the polygon click "Show me the code!" and copy all coordinates (point), ie. `"0,461,3,0,1919,0,1919,843,1699,492,1344,458,1346,336,973,317,869,375,866,432"` +1. Adjust any -1 values to 0 and then add it all to the configuration (see the example configuration for correct indentation and placement) + Example of a finished row corresponding to the below example image: `mask: 'poly,0,461,3,0,1919,0,1919,843,1699,492,1344,458,1346,336,973,317,869,375,866,432'` -The following types of masks are supported: -- `base64`: Base64 encoded image file -- `poly`: List of x,y points like zone configuration -- `image`: Path to an image file in the config directory - -`base64` and `image` masks must be the same aspect ratio and resolution as your camera. - ## Zones Zones allow you to define a specific area of the frame and apply additional filters for object types so you can determine whether or not an object is within a particular area. Zones cannot have the same name as a camera. If desired, a single zone can include multiple cameras if you have multiple cameras covering the same area. See the sample config for details on how to configure.