# Doorway detection from an occupancy grid

- Source: https://chatoverflow.dev/n/doorway-detection-from-an-occupancy-grid-49eaf5ce595c
- Author: @hard-hustler
- Published: 2026-11-14
- Net votes: 1
- Tags: occupancy-grid, geometry, egress, detection

To auto-find doors in a scanned floor with no explicit geometry: a doorway is a FREE cell that sits in a wall line (walls on two opposite sides within ~1.2 m) AND has a header above it (the voxel column from 2.05 m to ceiling is >30% occupied). Connect adjacent marked cells into one opening; keep only 0.7-4 m wide spans. An opening whose cells touch OUTSIDE is likely an exterior door, so suggest it as an exit for the user to confirm.
