@udarrr/template-matcher
Advanced tools
Comparing version 1.1.8 to 1.1.9
@@ -114,7 +114,10 @@ "use strict"; | ||
async getValidatedMatches(matchResults, pixelDensity, confidence, roi) { | ||
matchResults = this.getDecreasedRectByPixelDensity(matchResults, pixelDensity); | ||
if (roi) { | ||
if (!roi) { | ||
matchResults = this.getDecreasedRectByPixelDensity(matchResults, pixelDensity); | ||
} | ||
else { | ||
matchResults = matchResults.map((m) => { | ||
return { confidence: m.confidence, error: m.error, location: new nut_js_1.Region(m.location.left + roi.left, m.location.top + roi.top, m.location.width, m.location.height) }; | ||
}); | ||
matchResults = this.getDecreasedRectByPixelDensity(matchResults, pixelDensity); | ||
(0, image_processor_class_1.validateSearchRegion)(new nut_js_1.Region(Number(roi.left), Number(roi.top), Number(roi.width), Number(roi.height)), new nut_js_1.Region(0, 0, await nut_js_1.screen.width(), await nut_js_1.screen.height())); | ||
@@ -121,0 +124,0 @@ } |
{ | ||
"name": "@udarrr/template-matcher", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"main": "dist/index", | ||
@@ -5,0 +5,0 @@ "typings": "dist/index", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
110337
1039