A web application that converts 2D floor plan images into interactive 3D models using classical computer vision algorithms and C programming.
- Upload floor plan images (PNG, JPG, PGM, PPM)
- Automatic wall, room, door, and window detection
- Generate 3D models with and without roofs
- Interactive 3D visualization with Three.js
- Sample floor plans for quick testing
- Georgia Tech themed interface
- Python 3.7+
- GCC compiler (for C code)
- Flask and Pillow
- Clone the repository:
git clone https://github.com/MengpingZhang/CS6010-Project-Group4.git
cd CS6010-Project-Group4/Code- Install Python dependencies:
pip install flask pillow- Compile the C program:
Mac/Linux:
gcc -o 3D_Reconstruction 3D_Reconstruction_CSE6010_1.c -lm -fopenmp -O2Windows:
gcc -o 3D_Reconstruction.exe 3D_Reconstruction_CSE6010_1.c -lm -fopenmp -O2- Start the Flask server:
python app.py- Open your browser and go to:
http://127.0.0.1:8000
-
Upload a floor plan image or click a sample image to generate a 3D model
-
Use the toggle buttons to switch between "No Roof" and "With Roof" views
-
Interact with the 3D model:
- Left Click + Drag: Rotate
- Right Click + Drag: Pan
- Scroll: Zoom
Code/
├── 3D_Reconstruction_CSE6010_1.c # Main C program
├── app.py # Flask web server
├── static/
│ ├── app.js # Frontend JavaScript
│ ├── style.css # Styling
│ └── sample_images/ # Sample floor plans
└── templates/
└── index.html # Main HTML page
- Image Preprocessing: Otsu thresholding for wall detection
- Segmentation: BFS flood fill and connected component labeling
- Door Detection:
- Red pixel detection for door markers
- RANSAC-based arc detection for curved doors
- 3D Extrusion: Wall and floor mesh generation
- OBJ Export: Standard 3D model format
- Language: C (core algorithm), Python (web server), JavaScript (visualization)
- Parallelization: OpenMP for performance optimization
- Complexity: O(N) where N = number of pixels
- Output Format: Wavefront OBJ files
- Zhang, Mengping
- Ma, Hsu, Chieh
- Gao, Tianxiang
- Nation, Ryan T
- Imran Aziz
CSE 6010 - Computational Problem Solving
Georgia Institute of Technology
This project is developed for academic purposes.