
Back
Computer Vision
Automating Built-Up Area Measurement From Floor Plan Images
A vision-model-assisted pipeline that annotates a floor plan's exterior boundary and calculates area deterministically - removing the manual ruler-and-scale measurement step entirely.
August 21, 2026
Share
ENGAGEMENT SNAPSHOT

Figure 1 - Key figures from this engagement, at a glance.
EXECUTIVE SUMMARY
Our client needed the built-up area of a floor plan measured accurately and consistently, but floor plans arrive as PNGs, JPEGs, and PDFs drawn in wildly different styles, line weights, and scan qualities - manual ruler-and-scale measurement doesn't scale evenly across that variety, and neither does a purely rule-based edge detector.
Pfactorial Technologies built the Floor Plan Area Prediction Tool: a four-stage pipeline that normalizes any uploaded file to an image, enhances it for clean boundary recognition, applies a vision model to annotate the exterior wall line, and measures the enclosed area deterministically with OpenCV before converting it into square feet.
The design deliberately splits the two jobs the task actually requires: a vision model for perception - finding the boundary across wildly different drafting styles - and classical computer vision for measurement, keeping the numerically critical area calculation fully deterministic and auditable rather than trusting a language model with the arithmetic.
Why this engagement is representative This engagement demonstrates Pfactorial's approach to applied computer vision: using a vision model only for the part of the task that genuinely needs pattern recognition - boundary identification - while keeping the numerically critical measurement step fully deterministic and auditable.
THE CHALLENGE
Manual area estimation and naive automated approaches both broke down against the real variety of floor plans clients actually submit.
1. Floor plans vary wildly in drafting style and quality
Line weight, scan quality, furniture symbols, and annotation clutter differ from plan to plan and tool to tool, which makes purely rule-based edge detection unreliable across a general client base without per-plan tuning.
2. The numeric measurement step can't be left to guesswork
Area is a number a client will act on directly - it needs to come from a deterministic, auditable calculation rather than a model's best estimate of what the boundary probably encloses.
3. Most uploads aren't clean vector data
The majority of real client uploads are raster scans, flattened exports, or photographs rather than true vector PDFs, ruling out an approach that only works when the original vector geometry is available.
4. Internal walls and clutter must be excluded, not just detected
The system needs to isolate the outermost exterior boundary specifically, ignoring internal partitions, furniture symbols, and dimension annotations that a general-purpose detector would otherwise pick up.
The real brief Not "detect edges in an image" but "return a built-up area figure the client can use directly, regardless of the floor plan's original drafting style or file quality."
THE SOLUTION
Pfactorial built the tool as a four-stage pipeline, deliberately separating perception (finding the boundary) from measurement (calculating its area) rather than asking one model to do both.

Figure 1 - End-to-end pipeline: file ingestion, preprocessing, vision-model boundary annotation, and OpenCV area calculation.
Architectural principles
- Perception and measurement, solved separately - a vision model identifies and annotates the exterior boundary, while OpenCV performs the actual area calculation - keeping the numerically critical step fully deterministic while still benefiting from a modern vision model's pattern-recognition strength.
- Prompt-guided inference, not fine-tuning - a pretrained, general-purpose vision model is steered entirely through a custom, purpose-built prompt rather than trained from scratch, keeping the pipeline lightweight to operate and easy to point at newer vision models as they become available.
- Normalize every input to one format before analysis - PDF uploads are converted to images and PNG/JPEG uploads pass through directly, so every later stage only ever handles one kind of input regardless of the original file type.
- Calibrate once, reuse consistently - the pixel-to-square-foot scaling factor is calibrated once against a reference floor plan with a known real-world area, then applied consistently to every further floor plan processed at that same source scale.
CAPABILITIES DELIVERED
The tool covers the full path from a raw floor plan upload to a client-usable area figure.
CAPABILITY | WHAT IT DOES |
|---|---|
Multi-Format Ingestion | Accepts PNG, JPEG, and PDF uploads, converting PDF pages to images automatically as the first pipeline step. |
Image Enhancement | High-contrast conversion, line thickening, and edge sharpening recover boundary clarity from scans, screenshots, and exports alike. |
Vision-Guided Boundary Annotation | A custom prompt constrains a pretrained vision model to mark only the exterior wall line, excluding internal partitions and furniture. |
Deterministic Area Calculation | OpenCV measures the pixel area enclosed by the annotated boundary and converts it to square feet via a calibrated scaling factor. |
Backend Service with Review UI | Exposed as a Django REST Framework or FastAPI backend service with a React front end for upload and result review. |
Portfolio-Scale Processing | Supports batch processing of floor plans across a property portfolio to populate area fields consistently. |

