@@ -7,7 +7,6 @@ import { Region } from "../../region.class";
77import { ScaledMatchResult } from "../../scaled-match-result.class" ;
88import { DataSource } from "./data-source.interface" ;
99import { determineScaledSearchRegion } from "./determine-searchregion.function" ;
10- import { findEdges } from "./find-edges.function" ;
1110import { FinderInterface } from "./finder.interface" ;
1211import { ImageProcessor } from "./image-processor.class" ;
1312import { ImageReader } from "./image-reader.class" ;
@@ -86,8 +85,6 @@ export class TemplateMatchingFinder implements FinderInterface {
8685 ) ;
8786 }
8887 const haystack = await loadHaystack ( matchRequest ) ;
89- const edgeHaystack = await findEdges ( haystack ) ;
90- const edgeNeedle = await findEdges ( needle ) ;
9188
9289 if ( debug ) {
9390 debugImage ( needle , "input_needle.png" ) ;
@@ -107,7 +104,7 @@ export class TemplateMatchingFinder implements FinderInterface {
107104 )
108105 ) ;
109106 }
110- const matchResult = await matchImages ( edgeHaystack , edgeNeedle ) ;
107+ const matchResult = await matchImages ( haystack , needle ) ;
111108 return new ScaledMatchResult ( matchResult . confidence , currentScale , matchResult . location ) ;
112109 }
113110 ) ;
@@ -126,7 +123,7 @@ export class TemplateMatchingFinder implements FinderInterface {
126123 )
127124 ) ;
128125 }
129- const matchResult = await matchImages ( edgeHaystack , await findEdges ( scaledNeedle ) ) ;
126+ const matchResult = await matchImages ( haystack , scaledNeedle ) ;
130127 return new ScaledMatchResult (
131128 matchResult . confidence ,
132129 currentScale ,
@@ -148,7 +145,7 @@ export class TemplateMatchingFinder implements FinderInterface {
148145 )
149146 ) ;
150147 }
151- const matchResult = await matchImages ( await findEdges ( scaledHaystack ) , edgeNeedle ) ;
148+ const matchResult = await matchImages ( scaledHaystack , needle ) ;
152149 return new ScaledMatchResult (
153150 matchResult . confidence ,
154151 currentScale ,
0 commit comments