fast-template-matcher

1.0.1 • Public • Published

node-fast-template-matcher

Nodejs native extension to search subimage inside an image using opencv cv::matchTemplate and cv::minMaxLoc.

Usage

const ftm = require('fast-template-matcher');

ftm.findSubImage({
  source: 'source.png',
  template: 'template.png',
  matchPercent: 70,
  maximumMatches: 1,
  downPyramids: 1,
  searchExpansion: 15,
}, function(matches){
  console.log('Results async: ',matches);
})

var resultsSync = ftm.findSubImage({
  source: 'source.png',
  template: 'template.png',
  matchPercent: 70,
  maximumMatches: 1,
  downPyramids: 1,
  searchExpansion: 15,
})

console.log('Results sync: ', resultsSync);

Installation

npm install --save fast-template-matcher

Requirements

node-gyp

npm install node-gyp -g

Requirements for Mac

XCode

Requirements for windows

Install window build tools. Refer to https://github.com/nodejs/node-gyp.

npm install --global --production windows-build-tools

Reference sources

  1. https://github.com/Jmgr/actiona
  2. https://github.com/monai/node-imagesearch

Package Sidebar

Install

npm i fast-template-matcher

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • phonezawphyo