nudged-py | Estimate scale , rotation , and translation between two sets
kandi X-RAY | nudged-py Summary
kandi X-RAY | nudged-py Summary
Estimate scale, rotation, and translation between two sets of 2D points e.g. for multi-touch gestures or calibration
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Estimate the error of a transform
- Transform a point
nudged-py Key Features
nudged-py Examples and Code Snippets
Community Discussions
Trending Discussions on nudged-py
QUESTION
I'm attempting a 2D transformation using the nudged package.
The code is really simple:
...ANSWER
Answered 2019-Jul-17 at 13:41I was able to figure out your issue. It is simply that nudge
has somewhat problematic notation, which is poorly documented.
The estimate
function accepts a list of coordinate pairs. You effectively have to transpose dom
and ran
to get this to work. I suggest either switching to numpy arrays, or using list(map(list, zip(...)))
to do the transpose.
The Transform.transfom
method is extremely restrictive, and requires that the inner pairs be of type list
. Not tuple
, not any other sequence, but specifically list
. Your attempt to call trans.transform((x, y))
only happened to work by pure luck. transform
assessed that the first element is not a list, and attempted to transform (x, y)
as a pair of integers. Luckily for you, numpy operators are vectorized, so you can process an entire array as a single unit.
Here is a working version of your code that generates the correct plots using mostly python:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nudged-py
You can use nudged-py like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page