Yawcam -> Motion detection -> Settings

Motion Detection settings

The Settings tab let you specify settings related to the motion detection. Here you decide and fine-tune how Yawcam will detect motion. (You find the settings of how to take action under the Actions tab.)

Setting up the motion detection usually takes some experimenting with the settings before you get it right for your conditions. It's a balance between detecting too few motion events and detecting too many false positive motion events. Sadly there are no magic settings that works for everyone. You will have to find out what works for your conditions.

Motion Detection in

Entire image - Select this option if you want the motion detection to take place over the entire image area.

Define area... - Click this button if you want to specify a smaller area of the image that Yawcam shall perform motion detection on. When the button is clicked a new dialog opens:

Define area dialog

Draw a red square with the mouse to define the area you want to detect motion in. Click OK. You will notice that the preview area to the left changes to show your newly defined area.

Detection algorithm

Frame by frame - This algorithm compares two following image frames separated by the time specified with the detection interval.
- Good at fast changes
- Works with noise filter

Frame by frame settings

Noise filter - Reduces the level of noise in the image. Good in low light conditions. A stronger filter uses more CPU.

Max filter - Motion events will not be triggered if the amount of motion is more than this percent. This is good to avoid a motion event when a change in light condition (or camera exposure) results in that almost all pixels in the image change at the same time.

Reference image - This algorithm builds up a reference image by blending some percent of a new image into the reference image. The motion detection is done by comparing the reference image by the current image. A good way to learn how the reference image work is to enable the option "Show reference image" for the preview image. This algorithm works best for most situations.
- Can detect slow changes
- Forgiving for constant moving sub areas (like branches in the wind or noise in the image due to low light conditions).

Reference image settings

Blending percentage - How much of the new image that should be blended into the reference image. A lower value will make it easier to detect slow changes since the reference image will become more stable. A higher value on the other hand will make the reference image to change more quickly. This means that a motion event will end much faster when the reference image has adapted to the change.
What value that is right for you depends on what kind of motion you want to detect. Start with the default value at 8% but adjusting the level down a step or two is usually better for most conditions.

Blending interval - How often the reference image should be blended with a new image. Also this value affects the stability of the reference image discussed above. Note that regardless of what value you enter here, the blending interval will never be smaller than the detection interval.

Max filter - Motion events will not be triggered if the amount of motion is more than this percent. This is good to avoid a motion event when a change in light condition (or camera exposure) results in that almost all pixels in the image change at the same time.

Detection interval - Specify how often Yawcam shall analyze the image to see if something has moved. Enter the interval in milliseconds in the text field. (1000 milliseconds is 1 second.) A low interval will dramatically increase the CPU load. Only use a low value if you feel that your computer is powerful enough.

Detection level

Below the preview area are two bars. The upper one represents the current motion detected. The lower one shows the tolerance of when actions shall be taken. Notice that the upper bar is green when it has a lower value than the tolerance and red when the motion is greater than the tolerance. These bars are a great help when you specify the detection level!

Sensitivity - This slider specifies how sensitive Yawcam are for changes in the image area. A higher percentage will mark more pixels as changed. (Notice how the first bar below the preview area gets higher values when the sensitivity is increased.)

Tolerance - This slider specifies how much motion in the image that is allowed before any action is taken. (Notice how the blue tolerance bar below the preview area changes according to the value of the slider.) A higher percentage will tolerate more changes in the image before actions are taken.

Auto level - When auto level is enabled the sensitivity is adjusted automatically. This is necessary for outdoor cameras where the light conditions change during the day (and night).
The auto level sets a fixed goal of how much noise/movement there should be in the image. It then adjusts the sensitivity to keep the detected level of noise/movement close to that goal.
You can specify the responsiveness and fine tune the auto level in the auto level settings dialog.

Auto level settings

Auto level goal - The goal for how much noise/movement you want in the image when there actually are no real movement in the image. Yawcam will adjust the sensitivity to reach this goal.
It's usually a good idea to keep the goal low. Especially if you are using a small image size or have enabled the noise filter. Note that you can specify a decimal value below 1.0 if you would like.

Goal padding - The sensitivity will not be adjusted if the current motion level is in between the auto level goal plus or minus the goal padding. This will make the sensitivity level a bit more stable and not flicker unnecessarily. If the current motion is above auto level goal plus goal padding, the sensitivity will be adjusted down. If the current motion is below auto level goal minus goal padding, the sensitivity will be adjusted up.

Tolerance margin - The margin for the amount of movement that is tolerated before a motion event is triggered. The total tolerance is the sum of the auto level goal plus the tolerance margin. If you set the auto level goal to 1.0 and the tolerance margin to 2.0, events will be triggered when the current motion is above 1.0+2.0 = 3%.
If you get a lot of false positive motion events you probably want to increase the tolerance margin a bit.

Level update interval - Decides how often Yawcam checks if the sensitivity value should be adjusted. The interval is specified in seconds.
Note that a small value here can prevent motion events to be triggered. When the interval is too small and real motion occurs in the image, Yawcam will adjust the sensitivity instead of trigger a motion event. That is not desired.

Warmup time - Specifies how long warmup time to use in seconds. During the warmup time Yawcam adjusts the sensitivity level to get a good starting point. When the warmup time is active you will see the red text "Calibrating..." below the preview area. You get a better result if there is not any movement in front of the camera during the warmup time.

Calculation points - The number of calculation points to use when deciding the sensitivity level. Yawcam decides how the sensitivity level will be adjusted based on the mean value of the X last image frames analyzed.
Example: If you set calculation points to 100 and have the detection interval set to 100 milliseconds, the decision will be based on the mean motion during the last 100x100 = 10000 ms = 10 seconds. With the level update interval set to 60 seconds this results in that Yawcam will adjust the sensitivity level every 60 seconds based on the mean motion during the last 10 seconds.

Preview Appearance

Mark color - The mark color shows the motion in the preview area. Click on the color to open a color chooser dialog to change the selected color.

Show image - Mark this checkbox if you want the image to be visible in the preview area. (Note that this uses some more CPU.)

Show reference image - Mark this checkbox if you want to see the reference image instead of the current image. This is a good option when you learn how the settings affect the reference image and how the motion detection works.


Invert... - Mark this checkbox if you want Yawcam to take action when the motion stops. Notice that the color of the motion bar below the preview area changes to be red if the value is lower than the tolerance and green if it has a higher value.