Skip to content

Instantly share code, notes, and snippets.

View jmswaney's full-sized avatar
🏠
Working remotely

Justin Swaney jmswaney

🏠
Working remotely
View GitHub Profile
### Keybase proof
I hereby claim:
* I am jmswaney on github.
* I am jswaney (https://keybase.io/jswaney) on keybase.
* I have a public key ASBxRt4VHsa0B8LfhKzUpKY14-geldgau88npEQwaOTbugo
To claim this, I am signing this object:
@jmswaney
jmswaney / tps3d.py
Created April 30, 2018 15:34
Basic 3D TPS warp
def coord_mapping(fixed_coords, c, matches_stationary, smoothing):
"""Apply 3D thin-plate spline mapping to fixed_coords.
The RBF keypoints are given in matches_stationary. Smoothing is a
surface energy regularization parameter.
Parameters
----------
fixed_coords : ndarray
(N, 3) array of points to warp