How jamohile/stereoscopic-point-clouds works
Project type and purpose
• This is a command-line, Python-based stereoscopic point-cloud generation tool.
• It ingests a pair of left/right 2D images, computes pixel disparities, triangulates a 3D point cloud, then post-processes it for smoothness.
File structure
• Top-level scripts each implement one pipeline stage:
• pre_process.py – any initial image preparation
• disparities.py – stereo matching & disparity map computation
• triangulation.py – converts disparities into 3D points
• post_process.py – smooths and fills the point cloud
• cloud_generation.py – orchestrates the full pipeline (if present) or serves utilities
• main.py – entry point that parses args, loads config, invokes pipeline
• utils.py – shared helper functions (I/O, logging, image ops)
• config.py – runtime parameters (camera baseline, window sizes, thresholds)
• static/ – documentation, sample images, and PDF theory guide
Readme insights
• Describes a four-stage pipeline: disparity estimation → triangulation → post-processing → visualization/export.
• Highlights use of stereo region matching, recursive smoothing, and Python3 execution.
Components
a. Main components
• Input Module: loads left/right images + camera parameters (config.py)
• Pre-processing Module: image normalization, grayscale conversion
• Disparity Estimation Module: region matching algorithm (disparities.py)
• Triangulation Module: depth calculation & point cloud generation (triangulation.py)
• Post-processing Module: smoothing, noise removal, hole filling (post_process.py)
• Output Module: writes or visualizes final point cloud (cloud_generation.py or main.py)
• Utility Layer: common functions (utils.py)
• Static Resources: sample data and documentation
b. Relationships & data flow
c. Architectural patterns & principles
• Pipeline/chain-of-responsibility – each stage consumes and produces data for the next
• Single responsibility per script for clarity and testability
• Config-driven parameters for algorithm tuning without code changes
• Modular utility layer to avoid duplication
d. Key technologies
• Python 3.x
• OpenCV or similar (implied by image operations)
• NumPy for array computations
• Custom stereo matching implementation