fast-template-matcher
v1.0.1
Published
Nodejs native extension to search subimage inside an image using opencv cv::matchTemplate and cv::minMaxLoc.
Downloads
3
Maintainers
Readme
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
- https://github.com/Jmgr/actiona
- https://github.com/monai/node-imagesearch