Room Dimension Estimator is a Python-based tool that leverages computer vision and artificial intelligence to estimate room dimensions from a single webcam image. It detects corners, calculates distances using a known reference scale, and applies a neural network model to provide refined dimension estimates.
- Capture room image via webcam
- Detect edges and corners using OpenCV
- Set reference scale interactively
- Estimate Length, Width, and Height
- Train a simple neural network for AI-based predictions
- Export measurements in both TXT and JSON formats
- Save debug data for analysis
- Estimate height using image perspective when necessary
- Python 3.7+
- OpenCV
- NumPy
- PyTorch
Install dependencies:
pip install -r requirements.txt
Run the script:
python room_dimension_estimator.py
Follow on-screen instructions to capture an image and set a reference scale. Results are displayed and saved locally.
measurements.txt
: Human-readable dimensionsmeasurements.json
: Dimensions in JSON formatdebug_data.json
: Corner and measurement data for debuggingroom_image.jpg
: Captured room image
Contributions are welcome! If you'd like to improve the model, enhance image processing, or add new features:
- Fork the repository
- Create your feature branch (
git checkout -b feature/new-feature
) - Commit your changes (
git commit -am 'Add new feature'
) - Push to the branch (
git push origin feature/new-feature
) - Create a new Pull Request
Please include tests and documentation with your contributions when possible.
This project is licensed under the MIT License.