Skip to main content

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:

  1. Clone this repo
  2. Create a brahcn called feature/<your_shape_name>
  3. Write tests. Make sure that they pass.
  4. 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 EachWordStartingWithACapitalLetter style
  • functions and variables are written in snake_case

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

starkit_ransac-0.1.0.tar.gz (30.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

starkit_ransac-0.1.0-py3-none-any.whl (48.1 kB view details)

Uploaded Python 3

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

Hashes for starkit_ransac-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b77c7a4883a61324d8cfa755721cccae8d684430666ac39e5d4c3d8319cfd627
MD5 9450eca1300a8784feb93a9b37e70b70
BLAKE2b-256 80ac381892e201679830d9f546f4bff692fed600b1271051ce021c1f3fd6e94e

See more details on using hashes here.

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

Hashes for starkit_ransac-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65cc5006dbfc1e0418691dc661373f7ab8c391f0f8cbbe0b2983cd4680936842
MD5 1f73295256ecdd00e09f0d33a0d28d46
BLAKE2b-256 6bf292e8b21909a24e7d7d77d31c03e9f487119a5ca475361d835e07540738a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page