Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/li0ard/findkey_ts
Program to compute Affine/Helmert 2D transformation parameters.
https://github.com/li0ard/findkey_ts
Last synced: 2 months ago
JSON representation
Program to compute Affine/Helmert 2D transformation parameters.
- Host: GitHub
- URL: https://github.com/li0ard/findkey_ts
- Owner: li0ard
- License: apache-2.0
- Created: 2024-07-20T07:48:06.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-25T08:16:41.000Z (6 months ago)
- Last Synced: 2024-09-24T18:36:37.486Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# findkey_ts
[๐ท๐บ ะะตััะธั ะฝะฐ ััััะบะพะผ](README_ru.md)
Program to compute Affine/Helmert 2D transformation parameters.
Ported from C to TS by li0ard
**ATTENTION: This program is only compatible with [Bun](https://bun.sh)**
## CLI
### Usage
```
findkey_ts --f1 --f2
```### Input files
For the program to work, 2 files are needed: a file with coordinates in the original coordinate system and a file with coordinates in the desired coordinate system (6-7 pairs of coordinates are needed for the best result)
Coordinate pairs are written in the `Y X` format
## API
```ts
/** Represents the formatted transformation parameters */
export interface formattedH {
A0: number,
A1: number,
A2: number,
B0: number,
B1: number,
B2: number,
}/** Represents the transformation parameters with scale (mu), angle (theta), and residuals */
export interface Keys {
h: formattedH,
mu: number,
theta: number,
residuals: number[][]
}/**
* Find parameters
* @param fp0 Array with coordinates in original CS in the format "Y X"
* @param fp1 Array with coordinates in desired CS in the format "Y X"
* @returns
*/export const findKey = (fp0: string[], fp1: string[]): Keys => {}
/**
* Reverse parameters
* @param h Property `h` of `findKey` function result
* @returns
*/
export const reverseH = (h: formattedH): formattedH => {}
```