https://github.com/universaldatatool/udt-to-image-position
Converts UDT region coordinates into image coordinates
https://github.com/universaldatatool/udt-to-image-position
Last synced: 5 months ago
JSON representation
Converts UDT region coordinates into image coordinates
- Host: GitHub
- URL: https://github.com/universaldatatool/udt-to-image-position
- Owner: UniversalDataTool
- License: mit
- Created: 2020-09-28T15:07:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-28T17:57:51.000Z (over 5 years ago)
- Last Synced: 2025-06-21T19:29:35.542Z (about 1 year ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# udt-to-image-position
This module modifies a UDT dataset by converting all of the pixel coordinates into image coordinates.
For example, if there is a bounding box with a `centerX` of `0.5` in a UDT file, and the image is `500px` wide, it will convert the `centerX` to `250`. It will also add an `imageWidth` and `imageHeight` property to each sample.
> The UDT format only accepts percent coordinates ([for a good reason]())
Installation:
```bash
npm install udt-to-image-position
```
```javascript
const { convertUDTToImagePosition, convertSampleToImagePosition } = require("udt-to-image-position")
// TODO
```