Figure 2 - Where a calculated area plugs in, across real estate listings, leasing, and architectural workflows.
Design note The current pipeline is validated for line-based architectural floor plans; non-linear or logarithmic scale calibration is outside current scope, and the scale factor requires recalibration only when source floor plans are drawn at a materially different scale or resolution.
ENGINEERING FOR SCALE AND RELIABILITY
Several engineering decisions distinguish a pipeline that generalizes across real client uploads from one tuned to a single clean demo plan.
Model choice was evaluated, not assumed
the vision-model stage was evaluated using both Gemini 2.0 Flash and OpenAI vision models before settling on the current annotation approach, rather than committing to a single provider up front.
The annotation prompt was iterated for a single job
the prompt explicitly instructs the vision model to ignore internal walls, furniture icons, and dimension text, and to return a single continuous marked border rather than a text description - the specific constraint that lets OpenCV treat the output as a clean, closed contour.
Alternatives were tested against real floor plans, not assumed inferior
rule-based Canny edge detection worked on clean, high-contrast drawings but broke on lower-quality scans; vector/OCR extraction from PDFs worked only when true vector data existed, which most client uploads don't have.
Preprocessing does the heavy lifting before detection runs
contrast enhancement, line thickening, and edge sharpening are combined into a single processed image specifically to recover boundary clarity from imperfect source images ahead of vision-model annotation.
Calibration is scoped and explicit, not hidden
the scale_factor is documented as the one value that needs recalibration, and only when floor plans are drawn at a materially different scale - the detection and contour-extraction logic itself is unchanged.
Explicitly scoped to what's been validated
the tool is validated for line-drawn architectural floor plans with linear scale calibration; non-linear axes and other layout types are documented as outside current scope rather than silently unsupported.
DELIVERY APPROACH
The engagement moved from evaluating detection strategies to a validated, deterministic measurement pipeline in four phases.
1. Evaluate boundary-detection approaches - tested rule-based Canny edge detection and vector/OCR PDF extraction against a representative set of floor plans before selecting a vision-model-assisted approach.
2. Build ingestion and preprocessing - implemented multi-format file ingestion (PDF, PNG, JPEG) with contrast enhancement, line thickening, and edge sharpening ahead of detection.
3. Integrate vision-model annotation - iterated a custom prompt to constrain a pretrained vision model to the exterior boundary only, evaluated against Gemini 2.0 Flash and OpenAI vision models.
4. Build deterministic area calculation - implemented OpenCV-based contour extraction and pixel-to-square-foot conversion, calibrated once against a reference floor plan of known area.
RESULTS AND IMPACT

Figure - Key outcomes from this engagement.
On its validated sample - a two-bedroom residential floor plan - the pipeline calculated an area of 1,980.9034 square feet from the vision-model-annotated exterior boundary, with the re-plotted contour matching the original drawing's outer wall line.
The output format is consistent regardless of the source floor plan's original drafting tool or styling, so real estate listings, leasing workflows, and portfolio-wide batch processing can all consume the same standardized area figure without a bespoke measurement process per source.
What it enabled commercially
By replacing manual ruler-and-scale measurement with a deterministic, auditable calculation, the client's teams can generate a standardized area figure for a listing, lease, or portfolio batch without a person manually measuring each floor plan by hand.
WHY PFACTORIAL
This engagement draws on Pfactorial's AI product engineering capability: using a vision model only for the part of a task that genuinely benefits from pattern recognition, while keeping numerically critical steps deterministic and auditable rather than left to a model's best guess.

Figure - Service lines this engagement draws on.
Engagement enquiries Pfactorial Technologies works with real estate, leasing, and architecture teams looking to standardize area measurement without over-building the solution. If you are weighing whether a measurement or extraction task is a good fit for computer vision, we are happy to give you an honest read on scope, cost, and risk before anyone commits to anything. · pfactorial.ai
APPENDIX A - TECHNOLOGY STACK
The technology stack underpinning the system, grouped by the layer it serves.

Result and Analysis
ENGAGEMENT SNAPSHOT
A vision-model-assisted pipeline that annotates a floor plan's exterior boundary and calculates area deterministically - removing the manual ruler-and-scale measurement step entirely.
CASE STUDIES
You might also like...

OCR & Document ExtractionAutomotive & Vehicle
Aug 21, 20267 min readRead

Computer VisionML Infra, Classifiers & RL
A Deep Learning Classifier That Separates True-Negative Mammograms from Genuine BIRADS 0 Cases
Aug 21, 20266 min readRead

Content & Media Generation
A Failover-Chained Text-to-Image Service Built on Three Stable Diffusion Models
Aug 21, 20267 min readRead

Analytics & BI DashboardsAutomotive & Vehicle
A Five-Capability Computer Vision Platform for Vehicle Identity, Traffic, and Parking Intelligence
Aug 21, 20267 min readRead

OCR & Document Extraction
A Hugging Face Inference-Backed Handwriting Transcription Tool for Single-Line Document Digitization
Aug 21, 20266 min readRead

A Shared-Model Architecture for Consistent AI Character Generation at Scale
Aug 21, 20268 min readRead





