@udarrr/template-matcher
Advanced tools
Comparing version 4.4.1 to 4.5.2
"use strict"; | ||
// Source C++ library //https://github.com/DennisLiu1993/Fastest_Image_Pattern_Matching under | ||
// BSD 2-Clause License | ||
// Copyright (c) 2022, DennisLiu1993 | ||
// All rights reserved. | ||
// Source C++ library //https://github.com/DennisLiu1993/Fastest_Image_Pattern_Matching under BSD 2-Clause License Copyright (c) 2022, DennisLiu1993 | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -347,3 +344,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
const matAMultiplicated = matATransposed.matMul(matA); | ||
const matAInverted = InvariantRotatingHandler.Invert(matAMultiplicated); | ||
const matAInverted = opencv4nodejs_prebuilt_install_1.default.invert(matAMultiplicated); | ||
const matAInvertedMultiplicated = matAInverted.matMul(InvariantRotatingHandler.Transpose(matA)); | ||
@@ -366,7 +363,7 @@ matZ = matAInvertedMultiplicated.matMul(matS); | ||
matK2.set(2, 0, -matZ_t.at(0, 8)); | ||
const matDelta = InvariantRotatingHandler.Invert(matK1).matMul(matK2); | ||
const matDelta = opencv4nodejs_prebuilt_install_1.default.invert(matK1).matMul(matK2); | ||
const dNewX = matDelta.at(0, 0); | ||
const dNewY = matDelta.at(1, 0); | ||
const dNewAngle = matDelta.at(2, 0) * InvariantRotatingHandler.R2D; | ||
return { dNewX: dNewX / 10, dNewY: dNewY / 10, dNewAngle: dNewAngle / 10 }; | ||
return { dNewX: dNewX, dNewY: dNewY, dNewAngle: dNewAngle }; | ||
} | ||
@@ -373,0 +370,0 @@ static Transpose(mat) { |
{ | ||
"name": "@udarrr/template-matcher", | ||
"version": "4.4.1", | ||
"version": "4.5.2", | ||
"main": "dist/index", | ||
@@ -50,3 +50,3 @@ "typings": "dist/index", | ||
"dependencies": { | ||
"opencv4nodejs-prebuilt-install": "^4.1.148", | ||
"opencv4nodejs-prebuilt-install": "^4.1.195", | ||
"@nut-tree/nut-js": "^3.1.2" | ||
@@ -53,0 +53,0 @@ }, |
@@ -76,10 +76,16 @@ # OpenCV 4.1.1 Template Matching Image Finder | ||
{ | ||
providerData?: { | ||
methodType?: MethodNameType; | ||
scaleSteps?: Array<number>; | ||
searchMultipleScales: boolean, | ||
isRotation: boolean, | ||
rotationOption?: { range?: number; overLap?: number; minDstLength?: number, subPixEstimation?: boolean }; | ||
debug?: boolean; | ||
roi?: Region; | ||
searchInput: RegionResultFindInput | Promise<RegionResultFindInput> | ||
params?: { | ||
searchRegion?: Region | Promise<Region> | undefined; | ||
confidence?: number | undefined; | ||
abort?: AbortSignal | undefined; | ||
providerData?: { | ||
methodType?: MethodNameType; | ||
scaleSteps?: Array<number>; | ||
searchMultipleScales: boolean, | ||
isRotation: boolean, | ||
rotationOption?: { range?: number; overLap?: number; minDstLength?: number, subPixEstimation?: boolean }; | ||
debug?: boolean; | ||
roi?: Region; | ||
} | ||
} | ||
@@ -100,6 +106,6 @@ }; | ||
overLap: 0.1, //inverted scale 0.1 = scaleSteps[0.9] | ||
minDstLength: 32, //quality | ||
subPixEstimation: false | ||
minDstLength: 32, //quality matching up to 4096 | ||
subPixEstimation: false //for low quality pics | ||
} | ||
confidence: 0.8 //0.98 for TM_SQDIFF | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
212593
110
1790