1.0.1 • Published 8 years ago

fast-template-matcher v1.0.1

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

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