Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fralonra/linkimage
Find corresponding points between images. Using OpenCV and TensorFlow.js.
https://github.com/fralonra/linkimage
opencv tensorflow tensorflowjs
Last synced: 4 days ago
JSON representation
Find corresponding points between images. Using OpenCV and TensorFlow.js.
- Host: GitHub
- URL: https://github.com/fralonra/linkimage
- Owner: fralonra
- License: mit
- Created: 2020-11-04T11:47:11.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-05T02:04:29.000Z (over 2 years ago)
- Last Synced: 2024-10-12T16:23:00.116Z (about 1 month ago)
- Topics: opencv, tensorflow, tensorflowjs
- Language: JavaScript
- Homepage:
- Size: 84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# linkimage
[![npm version](https://img.shields.io/npm/v/linkimage.svg)](https://www.npmjs.com/package/linkimage)
![Node.js CI](https://github.com/fralonra/linkimage/workflows/Node.js%20CI/badge.svg)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![codecov](https://codecov.io/gh/fralonra/linkimage/branch/master/graph/badge.svg)](https://codecov.io/gh/fralonra/linkimage)Find corresponding points between images. Using [OpenCV](https://opencv.org/) and [TensorFlow.js](https://www.tensorflow.org/js).
![linkimage](./doc/doc.jpg)
## Install
```bash
npm install linkimage
```or
```bash
yarn add linkimage
```## Usage
```javascript
const fs = require('fs')
const { link, linkMat } = require('linkimage')
const { imdecode, imread } = require('opencv4nodejs')const srcBuffer = fs.readFileSync('images/src.jpg')
const dstBuffer = fs.readFileSync('images/dst.jpg')// Find point on the destination image which corresponds to the specific point on the source image.
// The source point is the center of the source image.
const point = link(srcBuffer, dstBuffer)
// You can also specify a source point:
// const point = link(srcBuffer, dstBuffer, [100, 100])// You can also use 'linkMat' method to pass Mat objects directly.
const srcMat = imdecode(srcBuffer)
const dstMat = imdecode(dstBuffer)
// Or use imread instead
// const srcMat = imread('images/src.jpg')
// const dstMat = imread('images/dst.jpg')
const point2 = linkMat(srcMat, dstMat)// Returns the cordinates of the corresponding point in format [x, y].
// If no point found, return [-1, -1].
console.log(point)
```## License
[MIT](./LICENSE)