Skip to main content

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.

Python 3.11 License: Apache 2.0 PyPI version Build

๐Ÿ“ฆ 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.

3D Surface Plot Screenshot

Gradient Vector Fields

Visualize the direction and magnitude of the steepest ascent across the terrain, providing insights into flow and slope.

Gradient Vector Field Screenshot


๐Ÿš€ 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 feature
  • fix โ€” bug fix
  • docs โ€” documentation changes
  • refactor โ€” code structure improvements
  • test โ€” test-related commits
  • chore โ€” 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!

  1. Fork the repository
  2. Create a new branch (feature/your-feature)
  3. Install development dependencies: pip install -e .[dev]
  4. Commit your changes using Conventional Commits
  5. Run tests: pytest
  6. 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 video group: 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


๐ŸŽฏ TopoVision โ€” bridging the gap between Calculus and reality, one frame at a time.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

topovision-0.1.1.tar.gz (50.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

topovision-0.1.1-py3-none-any.whl (57.4 kB view details)

Uploaded Python 3

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

Hashes for topovision-0.1.1.tar.gz
Algorithm Hash digest
SHA256 309fcd86978e5616df7913ba03b18fb807356775891757bf92048fc969d60fa1
MD5 0f6ed7d40e4bac1157e10c67958c1e9b
BLAKE2b-256 be10deff6ed14d1c89c60f08008d9b2828d54b7d4f0744abab5a25a429bc4295

See more details on using hashes here.

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

Hashes for topovision-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f21e865be365c11cbd1b889a7838c37a8662a58226364a402f0d2d47d52ea2f0
MD5 08f19e1f5f88d1f5e45cec699d162bed
BLAKE2b-256 3f381300b9df14023aaf492b005b6f542f19166d0343e4fb9b2cb0098868a983

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page