Skip to content

Commit 6116f70

Browse files
committed
(#68) Disabled edge detection
1 parent f135faf commit 6116f70

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/provider/opencv/template-matching-finder.class.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { Region } from "../../region.class";
77
import { ScaledMatchResult } from "../../scaled-match-result.class";
88
import { DataSource } from "./data-source.interface";
99
import { determineScaledSearchRegion } from "./determine-searchregion.function";
10-
import { findEdges } from "./find-edges.function";
1110
import { FinderInterface } from "./finder.interface";
1211
import { ImageProcessor } from "./image-processor.class";
1312
import { 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

Comments
 (0)