TopoVision - 3D Topographic Analysis System for Calculus II
Project description
๐ฐ๏ธ TopoVision โ 3D Topographic Analysis System
A Python-based system for topographic data visualization, real-time analysis, and calculus-based gradient computation.
๐ฆ Repository: https://github.com/JalaU-Capstones/topovision.git
๐งญ Overview
TopoVision is a collaborative academic project developed as part of the Calculus II course at Universidad Jala. The system combines Computer Vision, Numerical Methods, and Topographic Analysis to calculate and visualize slopes, gradients, and surface volumes in real time.
The main goal is to create a tool that connects mathematical theory with visual and spatial understanding โ transforming multivariable calculus into an interactive experience.
โ๏ธ Key Features
- ๐ฅ Real-time video capture using OpenCV
- ๐งฎ Numerical computation of partial derivatives and gradients
- โจ Dynamic 3D Surface Plots: Interactive visualization of topographic data, including heatmaps and vector fields.
- ๐ฑ๏ธ Interactive point and region selection on GUI
- ๐ง Modular design following SOLID principles and Design Patterns
- โก Optimized for low-resource environments (Python 3.11 + NumPy vectorization)
- ๐ฆ Easy installation via PyPI
๐ผ๏ธ Visualizations
TopoVision offers rich and interactive 3D visualizations to help understand complex topographic data.
Dynamic 3D Surface Plots
Experience real-time rendering of surfaces, allowing you to observe changes in elevation and features interactively.
Gradient Vector Fields
Visualize the direction and magnitude of the steepest ascent across the terrain, providing insights into flow and slope.
๐ Quick Start
Installation from PyPI
pip install topovision
Run the application
python -m topovision
Or simply:
topovision
You should see a GUI window with "Open Camera" and "Exit" buttons.
๐ System Requirements
Required
- Python 3.11 or higher
- Tkinter (GUI toolkit)
Tkinter Installation
Tkinter comes pre-installed with Python on Windows and macOS.
On Linux, you may need to install it manually:
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install python3-tk
Fedora/RHEL:
sudo dnf install python3-tkinter
Arch Linux:
sudo pacman -S tk
๐ ๏ธ Installation Options
Standard Installation
Includes all features and GUI support:
pip install topovision
Development Installation
Includes testing, linting, and documentation tools:
pip install topovision[dev]
Lightweight Installation
Minimal dependencies without OpenCV GUI components:
pip install topovision[light]
Installation from Source
For developers who want to contribute or modify the code:
# Clone the repository
git clone https://github.com/JalaU-Capstones/topovision.git
cd topovision
# Create virtual environment
python3.11 -m venv .venv
source .venv/bin/activate # macOS/Linux
# OR
.venv\Scripts\activate # Windows
# Install in editable mode
pip install -e .
# Or install with dev dependencies
pip install -e .[dev]
๐งฉ Project Structure
topovision/
โโโ src/
โ โโโ topovision/
โ โโโ __init__.py
โ โโโ __main__.py # Entry point for CLI execution
โ โโโ app.py # Main application logic
โ โโโ core/
โ โ โโโ interfaces.py
โ โ โโโ models.py
โ โโโ capture/
โ โ โโโ capture_module.py
โ โ โโโ camera_backends.py
โ โ โโโ preprocessing.py
โ โโโ calculus/
โ โ โโโ calculus_module.py
โ โ โโโ methods/
โ โ โโโ finite_diff.py
โ โ โโโ gradient.py
โ โ โโโ riemann.py
โ โโโ visualization/
โ โ โโโ visualization_module.py
โ โ โโโ heatmap.py
โ โ โโโ vector_overlay.py
โ โ โโโ plot3d.py # Added 3D plotting capabilities
โ โโโ gui/
โ โ โโโ gui_module.py
โ โโโ services/
โ โ โโโ cache.py
โ โ โโโ task_queue.py
โ โโโ utils/
โ โ โโโ validators.py
โ โโโ tests/
โ โโโ test_capture.py
โ โโโ test_calculus.py
โ โโโ test_visualization.py
โโโ docs/
โ โโโ architecture.md
โ โโโ user-guide.md
โ โโโ github-flow-guide.md
โโโ pyproject.toml
โโโ requirements.txt
โโโ requirements-dev.txt
โโโ LICENSE
โโโ README.md
๐งฐ Tech Stack
| Layer | Technology |
|---|---|
| Language | Python 3.11 |
| GUI | Tkinter |
| Computer Vision | OpenCV |
| Numerical Analysis | NumPy, SciPy |
| Visualization | Matplotlib |
| Performance | Numba |
| Documentation | Markdown + pdoc |
| Testing | Pytest |
| Linting / Formatting | Flake8, Black, Mypy |
| Version Control | GitHub (GitHub Flow) |
| Distribution | PyPI |
๐ฏ Usage Examples
Basic Usage
# After installation, simply run:
python -m topovision
# Or use the command directly:
topovision
Programmatic Usage
from topovision.app import main
# Launch the application
main()
๐งฎ Core Functionalities (Mathematical Overview)
| Feature | Description | Method |
|---|---|---|
| Partial Derivatives | Calculated using finite difference methods | Central Difference Scheme |
| Gradient Vector | Visualized as direction + magnitude arrows | Sobel Operator |
| Double Integrals | Computed with discrete Riemann sums | Trapezoidal Rule |
| 3D Surface Visualization | Dynamic and interactive 3D plots of topographic surfaces | Matplotlib + NumPy |
| Real-time Processing | Optimized numerical computations | Numba JIT Compilation |
๐งฉ Development Workflow โ GitHub Flow
๐ฟ Main Branches
| Branch | Purpose |
|---|---|
main |
Stable release branch |
develop |
Integration branch |
feature/* |
Individual development tasks |
hotfix/* |
Urgent fixes |
docs/* |
Documentation-only updates |
๐ฌ Commit Convention
Follow Conventional Commits format:
<type>(<scope>): <description>
Examples:
feat(capture): added OpenCVCamera backend
fix(gui): fixed window resize event
docs(readme): updated installation steps
Types:
featโ new featurefixโ bug fixdocsโ documentation changesrefactorโ code structure improvementstestโ test-related commitschoreโ build, CI, or maintenance
๐ Typical Workflow
git checkout develop
git pull
git checkout -b feature/my-feature
# Make changes...
git add .
git commit -m "feat(scope): description"
git push origin feature/my-feature
# Open Pull Request โ merge into develop โ then into main
๐งช Testing
Run the test suite:
# Install with dev dependencies
pip install topovision[dev]
# Run tests
pytest
# Run with coverage
pytest --cov=topovision
๐ฅ Team Members
| Name | Role |
|---|---|
| Alejandro Botina Herrera | Technical Lead & System Architect |
| Andreina Olivares Cabrera | Interface Developer & Documentation |
| Jonathan Joel Ruviรฑo | Testing & Numerical Computation |
| Kiara Vanessa Muรฑoz Bayter | Environment Setup & Visualization |
| Vรญctor Manuel Barrero Acosta | Capture Systems & Demonstrations |
๐งฑ Project Roadmap
| Week | Focus | Key Deliverables |
|---|---|---|
| 1 | Setup & Architecture | Folder structure, interfaces, mock GUI |
| 2 | Capture & Processing | Camera module + preprocessing filters |
| 3 | Calculus & Visualization | Derivatives, gradients, and heatmaps |
| 4 | Testing & Publication | PyPI release, documentation, and demo video |
๐งพ License
This project is licensed under the Apache License 2.0. See the LICENSE file for more details.
๐ Acknowledgements
- Universidad Jala โ Department of Computer Science
- Course: Calculus II โ Applied Computational Analysis
- Year: 2025
๐ก Contributing
We welcome contributions!
- Fork the repository
- Create a new branch (
feature/your-feature) - Install development dependencies:
pip install -e .[dev] - Commit your changes using Conventional Commits
- Run tests:
pytest - Open a Pull Request
๐ Troubleshooting
Tkinter not found
Error: ModuleNotFoundError: No module named '_tkinter'
Solution: Install Tkinter for your system (see System Requirements section above)
OpenCV camera issues
Error: Camera not opening or permission denied
Solution:
- Ensure your camera is not being used by another application
- On Linux, add your user to the
videogroup:sudo usermod -a -G video $USER - Restart your session after group changes
Import errors after installation
Error: ModuleNotFoundError: No module named 'topovision'
Solution:
# Verify installation
pip list | grep topovision
# Reinstall if needed
pip uninstall topovision
pip install topovision
๐ง Future Improvements
- Add 3D mesh visualization using Plotly or Mayavi
- Implement topographic point cloud import (LAS/CSV)
- Integrate hardware sensors for live terrain capture
- Develop a lightweight Web-based viewer (Flask + WebGL)
- Machine learning integration for automatic feature detection
- Export functionality for analysis results (JSON, CSV, HDF5)
๐ Performance
TopoVision is optimized for real-time analysis:
- Frame processing: ~30 FPS on modern hardware
- Gradient computation: <50ms per frame
- Memory usage: ~200MB typical, <500MB peak
Tested on:
- CPU: Intel i5-8250U / AMD Ryzen 5 3600
- RAM: 8GB minimum, 16GB recommended
- OS: Windows 10/11, Ubuntu 20.04+, macOS 12+
๐ Links
- PyPI Package: https://pypi.org/project/topovision/
- GitHub Repository: https://github.com/JalaU-Capstones/topovision
- Issue Tracker: https://github.com/JalaU-Capstones/topovision/issues
- Documentation: docs/
๐ฏ TopoVision โ bridging the gap between Calculus and reality, one frame at a time.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file topovision-0.1.1.tar.gz.
File metadata
- Download URL: topovision-0.1.1.tar.gz
- Upload date:
- Size: 50.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
309fcd86978e5616df7913ba03b18fb807356775891757bf92048fc969d60fa1
|
|
| MD5 |
0f6ed7d40e4bac1157e10c67958c1e9b
|
|
| BLAKE2b-256 |
be10deff6ed14d1c89c60f08008d9b2828d54b7d4f0744abab5a25a429bc4295
|
File details
Details for the file topovision-0.1.1-py3-none-any.whl.
File metadata
- Download URL: topovision-0.1.1-py3-none-any.whl
- Upload date:
- Size: 57.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f21e865be365c11cbd1b889a7838c37a8662a58226364a402f0d2d47d52ea2f0
|
|
| MD5 |
08f19e1f5f88d1f5e45cec699d162bed
|
|
| BLAKE2b-256 |
3f381300b9df14023aaf492b005b6f542f19166d0343e4fb9b2cb0098868a983
|