Vehicle Filters

Overview

License plate filters act as quality gates that skip detections outside specified regions. Proper filtering improves both accuracy and performance by focusing processing on relevant areas and reducing unnecessary computation.

Why Use Filters?

Not every detected license plate should be processed:

  • Outside region of interest - Ignore vehicles in irrelevant areas

  • Background traffic - Focus on specific lanes or zones

  • Parking areas - Monitor specific parking spots only

Filters improve result quality and prevent wasted compute.

Zone Filter

Only processes license plates within a specified polygon region.

Configuration

# Define rectangular zone
zone = [
    [100, 100],   # Top-left corner (x, y)
    [500, 100],   # Top-right corner
    [500, 400],   # Bottom-right corner
    [100, 400]    # Bottom-left corner
]

config = degirum_vehicle.LicensePlateTrackerConfig(
    enable_zone_filter=True,
    zone=zone  # List of [x, y] coordinates (min 3 points)
)

Parameters

  • enable_zone_filter (bool) - Enable/disable the filter (default: False)

  • zone (list of [x, y]) - Polygon vertices defining the region of interest. Can be any polygon with 3 or more points (triangle, quadrilateral, pentagon, etc.), not limited to rectangles

How It Works

License plate center point must be inside the polygon zone. Plates outside are skipped.

When to Use

  • Focus on specific areas (specific lane, parking spots, entrance/exit)

  • Ignore vehicles outside region of interest

  • Reduce false positives from background traffic

Examples

Rectangular zone:

Arbitrary polygon:

Entire frame (no filtering):

Single lane monitoring:

Parking spot monitoring:

Entrance/exit gate:

Configuration Methods

Python Configuration

YAML Configuration

Load from YAML:

Performance Impact

Enabling zone filtering has minimal performance impact:

  • Computation: Simple point-in-polygon check per detection

  • Accuracy: Improves by focusing on relevant areas

  • Processing: Reduces OCR calls for out-of-zone plates

Recommendation: Always use zone filtering in production to focus on relevant areas and improve result quality.

Last updated

Was this helpful?