A library for RANSAC with most common objects
Project description
About this library
This is an open source implementation of most common objects for python.
Requirements
This repo was written on python 3.12. It should work fine with some other versions too, though.
To install requirements, run:
pip install -r requirements.txt
To install this module during development:
pip install -e .
Modules
Surfaces
This module represents all the surfaces included in this library. In each file, there's a class that encapsulates one surface e.g. Cylinder, Ellipsoid etc.
Generators
This module contains all the generation functions for surfaces provided in this library. In each file, there's a function like:
generate_cylinder(cylinder:Cylinder, noise_sigma, n_points)
that generates a set of 3d points for a given model.
Visualization
This module contains mesh generators for each surface. For example, here's a generation function for a cylinder:
from starkit_ransac.surfaces.cylinder import Cylinder
generate_cylinder_mesh(cylinder:Cylinder, color=...)
Each generation function accepts a surface model.
That creates an array of objects that can be visualized via
open3d.visualization.draw_geometries.
Writing your modules
To write a custom surface detector, create a child class of SurfaceModel and
place it in ransac3d/surfaces/. An example can be found at
ransac3d/surfaces/point.py.
Testing
To test your module, please write a pytest file for it. Example can be found in
test/test_point.py.
To run your tests:
python -m pytest test/<your_test_file_name>
Contributing
To add you custom surface to this repo:
- Clone this repo
- Create a brahcn called
feature/<your_shape_name> - Write tests. Make sure that they pass.
- Create a pull request.
Codestyle
If you want to contribute to this library, make sure that your code adheres to the following code style:
- classes are written in
EachWordStartingWithACapitalLetterstyle - functions and variables are written in
snake_case
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file starkit_ransac-0.1.0.tar.gz.
File metadata
- Download URL: starkit_ransac-0.1.0.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b77c7a4883a61324d8cfa755721cccae8d684430666ac39e5d4c3d8319cfd627
|
|
| MD5 |
9450eca1300a8784feb93a9b37e70b70
|
|
| BLAKE2b-256 |
80ac381892e201679830d9f546f4bff692fed600b1271051ce021c1f3fd6e94e
|
File details
Details for the file starkit_ransac-0.1.0-py3-none-any.whl.
File metadata
- Download URL: starkit_ransac-0.1.0-py3-none-any.whl
- Upload date:
- Size: 48.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65cc5006dbfc1e0418691dc661373f7ab8c391f0f8cbbe0b2983cd4680936842
|
|
| MD5 |
1f73295256ecdd00e09f0d33a0d28d46
|
|
| BLAKE2b-256 |
6bf292e8b21909a24e7d7d77d31c03e9f487119a5ca475361d835e07540738a1
|