Find walls in a scan
backgroundDetect walls from a scanned floor plan by reading thick dark or gray bands, ignoring colored areas, and joining segments across doors or windows. Returns wall coordinates in cm.
Instructions
Walls detected in the scanned plan under the drawing (edit_background action=set puts it there): thick dark or gray bands across or down the image become walls, colored areas (lawn, plants, furniture) are ignored, and pieces split by doors or windows up to max_gap join; region limits the search. Returns rows [[x1,y1],[x2,y2],t] in plan cm without drawing; edit_background action=trace creates them. Check with render_plan bg=0.5.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| h | No | Wall height cm when creating (default 250) | |
| t_max | No | Thickest wall kept, cm (default 45) | |
| t_min | No | Thinnest wall kept, cm (default 5) | |
| region | No | Only this part of the plan `[x0, y0, x1, y1]` cm | |
| max_gap | No | Doors and windows up to this wide don't split a wall, cm (default 130) | |
| min_len | No | Shortest wall kept, cm (default 60) | |
| threshold | No | Luminance 0..255 below which a gray pixel is ink (default 128; raise it for light gray walls) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes |