OpenCV 4.1.1 Template Matching Image Finder
It's plugin for nutjs project or standalone with some features like
- incresed accuracy (x10)
- incresed perfomance (~x2)
- added some customOptions for arguments
params?: OptionalSearchParameters
in nutjs !not implemented in nutjs yet, but available in standalone - added standalone
Installation for nutjs
npm i @udarrr/template-matcher
and then just use it in your project once
import "@udarrr/template-matcher"` or `require("@udarrr/template-matcher")
Installation for standalone
npm i @udarrr/template-matcher
and connect finder to your project
import finder from "@udarrr/template-matcher";
const matcheImages = await finder.findMatch({haystack: pathToImage, needle: pathToTemplate});
const matcheWithScreen = await finder.findMatch({needle: pathToTemplate});
const matchesImages = await finder.findMatches({haystack: pathToImage, needle: pathToTemplate});
const matchesWithScreen = await finder.findMatches({needle: pathToTemplate});
Options
{
confidence?: number,
searchMultipleScales?: boolean,
customOptions?: {
methodType: MethodNameType;
scaleSteps: Array<number>;
roi: Region;
debug: boolean
},
}
{
haystack?: string | Image,
needle: string | Image,
confidence?: number,
searchMultipleScales?: boolean,
customOptions?: {
methodType: MethodNameType;
scaleSteps: Array<number>;
roi: Region;
debug: boolean
},
}