---
title: Motion Detection types (Frame based vs Experimental)
slug: motion-detection-types-frame-based-vs-experimental
docTags: 
createdAt: 2025-06-17T17:18:59.120Z
---

## Overview

Bluecherry provides three motion detection algorithms to suit different surveillance environments and requirements. Each algorithm offers different levels of accuracy, CPU usage, and configuration options.

## Motion Detection Algorithms

### 🟢 DEFAULT (Original Motion Detection)

**Best for:** Simple, stable environments with consistent lighting and limited CPU resources.

**Characteristics:**

- Fast and lightweight processing
- Lower CPU usage
- Immediate motion response
- No configurable sliders (uses default settings)
- Ideal for basic surveillance with just a few cameras

**How it works:** Uses a single reference frame that slowly adapts to scene changes, comparing each new frame against this background reference.

### 🔵 EXPERIMENTAL (Basic Motion Detection)

**Best for:** Simple, stable environments with consistent lighting when you need quick response to movement.

**Characteristics:**

- Compares each video frame against two reference frames
- One reference updates quickly, the other more slowly
- Triggers motion when changes exceed defined thresholds
- Lower CPU usage than advanced mode
- Immediate motion response

**Available Controls:**

- Frame downscale factor
- Min. motion area %
- Max. motion area %

### 🟡 FRAME BASED (Advanced Motion Detection)

**Best for:** Environments with changing lighting, background motion (trees, shadows, bugs), or when motion detection accuracy is critical.

**Characteristics:**

- Uses sophisticated temporal analysis across multiple frames
- Continuously updated reference frame with motion event history
- Higher accuracy with fewer false positives
- Adapts better to dynamic environments
- Requires more CPU and memory, but suitable for any modern PC

**Available Controls:**

- All sliders enabled
- Temporal frame buffer analysis
- Reference frame blending

## Configuration Parameters

### Frame Downscale Factor

**Purpose:** Reduces frame resolution before motion analysis to improve performance.

**Options:** 0.125, 0.25, 0.5, 1.0

**How it works:** A value of 0.5 means the frame is scaled down to 50% of original size before processing.

**Impact:**

- **Lower values (0.125-0.25):** Faster processing, less detail, suitable for high-resolution cameras
- **Higher values (0.5-1.0):** More detail, slower processing, better for low-resolution cameras

**Recommendation:** Start with 0.5 for most cameras. Use 0.25 for 4K cameras or systems with limited CPU.

### Miniminal Motion Area %

**Purpose:** Sets the minimum percentage of the frame that must show motion to trigger detection.

**Range:** 1-100%

**How it works:** The system calculates what percentage of the total frame area contains motion. Only triggers if motion covers at least this percentage.

**Practical Examples:**

- **1-5%:** Detects small objects (people, animals) moving in the distance
- **5-15%:** Good for detecting people walking through the frame (recommended starting point)
- **15-30%:** Detects larger movements, reduces false positives from small changes
- **30%+:** Only triggers on large objects or multiple people

**Recommendation:** Start with 5-15% for most surveillance scenarios.

### Maximum Motion Area %

**Purpose:** Sets the maximum percentage of frame motion before ignoring it as “too much motion.”

**Range:** 1-100%

**How it works:** If motion covers more than this percentage, it’s considered noise (camera shake, lighting changes) and ignored.

**Practical Examples:**

- **50-70%:** Allows moderate motion before ignoring
- **70-90%:** Good for stable cameras with occasional large movements
- **90%+:** Very permissive, only ignores extreme motion

**Recommendation:** Set to 70-90% for most applications.

### Miniminal Motion Frames (FRAME BASED only)

**Purpose:** Sets how many consecutive frames must show motion before triggering an event.

**Range:** 1-255

**How it works:** Uses a temporal buffer to track motion across multiple frames. Only triggers when motion is detected in at least this many frames within the buffer.

**Impact:**

- **Lower values (1-5):** Fast response, more false positives
- **Higher values (10-20):** More stable detection, fewer false positives

**Recommendation:** Start with 10-15 frames for most environments.

### Maximum Motion Frames (FRAME BASED only)

