node-native-win-utils 2.1.3 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -176,6 +176,8 @@ class OpenCV {
176
176
  * @returns The result of the template matching operation.
177
177
  */
178
178
  matchTemplate(template, method, mask) {
179
+ if (typeof method !== "number")
180
+ method = TemplateMatchModes.TM_CCOEFF_NORMED;
179
181
  return matchTemplate(this.imageData, template, method, mask);
180
182
  }
181
183
  /**
package/dist/index.mjs CHANGED
@@ -157,6 +157,8 @@ class OpenCV {
157
157
  * @returns The result of the template matching operation.
158
158
  */
159
159
  matchTemplate(template, method, mask) {
160
+ if (typeof method !== "number")
161
+ method = TemplateMatchModes.TM_CCOEFF_NORMED;
160
162
  return matchTemplate(this.imageData, template, method, mask);
161
163
  }
162
164
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-native-win-utils",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "author": "Andrew K.",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/T-Rumibul/node-native-win-utils.git",
package/src/index.mts CHANGED
@@ -405,6 +405,7 @@ class OpenCV {
405
405
  * @returns The result of the template matching operation.
406
406
  */
407
407
  matchTemplate(template: ImageData, method?: number | null, mask?: ImageData) {
408
+ if(typeof method !== "number") method = TemplateMatchModes.TM_CCOEFF_NORMED;
408
409
  return matchTemplate(this.imageData, template, method, mask);
409
410
  }
410
411