Skip to content

SlyPredator/plane_ransac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RANSAC Plane Segmentation

This is a tool to obtain segmented planes from depth images given a bag file, and visualise the same.

Contains a comparison of my attempt of implementation of RANSAC and Open3D's segment_plane.

File Structure

results contains results from previous runs

.
├── main.py          
├── classes.py       # Core logic; contains PlaneModel, RansacModel, and helper functions
├── exporter.py      # Utility module; handles CSV, TXT, and JPG grid generation
├── depth.db3        # Input ROS2 bag file
├── results /  
├───── run{iter} /   
├───────── results_table.csv          # Image index, normal angle, and visible area
├───────── rotation_axis.txt          # Estimated 3D axis of rotation vector
└───────── segmented_planes_grid.jpg  # Visualization grid with green-shaded planes

Running the code

Prerequisites

uv venv
source .venv/bin/activate
uv pip install -r requirements.txt

numpy should be 1.26.4, else it crashes.

Make sure to rename the .db3 to your respective one in main.py. Also update your camera intrinsics in the classes.py file.

For Realsense devices, run

realsense-enumerate-devices -c

to get your camera intrinsics for the desired resolution in the bag file.

Run the segmenter

python main.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Contributors

Languages