**Purpose:** Sets the size of the frame buffer used for temporal analysis.

**Range:** 1-255

**How it works:** This is the “ring buffer” size that stores the motion history of recent frames for temporal analysis.

**Impact:**

- **Smaller buffer (10-20):** Faster response, less temporal context
- **Larger buffer (20-50):** Better temporal analysis, more memory usage

**Recommendation:** Set to 20-30 frames for most applications.

### Reference Frame Blending Ratio (FRAME BASED only)

**Purpose:** Controls how quickly the reference frame adapts to changes in the scene.

**Range:** 2-100

**How it works:** The reference frame is continuously updated by blending new frames with the existing reference. This ratio determines the blend percentage.

**Impact:**

- **Lower values (2-20):** Slow adaptation, better for stable environments
- **Higher values (20-50):** Fast adaptation, better for dynamic environments

**Recommendation:** Start with 10-20 for most environments.

## Motion Sensitivity Grid

The motion sensitivity grid provides preset sensitivity levels that affect the motion detection thresholds:

- **Off:** Motion detection disabled
- **Minimal:** Only detects large, significant movements
- **Low:** Detects moderate to large movements
- **Average:** Balanced sensitivity for most scenarios (recommended starting point)
- **High:** Detects smaller movements and subtle changes
- **Very High:** Maximum sensitivity, detects even very small movements

**Note:** These sensitivity levels are about **motion detection threshold sensitivity**, not object size. High sensitivity detects smaller movements, while low sensitivity only detects larger movements.

## Configuration Recommendations

### For Indoor Surveillance

- **Algorithm:** BASIC or FRAME BASED
- **Min. Motion Area:** 5-10%
- **Max. Motion Area:** 70-80%
- **Frame Downscale:** 0.5
- **Sensitivity:** Average to High

### For Outdoor Surveillance

- **Algorithm:** FRAME BASED
- **Min. Motion Area:** 10-20%
- **Max. Motion Area:** 80-90%
- **Frame Downscale:** 0.25-0.5
- **Min. Motion Frames:** 15-20
- **Sensitivity:** Low to Average

### For High-Traffic Areas

- **Algorithm:** FRAME BASED
- **Min. Motion Area:** 15-25%
- **Max. Motion Area:** 85-95%
- **Min. Motion Frames:** 20-25
- **Sensitivity:** Low

### For Low-Light Environments

- **Algorithm:** FRAME BASED
- **Min. Motion Area:** 8-15%
- **Max. Motion Area:** 75-85%
- **Reference Frame Blending:** 15-25
- **Sensitivity:** Average

## Troubleshooting

### Too Many False Positives

- Increase Min. Motion Area %
- Increase Min. Motion Frames (FRAME BASED)
- Lower sensitivity level
- Increase Max. Motion Area %

### Missing Important Events

- Decrease Min. Motion Area %
- Decrease Min. Motion Frames (FRAME BASED)
- Increase sensitivity level
- Switch to FRAME BASED algorithm

### High CPU Usage

- Decrease Frame Downscale Factor
- Switch to CV\_BASIC algorithm
- Reduce Max. Motion Frames (FRAME BASED)

### Poor Performance in Changing Lighting

- Switch to FRAME BASED algorithm
- Adjust Reference Frame Blending Ratio
- Increase Min. Motion Frames

## Debug Features

### Enable Debugging Snapshots

When enabled, the system saves motion detection debug images to help troubleshoot configuration issues. These images show:

- Motion detection areas
- Reference frame comparisons
- Threshold analysis

**Location:** Debug images are typically saved to /tmp/ or the system’s temporary directory.

## Best Practices

1. **Start with defaults** and adjust based on your specific environment
2. **Test thoroughly** in your actual surveillance environment
3. **Monitor CPU usage** and adjust Frame Downscale Factor if needed
4. **Use FRAME BASED&#x20;**&#x66;or environments with changing lighting or background motion
5. **Enable debug snapshots** temporarily when fine-tuning settings
6. **Consider camera placement** - avoid pointing at moving objects like trees or flags
7. **Regular maintenance** - review and adjust settings as environmental conditions change

