Skip to content
AzaliaAlishevaPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autonomous 3D Scene Exploration System

📋 Overview

This system provides automated camera path planning for 3D point cloud exploration. It analyzes 3D scenes, selects optimal camera viewpoints, plans collision-free paths, and generates smooth cinematic videos.

🚀 Quick Start

Installation

# Create virtual environment
python -m venv venv

# On Windows: venv\Scripts\activate
# On macOS/Linux: source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Basic Usage

python src/main.py --ply path/to/your/scene.ply --out results/output_video --fps 30
Argument Description Default
--ply Path to input PLY file (required) -
--out Output directory for results outputs/scene_1
--fps Frames per second for output video 24

🔬 Algorithm Descriptions

1. Scene Loading and Preprocessing

Class: Scene in explorer.py

Purpose: Load and structure 3D point cloud data for efficient spatial queries.

Key Methods:

scene = Scene(ply_path, voxel_size=0.3)
scene._load_scene()           # Load PLY with voxel downsampling
scene._filter_points()        # Remove outliers using percentile filtering
scene._build_spatial_structure()  # Build KD-tree and occupancy grid

Parameters:

  • voxel_size: Controls resolution (default: 0.3)
  • filter_percentile: Outlier removal threshold (default: 90%)

2. Viewpoint Exploration

Class: Explorer in explorer.py

Purpose: Sample and evaluate potential camera positions.

Key Methods:

explorer = Explorer(scene)
explorer.sample_candidates(num_samples_per_axis=10)  # Generate viewpoints
explorer.score_candidates()  # Evaluate visibility scores

Sampling Candidates: Sample candidate points by dividing the space along each axis using the scene's bounding box.

Scoring Algorithm:

  1. Cast rays in multiple directions from each candidate
  2. Measure distance to object each ray 'hits' using Digital Differential Analyzer (DDA)
  3. Aggregate scores: Scoring function favors viewpoints where obstacles are situated between 0.5 and 10 units away, creating balanced compositions that show objects clearly without being too close or too distant.
  4. Sort candidates by the score

3. Path Planning

Class: PathPlanner in path_planner.py

Purpose: Generate smooth, collision-free camera paths.

Key Methods:

planner = PathPlanner(scene)
path = planner.plan_path(keypoints)  # Main planning pipeline

# Individual components:
path = planner.a_star(start, end)  # Basic pathfinding
path = planner.simplify_path(path)  # Path complexity reduction
path = planner.smooth_path_catmull_rom(path)  # Smoothing

Path Planning Pipeline:

  1. A_/Theta_ Search: Find collision-free route in voxel space
  2. Path Simplification: Remove unnecessary waypoints using Ramer-Douglas-Peucker
  3. Spline Smoothing: Apply Catmull-Rom interpolation for smooth motion

📊 Debug Visualization

# Visualize the planned path
plot_path(sampled_points, candidates, path)

![[path_vis.png]]

⚠️ Limitations Identified

1. Camera Collisions with Obstacles After path simplification and smoothing, the camera path can intersect with scene geometry. 2. Sparse Geometry Issues (Walls/Floors) Voxel occupancy detection fails for surfaces with sparse point distributions.

📽️ Video examples

https://drive.google.com/drive/folders/1iJu5oi5cM4CaKqJlM2_FFEkPKH6ZtK0X?usp=sharing

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages