# Point Cloud Detection Scanner 🔴🎯
Advanced 3D Scanner optimized for full spectrum dot distance detection (635nm Red Laser)
Laser triangulation-based 3D scanner with AI depth estimation, real-time visualization, and mesh generation.
- 🔴 Mode 1: Red Laser (635nm) - Precise laser dot triangulation for high-accuracy 3D scanning
- 🌈 Mode 2: Curve Trace - Detect and trace continuous curves/contours
- 📐 Mode 3: Corner Detection - Find corners and feature points
- 🤖 Mode 4: AI Depth - Monocular depth estimation using V2 or MiDaS neural network
- MeshLab suggested for point cloud visualization
- Poisson Surface Reconstruction - Watertight, smooth meshes
- Ball Pivoting Algorithm (BPA) - Faithful to original data
- Screened Algorithm
- Auto-generates mesh on save (
.obj+.plyformats)
- Lazy Loading - 60-80% faster startup (loads AI modules only when needed)
- Spectrum Analyzer - Multi-wavelength laser detection (380-1000nm)
- Camera Calibration - Automatic distortion correction
- Auto-capture Mode - 3-snapshot rotation workflow
- ROI (Region of Interest) - Crop scan area with scissors tool
- GPU Acceleration - CUDA support for undistortion & depth estimation
- Quality Monitoring - Real-time sharpness & brightness analysis
- Python 3.8+
- Webcam (1280x720 recommended)
Infinity Gem is optimized for CPU-based reconstruction, but extremely large point clouds can take time to process. On a 32 GB RAM / 22‑core CPU system, generating a 2–3 million point cloud takes approximately 4 minutes. Performance will vary based on hardware and input complexity.
Infinity Gem supports both CPU and GPU reconstruction. Large point sets (2–3 million points or more) are GPU‑accelerated and will run significantly faster on a capable GPU. CPU processing is still supported but may take several minutes depending on your hardware.
Run the automated installer:
install.batThis will:
- ✅ Check Python installation
- ✅ Install dependencies with options (Basic or Full)
- ✅ Create default calibration
- ✅ Guide you through first launch
Setup time: 5-10 minutes
pip install opencv-python numpypip install -r requirements.txt# Install CUDA 11.8 or 12.x from NVIDIA first
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118
pip install opencv-python numpy timm open3d psutilcd scanning
python laser_3d_scanner_advanced.py| Key | Action | Description |
|---|---|---|
| 1/2/3/4 | Mode Switch | Full Spectrum / Curve / Corners / AI Depth |
| SPACE | Capture | Add points to 3D cloud |
| S | Save | Export .ply + auto-generate mesh |
| C | Clear | Delete all captured points |
| M | Mesh Method | Toggle Poisson / Ball Pivoting |
| V | Cartoon Mode | Toggle camera cartoon-style settings |
| P | Spectrum Cycle | Switch laser wavelength (635nm / 532nm / 450nm / IR / Full) |
| +/- | Curve Sample | Adjust curve point sampling rate |
| [/] | Corner Count | Adjust max corner detection limit |
| ,/. | Edge Threshold | Adjust Canny edge sensitivity |
| I | AI Panel | Toggle AI quality panel visibility |
| B | Controls Panel | Toggle keyboard controls display |
| Q/ESC | Quit | Exit scanner |
| Key | Action |
|---|---|
| Z | Toggle depth visualization overlay |
| X | Toggle sparse/dense point cloud |
| W/E | Adjust min depth range |
| R/F | Adjust max depth range |
point_cloud_detection/
├── scanning/ # Main scanner module
│ ├── laser_3d_scanner_advanced.py # Main scanner (2600+ lines)
│ ├── depth_estimator.py # AI depth estimation (MiDaS)
│ ├── spectrum_config.py # Multi-wavelength laser detection
│ ├── panel_display_module.py # UI panels and overlays
│ ├── gpu_optimizer.py # CUDA acceleration
│ ├── calibration_helper.py # Auto-setup for new users
│ ├── camera_identifier.py # Camera fingerprinting
│ ├── SCANNER_MATRIX.py # Fast lookup reference
│ └── data/ # Scan output folder
│ └── point_clouds/ # .ply, .obj, .npz files
│
├── calibration/ # Camera calibration tools
│ ├── camera_distance_detector_calibrated.py
│ └── checkerboard.py # Calibration pattern generator
│
├── ai_analysis/ # AI quality analysis
│ ├── camera_info.py # FPS, exposure, resolution
│ ├── image_quality.py # Sharpness, brightness detection
│ └── optimized_analyzer.py # GPU-accelerated analysis
│
├── utils/ # Utilities
│ ├── project_manager.py # Scan project organization
│ └── system_requirements.py # Dependency checker
│
├── requirements.txt # Python dependencies
├── .gitignore # Git exclusions
└── README.md # This file
# Calibrate camera (auto-generates checkerboard)
python calibration/checkerboard.py
# Follow on-screen instructions for 15-20 images
# Alternative: Use default calibration (less accurate)
# Scanner auto-detects and offers to generate checkerboard- Launch scanner: `python laser_3d_scanner_advanced.py
- Press SPACE to capture points
- Rotate object, capture more points
- Press S to save (auto-generates mesh)
- Press 4 for AI Depth mode
- Position camera to view object
- Press SPACE to capture dense depth map
- Press S to save
Edit laser_3d_scanner_advanced.py:
# Line ~1711
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1280)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 720)Edit spectrum_config.py or press P to cycle presets:
- Full Spectrum - Default
- 532nm Green
- 450nm Blue
- 780nm Near-IR
- Full Spectrum (380-1000nm)
On first run, scanner prompts for save folder:
- Option 1:
scanning/folder - Option 2: Custom path (enter manually)
scan_3d_YYYYMMDD_HHMMSS.ply- Colored point cloud (ASCII)scan_3d_bosch_glm42.npz- Compressed NumPy format
scan_*_mesh.obj- Poisson or BPA meshscan_*_mesh.ply- Mesh in PLY format
- Rotation angles
- Session timestamps
- Calibration fingerprint
# Install PyTorch + dependencies
pip install torch torchvision timm# Change camera index in laser_3d_scanner_advanced.py
WEBCAM_INDEX = 1 # Try 0, 1, 2...Scanner auto-generates checkerboard and guides setup. Or:
python calibration/checkerboard.pyEnable GPU acceleration (see Installation → GPU Acceleration)
Fixed in v2.0 - viewer now positions in top-right corner
- Method: Dot centroid detection with sub-pixel accuracy
- Range: Configurable via calibration (typically 20-200cm)
- Accuracy: ±2mm at 1m distance (with calibration)
- Model: MiDaS DPT-Large (Intel ISL)
- Input: Single RGB image
- Output: Dense depth map (downsampled 2x-4x)
- Speed: ~2 FPS (CPU), ~15 FPS (GPU RTX 3060)
- Poisson: 8-10 octree depth, watertight surfaces
- BPA: 5mm ball radius, preserves fine details
- Screened
| Package | Purpose | Required |
|---|---|---|
| opencv-python | Camera capture, image processing | ✅ Yes |
| numpy | Array operations, point clouds | ✅ Yes |
| torch | AI depth neural network | |
| torchvision | Image transforms for AI | |
| V2 AI Assist | Standalone depth AI module (zip) | |
| timm | MiDaS DPT model support | |
| psutil | System monitoring |
See LICENSE file.
Infinity Gem™ and Infinity Gems™ are unregistered trademarks of the project’s author.
All branding, logos, names, and visual identifiers associated with Infinity Gem(s) are the exclusive intellectual property of the author and are not covered by the Apache 2.0 license.
The open-source code may be used under the terms of the Apache License, Version 2.0, but the Infinity Gem(s) name, branding, and associated marks may not be used to imply endorsement, affiliation, or official status without prior written permission.
The Infinity Gem™ / Infinity Gems™ name, branding, and visual identity are protected intellectual property of the project’s author. These elements are NOT licensed under the Apache 2.0 license.
- You may state that your project “uses the Infinity Gem open-source software” as long as it is factual.
- You may link to the official repository.
- You may fork the code under the terms of the Apache 2.0 license.
You may NOT:
- Use the Infinity Gem(s) name or branding in a way that suggests your fork or product is the official version.
- Use the name or branding in commercial products without written permission.
- Use the name or branding in a way that causes confusion about origin, affiliation, or endorsement.
- Create logos, marks, or product names that are confusingly similar.
Commercial use of the Infinity Gem(s) brand, name, or identity requires a separate written agreement with the author.
The Apache 2.0 license does not grant rights to use the brand in commercial contexts.
Unauthorized use of the Infinity Gem(s) brand may result in legal action under applicable trademark and unfair competition laws.
This is a private repository for development. Contributions welcome after review.
For issues or questions, check:
- Troubleshooting section above
- Code comments in
laser_3d_scanner_advanced.py SCANNER_MATRIX.pyfor quick reference
Last Updated: December 13, 2025
Version: 2.0 (Lazy Loading )