You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

itk-ransac

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

itk-ransac

It supports feature based registration and can be used along with the FPFH remote module. The class itkRANSAC is the main driver that takes an object of class itkLandmarkRegistrationEstimator as argument. Please refer to the documentation for a detailed description and sample usage: https://github.com/InsightSoftwareConsortium/ITKRANSAC.

pipPyPI
Version
0.2.1
Maintainers
3

ITKRANSAC

Overview

This is the source code for a C++ templated implementation of the RANSAC algorithm and associated Python wrapping. The implementation is multi-threaded. This repository is only for pointset registratation and differs slightly from the original generic implementation due to optimization.

For implementation related to plane and sphere estimation please refer https://github.com/midas-journal/midas-journal-769 and the associated Insight Journal article.

The code is "in the style of ITK". That is, it is very similar to the official ITK style but does not follow all of the required conventions.

Manifest:

  • RANSAC {h,txx} - Multi-threaded implementation of the generic RANSAC algorithm.
  • ParametersEstimator.{h,hxx} - Super class of all parameter estimation objects that can be used with the RANSAC algorithm. This is an abstract class that defines an interface.
  • itkLandmarkRegistrationEstimator.{h,hxx} - Estimation code for landmark based pointset registration.
  • Testing/*.cxx - Test for the PointSet registration using landmark points.

Python wrapping installation:

pip install itk-ransac



Sample Usage in Python for 3D PointSet is shown here:

data = itk.vector[itk.Point[itk.D, 6]]()
agreeData = itk.vector[itk.Point[itk.D, 6]]()
GenerateData(data, agreeData)

transformParameters = itk.vector.D()

TransformType = itk.Similarity3DTransform.D

maximumDistance = inlier_value
RegistrationEstimatorType = itk.Ransac.LandmarkRegistrationEstimator[6, TransformType]
registrationEstimator = RegistrationEstimatorType.New()
registrationEstimator.SetMinimalForEstimate(number_of_ransac_points)
registrationEstimator.SetAgreeData(agreeData)
registrationEstimator.SetDelta(maximumDistance)
registrationEstimator.LeastSquaresEstimate(data, transformParameters)

desiredProbabilityForNoOutliers = 0.99
RANSACType = itk.RANSAC[itk.Point[itk.D, 6], itk.D, TransformType]
ransacEstimator = RANSACType.New()
ransacEstimator.SetData(data)
ransacEstimator.SetAgreeData(agreeData)
ransacEstimator.SetMaxIteration(number_of_iterations)
ransacEstimator.SetNumberOfThreads(8)
ransacEstimator.SetParametersEstimator(registrationEstimator)

percentageOfDataUsed = ransacEstimator.Compute( transformParameters, desiredProbabilityForNoOutliers )
for i in transformParameters:
  print(i)



Landmarks can be obtained by performing feature matching.

For this one can use the ITKFPFH library.

Keywords

itk

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts