#quad #another #transformation #2d #transformer #translation #projective

quad-to-quad-transformer

Translate 2d points from one quad to another

4 releases (2 breaking)

0.3.0 Nov 25, 2024
0.2.0 Nov 15, 2024
0.1.1 Nov 15, 2023
0.1.0 Nov 15, 2023

#401 in Science

Download history 22/week @ 2024-09-23 102/week @ 2024-11-11 24/week @ 2024-11-18 163/week @ 2024-11-25 8/week @ 2024-12-02 21/week @ 2024-12-09

224 downloads per month
Used in tether-lidar2d-consolidat…

MIT license

12KB
255 lines

Quad-to-Quad Perspective Transformer

This library does translation of coordinates within one "source quad" to another (the "destination quad").

It is an application of Projective Transformations, particularly useful for 2D "perspective" transformation. For example, if you are tracking someone in a calibrated user-defined quad and you want to normalise this into a quad which is precisely 1x1 units in size.

I developed this library for use in a 2D LIDAR tracking system, https://crates.io/crates/tether-lidar2d-consolidation. (It used to be a module within that application; now it is a separate library.)

Notes

Based on the Javascript library https://github.com/jlouthan/perspective-transform

I am also indebted to the excellent explanation of "Projective Transformations" at https://blog.mbedded.ninja/mathematics/geometry/projective-transformations/

Dependencies

~4MB
~81K SLoC