AI & Computer Vision

AI-Powered Camera Placement on 2D Floor Plans

An intelligent computer-vision application that accepts raw 2D architectural floor plans, automatically identifies rooms and corridors, enforces privacy restrictions, and computes optimal camera placement with Field-of-View (FOV) occlusion rendering.

Back to all Case Studies
AI & OCR Room Classification
FOV Occlusion Geometry
100% Privacy Zone Compliance
SVG & Excel Bill of Materials Export

Problem Statement & Objectives

Designing CCTV and surveillance coverage for complex corporate offices, hotels, and residential buildings has traditionally been a painstaking manual CAD exercise. Security integrators had to manually inspect 2D floor plans, identify room types, position cameras, calculate blind spots caused by interior partition walls, and avoid sensitive privacy areas (bathrooms, private bedrooms, changing rooms).

Challenge: Automatically ingest raw 2D floor plan images (PNG, JPG, SVG, PDF), segment structural wall contours, detect unlabeled spaces, filter out privacy zones, and calculate optimal camera positions with realistic beam spread angles.

System Architecture & Data Pipeline

KY Technologies designed a modern microservices architecture with a Next.js (React, Tailwind, TypeScript) frontend, a high-throughput Python (FastAPI) backend, and an intelligent computer-vision pipeline backed by OpenCV, Tesseract OCR, NumPy, and Gemini AI.

Smart Camera Planner Architecture Diagram
Figure 1: End-to-end System Architecture — from upload to AI/CV services and SVG overlay exports.

Multi-Stage AI & Computer Vision Pipeline

1. Image Preprocessing: Bilateral filtering, adaptive thresholding, and morphological opening remove raster scan artifacts and architectural blueprint noise.
2. Contour Extraction & Region Segmentation: OpenCV finds bounding polygons for distinct rooms, hallways, and open lobbies.
3. Space Classification & OCR: Tesseract OCR detects text labels (e.g. "Meeting Room", "Living Room", "Kitchen"). For unlabeled spaces, Gemini AI analyzes structural context to infer room purpose.
4. Privacy Zone Detection: Automated exclusion rules ensure zero camera placements in bathrooms, restrooms, walk-in closets, and private bedroom sanctuaries unless explicitly overridden.
5. Geometric Placement Engine: Calculates optimal wall mount or ceiling corners, choosing between Dome (wide 110° FOV) and Bullet (directional 70° FOV) cameras with collision ray-casting to clip sightlines at walls.
6. Interactive Drag & Drop: Security engineers can fine-tune camera angles, adjust focal lengths, and re-position cameras directly on an interactive canvas.
Smart Camera Planner Interactive Workspace
Figure 2: Interactive Smart Camera Planner dashboard with plan upload, live room counters, and canvas overlays.

Output Validation Across Real-World Floor Plans

The platform was tested against varied architectural layouts with diverse challenges:

Output 1: Multi-Station Corporate Office Space

In this open-plan corporate layout containing conference rooms, individual manager cabins, reception, and open workstation clusters, the system identified 9 optimal camera positions ensuring zero blind spots while avoiding redundant overlapping fields.

Office Space Before Camera Placement
Raw 2D Office Layout
Office Space With AI Camera Placement
AI-Placed Cameras & FOVs

Output 2: Multi-Room Residential Floor Plan

Demonstrates strict adherence to privacy rules: cameras cover the dining area, living room, and entry corridors, while the master bathroom and private washrooms are excluded automatically.

Residential Plan Before
Unprocessed Residential Plan
Residential Plan With Cameras
5 Cameras with Strict Privacy Masking

Output 3: Residential Floor Plan with Room Labels

Combining OCR and spatial heuristics to place cameras covering the main living area and balcony access while filtering out bedroom interiors.

Floor Plan with Labels Before
Labeled Floor Plan
Labeled Floor Plan Overlay
Calculated Camera Overlay

Key Business Outcomes

  • 90% Reduction in Estimation Time: Floor plan coverage diagrams that took hours in AutoCAD are now produced in under 15 seconds.
  • Automated Bill of Materials (BOM): One-click Excel export detailing camera models, mount heights, lens specifications, and cable lengths.
  • Audit Compliance: Guaranteed adherence to commercial privacy regulations by programmatically excluding sensitive zones.
Tech Specifications

Domain: Physical Security & Surveillance

Frontend: Next.js, React, Tailwind CSS, TypeScript

Backend: Python 3.11, FastAPI

AI & CV Stack: OpenCV, Tesseract OCR, NumPy, Gemini AI

Database: MongoDB (Plan Archives & Metadata)

Exports: SVG Overlays, XLSX Bill of Materials

Core Algorithms:
  • Ray-casting occlusion geometry
  • Bilateral contour segmentation
  • Contextual space inferencing
  • Optimal vertex corner matching
Explore Custom AI Solutions

Looking to apply Computer Vision and Generative AI to your industry workflows?

Consult Our AI Team