Skip to content

Instantly share code, notes, and snippets.

@oshea00
oshea00 / kabsch.py
Last active June 19, 2024 01:45
3D best-fit using Kabsch algorithm
import numpy as np
from math import sqrt
scaling = False
# Implements Kabsch algorithm - best fit.
# Supports scaling (umeyama)
# Compares well to SA results for the same data.
# Input:
# Nominal A Nx3 matrix of points