From 35381d6f05f815102ef78a57ceaba5f93150dc9e Mon Sep 17 00:00:00 2001 From: ocavue Date: Thu, 13 Nov 2025 19:13:03 +1100 Subject: [PATCH 1/2] Rename .ts files to .d.ts files --- package.json | 2 +- src/{index.ts => index.d.ts} | 0 src/types/{_cv.ts => _cv.d.ts} | 0 src/types/{emscripten.ts => emscripten.d.ts} | 0 src/types/opencv/{Affine3.ts => Affine3.d.ts} | 0 src/types/opencv/{Algorithm.ts => Algorithm.d.ts} | 0 src/types/opencv/{AutoBuffer.ts => AutoBuffer.d.ts} | 0 src/types/opencv/{BFMatcher.ts => BFMatcher.d.ts} | 0 src/types/opencv/{BOWTrainer.ts => BOWTrainer.d.ts} | 0 .../{BackgroundSubtractor.ts => BackgroundSubtractor.d.ts} | 0 ...roundSubtractorMOG2.ts => BackgroundSubtractorMOG2.d.ts} | 0 .../opencv/{CascadeClassifier.ts => CascadeClassifier.d.ts} | 0 .../opencv/{DescriptorMatcher.ts => DescriptorMatcher.d.ts} | 0 src/types/opencv/{DynamicBitset.ts => DynamicBitset.d.ts} | 0 src/types/opencv/{Exception.ts => Exception.d.ts} | 0 src/types/opencv/{Feature2D.ts => Feature2D.d.ts} | 0 .../opencv/{FlannBasedMatcher.ts => FlannBasedMatcher.d.ts} | 0 src/types/opencv/{HOGDescriptor.ts => HOGDescriptor.d.ts} | 0 src/types/opencv/{Logger.ts => Logger.d.ts} | 0 src/types/opencv/{LshTable.ts => LshTable.d.ts} | 0 src/types/opencv/{Mat.ts => Mat.d.ts} | 0 src/types/opencv/{MatExpr.ts => MatExpr.d.ts} | 0 src/types/opencv/{MatOp.ts => MatOp.d.ts} | 0 src/types/opencv/{Matx.ts => Matx.d.ts} | 0 src/types/opencv/{Node.ts => Node.d.ts} | 0 src/types/opencv/{ORB.ts => ORB.d.ts} | 0 src/types/opencv/{PCA.ts => PCA.d.ts} | 0 src/types/opencv/{QRCodeDetector.ts => QRCodeDetector.d.ts} | 0 .../{QRCodeDetectorAruco.ts => QRCodeDetectorAruco.d.ts} | 0 src/types/opencv/{RotatedRect.ts => RotatedRect.d.ts} | 0 src/types/opencv/{Tracker.ts => Tracker.d.ts} | 0 src/types/opencv/{TrackerMIL.ts => TrackerMIL.d.ts} | 0 src/types/opencv/{_hacks.ts => _hacks.d.ts} | 0 src/types/opencv/{_types.ts => _types.d.ts} | 0 src/types/opencv/{calib3d.ts => calib3d.d.ts} | 0 src/types/opencv/{core_array.ts => core_array.d.ts} | 0 src/types/opencv/{core_cluster.ts => core_cluster.d.ts} | 0 .../{core_hal_interface.ts => core_hal_interface.d.ts} | 0 src/types/opencv/{core_utils.ts => core_utils.d.ts} | 0 src/types/opencv/{dnn.ts => dnn.d.ts} | 0 .../opencv/{features2d_draw.ts => features2d_draw.d.ts} | 0 src/types/opencv/{fisheye.ts => fisheye.d.ts} | 0 ..._color_conversions.ts => imgproc_color_conversions.d.ts} | 0 .../opencv/{imgproc_colormap.ts => imgproc_colormap.d.ts} | 0 src/types/opencv/{imgproc_draw.ts => imgproc_draw.d.ts} | 0 .../opencv/{imgproc_feature.ts => imgproc_feature.d.ts} | 0 src/types/opencv/{imgproc_filter.ts => imgproc_filter.d.ts} | 0 src/types/opencv/{imgproc_hist.ts => imgproc_hist.d.ts} | 0 src/types/opencv/{imgproc_misc.ts => imgproc_misc.d.ts} | 0 src/types/opencv/{imgproc_object.ts => imgproc_object.d.ts} | 0 src/types/opencv/{imgproc_shape.ts => imgproc_shape.d.ts} | 0 .../opencv/{imgproc_transform.ts => imgproc_transform.d.ts} | 0 src/types/opencv/{index.ts => index.d.ts} | 0 src/types/opencv/{objdetect.ts => objdetect.d.ts} | 0 src/types/opencv/{photo_inpaint.ts => photo_inpaint.d.ts} | 0 src/types/opencv/{softdouble.ts => softdouble.d.ts} | 0 src/types/opencv/{softfloat.ts => softfloat.d.ts} | 0 src/types/opencv/{video_track.ts => video_track.d.ts} | 0 tsconfig.json | 6 ++++-- 59 files changed, 5 insertions(+), 3 deletions(-) rename src/{index.ts => index.d.ts} (100%) rename src/types/{_cv.ts => _cv.d.ts} (100%) rename src/types/{emscripten.ts => emscripten.d.ts} (100%) rename src/types/opencv/{Affine3.ts => Affine3.d.ts} (100%) rename src/types/opencv/{Algorithm.ts => Algorithm.d.ts} (100%) rename src/types/opencv/{AutoBuffer.ts => AutoBuffer.d.ts} (100%) rename src/types/opencv/{BFMatcher.ts => BFMatcher.d.ts} (100%) rename src/types/opencv/{BOWTrainer.ts => BOWTrainer.d.ts} (100%) rename src/types/opencv/{BackgroundSubtractor.ts => BackgroundSubtractor.d.ts} (100%) rename src/types/opencv/{BackgroundSubtractorMOG2.ts => BackgroundSubtractorMOG2.d.ts} (100%) rename src/types/opencv/{CascadeClassifier.ts => CascadeClassifier.d.ts} (100%) rename src/types/opencv/{DescriptorMatcher.ts => DescriptorMatcher.d.ts} (100%) rename src/types/opencv/{DynamicBitset.ts => DynamicBitset.d.ts} (100%) rename src/types/opencv/{Exception.ts => Exception.d.ts} (100%) rename src/types/opencv/{Feature2D.ts => Feature2D.d.ts} (100%) rename src/types/opencv/{FlannBasedMatcher.ts => FlannBasedMatcher.d.ts} (100%) rename src/types/opencv/{HOGDescriptor.ts => HOGDescriptor.d.ts} (100%) rename src/types/opencv/{Logger.ts => Logger.d.ts} (100%) rename src/types/opencv/{LshTable.ts => LshTable.d.ts} (100%) rename src/types/opencv/{Mat.ts => Mat.d.ts} (100%) rename src/types/opencv/{MatExpr.ts => MatExpr.d.ts} (100%) rename src/types/opencv/{MatOp.ts => MatOp.d.ts} (100%) rename src/types/opencv/{Matx.ts => Matx.d.ts} (100%) rename src/types/opencv/{Node.ts => Node.d.ts} (100%) rename src/types/opencv/{ORB.ts => ORB.d.ts} (100%) rename src/types/opencv/{PCA.ts => PCA.d.ts} (100%) rename src/types/opencv/{QRCodeDetector.ts => QRCodeDetector.d.ts} (100%) rename src/types/opencv/{QRCodeDetectorAruco.ts => QRCodeDetectorAruco.d.ts} (100%) rename src/types/opencv/{RotatedRect.ts => RotatedRect.d.ts} (100%) rename src/types/opencv/{Tracker.ts => Tracker.d.ts} (100%) rename src/types/opencv/{TrackerMIL.ts => TrackerMIL.d.ts} (100%) rename src/types/opencv/{_hacks.ts => _hacks.d.ts} (100%) rename src/types/opencv/{_types.ts => _types.d.ts} (100%) rename src/types/opencv/{calib3d.ts => calib3d.d.ts} (100%) rename src/types/opencv/{core_array.ts => core_array.d.ts} (100%) rename src/types/opencv/{core_cluster.ts => core_cluster.d.ts} (100%) rename src/types/opencv/{core_hal_interface.ts => core_hal_interface.d.ts} (100%) rename src/types/opencv/{core_utils.ts => core_utils.d.ts} (100%) rename src/types/opencv/{dnn.ts => dnn.d.ts} (100%) rename src/types/opencv/{features2d_draw.ts => features2d_draw.d.ts} (100%) rename src/types/opencv/{fisheye.ts => fisheye.d.ts} (100%) rename src/types/opencv/{imgproc_color_conversions.ts => imgproc_color_conversions.d.ts} (100%) rename src/types/opencv/{imgproc_colormap.ts => imgproc_colormap.d.ts} (100%) rename src/types/opencv/{imgproc_draw.ts => imgproc_draw.d.ts} (100%) rename src/types/opencv/{imgproc_feature.ts => imgproc_feature.d.ts} (100%) rename src/types/opencv/{imgproc_filter.ts => imgproc_filter.d.ts} (100%) rename src/types/opencv/{imgproc_hist.ts => imgproc_hist.d.ts} (100%) rename src/types/opencv/{imgproc_misc.ts => imgproc_misc.d.ts} (100%) rename src/types/opencv/{imgproc_object.ts => imgproc_object.d.ts} (100%) rename src/types/opencv/{imgproc_shape.ts => imgproc_shape.d.ts} (100%) rename src/types/opencv/{imgproc_transform.ts => imgproc_transform.d.ts} (100%) rename src/types/opencv/{index.ts => index.d.ts} (100%) rename src/types/opencv/{objdetect.ts => objdetect.d.ts} (100%) rename src/types/opencv/{photo_inpaint.ts => photo_inpaint.d.ts} (100%) rename src/types/opencv/{softdouble.ts => softdouble.d.ts} (100%) rename src/types/opencv/{softfloat.ts => softfloat.d.ts} (100%) rename src/types/opencv/{video_track.ts => video_track.d.ts} (100%) diff --git a/package.json b/package.json index 95bf355..3f79e16 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "4.12.0-release.1", "description": "OpenCV JavaScript version for node.js or browser", "main": "dist/opencv.js", - "types": "dist/src/index.d.ts", + "types": "src/index.d.ts", "files": [ "dist/", "src/" diff --git a/src/index.ts b/src/index.d.ts similarity index 100% rename from src/index.ts rename to src/index.d.ts diff --git a/src/types/_cv.ts b/src/types/_cv.d.ts similarity index 100% rename from src/types/_cv.ts rename to src/types/_cv.d.ts diff --git a/src/types/emscripten.ts b/src/types/emscripten.d.ts similarity index 100% rename from src/types/emscripten.ts rename to src/types/emscripten.d.ts diff --git a/src/types/opencv/Affine3.ts b/src/types/opencv/Affine3.d.ts similarity index 100% rename from src/types/opencv/Affine3.ts rename to src/types/opencv/Affine3.d.ts diff --git a/src/types/opencv/Algorithm.ts b/src/types/opencv/Algorithm.d.ts similarity index 100% rename from src/types/opencv/Algorithm.ts rename to src/types/opencv/Algorithm.d.ts diff --git a/src/types/opencv/AutoBuffer.ts b/src/types/opencv/AutoBuffer.d.ts similarity index 100% rename from src/types/opencv/AutoBuffer.ts rename to src/types/opencv/AutoBuffer.d.ts diff --git a/src/types/opencv/BFMatcher.ts b/src/types/opencv/BFMatcher.d.ts similarity index 100% rename from src/types/opencv/BFMatcher.ts rename to src/types/opencv/BFMatcher.d.ts diff --git a/src/types/opencv/BOWTrainer.ts b/src/types/opencv/BOWTrainer.d.ts similarity index 100% rename from src/types/opencv/BOWTrainer.ts rename to src/types/opencv/BOWTrainer.d.ts diff --git a/src/types/opencv/BackgroundSubtractor.ts b/src/types/opencv/BackgroundSubtractor.d.ts similarity index 100% rename from src/types/opencv/BackgroundSubtractor.ts rename to src/types/opencv/BackgroundSubtractor.d.ts diff --git a/src/types/opencv/BackgroundSubtractorMOG2.ts b/src/types/opencv/BackgroundSubtractorMOG2.d.ts similarity index 100% rename from src/types/opencv/BackgroundSubtractorMOG2.ts rename to src/types/opencv/BackgroundSubtractorMOG2.d.ts diff --git a/src/types/opencv/CascadeClassifier.ts b/src/types/opencv/CascadeClassifier.d.ts similarity index 100% rename from src/types/opencv/CascadeClassifier.ts rename to src/types/opencv/CascadeClassifier.d.ts diff --git a/src/types/opencv/DescriptorMatcher.ts b/src/types/opencv/DescriptorMatcher.d.ts similarity index 100% rename from src/types/opencv/DescriptorMatcher.ts rename to src/types/opencv/DescriptorMatcher.d.ts diff --git a/src/types/opencv/DynamicBitset.ts b/src/types/opencv/DynamicBitset.d.ts similarity index 100% rename from src/types/opencv/DynamicBitset.ts rename to src/types/opencv/DynamicBitset.d.ts diff --git a/src/types/opencv/Exception.ts b/src/types/opencv/Exception.d.ts similarity index 100% rename from src/types/opencv/Exception.ts rename to src/types/opencv/Exception.d.ts diff --git a/src/types/opencv/Feature2D.ts b/src/types/opencv/Feature2D.d.ts similarity index 100% rename from src/types/opencv/Feature2D.ts rename to src/types/opencv/Feature2D.d.ts diff --git a/src/types/opencv/FlannBasedMatcher.ts b/src/types/opencv/FlannBasedMatcher.d.ts similarity index 100% rename from src/types/opencv/FlannBasedMatcher.ts rename to src/types/opencv/FlannBasedMatcher.d.ts diff --git a/src/types/opencv/HOGDescriptor.ts b/src/types/opencv/HOGDescriptor.d.ts similarity index 100% rename from src/types/opencv/HOGDescriptor.ts rename to src/types/opencv/HOGDescriptor.d.ts diff --git a/src/types/opencv/Logger.ts b/src/types/opencv/Logger.d.ts similarity index 100% rename from src/types/opencv/Logger.ts rename to src/types/opencv/Logger.d.ts diff --git a/src/types/opencv/LshTable.ts b/src/types/opencv/LshTable.d.ts similarity index 100% rename from src/types/opencv/LshTable.ts rename to src/types/opencv/LshTable.d.ts diff --git a/src/types/opencv/Mat.ts b/src/types/opencv/Mat.d.ts similarity index 100% rename from src/types/opencv/Mat.ts rename to src/types/opencv/Mat.d.ts diff --git a/src/types/opencv/MatExpr.ts b/src/types/opencv/MatExpr.d.ts similarity index 100% rename from src/types/opencv/MatExpr.ts rename to src/types/opencv/MatExpr.d.ts diff --git a/src/types/opencv/MatOp.ts b/src/types/opencv/MatOp.d.ts similarity index 100% rename from src/types/opencv/MatOp.ts rename to src/types/opencv/MatOp.d.ts diff --git a/src/types/opencv/Matx.ts b/src/types/opencv/Matx.d.ts similarity index 100% rename from src/types/opencv/Matx.ts rename to src/types/opencv/Matx.d.ts diff --git a/src/types/opencv/Node.ts b/src/types/opencv/Node.d.ts similarity index 100% rename from src/types/opencv/Node.ts rename to src/types/opencv/Node.d.ts diff --git a/src/types/opencv/ORB.ts b/src/types/opencv/ORB.d.ts similarity index 100% rename from src/types/opencv/ORB.ts rename to src/types/opencv/ORB.d.ts diff --git a/src/types/opencv/PCA.ts b/src/types/opencv/PCA.d.ts similarity index 100% rename from src/types/opencv/PCA.ts rename to src/types/opencv/PCA.d.ts diff --git a/src/types/opencv/QRCodeDetector.ts b/src/types/opencv/QRCodeDetector.d.ts similarity index 100% rename from src/types/opencv/QRCodeDetector.ts rename to src/types/opencv/QRCodeDetector.d.ts diff --git a/src/types/opencv/QRCodeDetectorAruco.ts b/src/types/opencv/QRCodeDetectorAruco.d.ts similarity index 100% rename from src/types/opencv/QRCodeDetectorAruco.ts rename to src/types/opencv/QRCodeDetectorAruco.d.ts diff --git a/src/types/opencv/RotatedRect.ts b/src/types/opencv/RotatedRect.d.ts similarity index 100% rename from src/types/opencv/RotatedRect.ts rename to src/types/opencv/RotatedRect.d.ts diff --git a/src/types/opencv/Tracker.ts b/src/types/opencv/Tracker.d.ts similarity index 100% rename from src/types/opencv/Tracker.ts rename to src/types/opencv/Tracker.d.ts diff --git a/src/types/opencv/TrackerMIL.ts b/src/types/opencv/TrackerMIL.d.ts similarity index 100% rename from src/types/opencv/TrackerMIL.ts rename to src/types/opencv/TrackerMIL.d.ts diff --git a/src/types/opencv/_hacks.ts b/src/types/opencv/_hacks.d.ts similarity index 100% rename from src/types/opencv/_hacks.ts rename to src/types/opencv/_hacks.d.ts diff --git a/src/types/opencv/_types.ts b/src/types/opencv/_types.d.ts similarity index 100% rename from src/types/opencv/_types.ts rename to src/types/opencv/_types.d.ts diff --git a/src/types/opencv/calib3d.ts b/src/types/opencv/calib3d.d.ts similarity index 100% rename from src/types/opencv/calib3d.ts rename to src/types/opencv/calib3d.d.ts diff --git a/src/types/opencv/core_array.ts b/src/types/opencv/core_array.d.ts similarity index 100% rename from src/types/opencv/core_array.ts rename to src/types/opencv/core_array.d.ts diff --git a/src/types/opencv/core_cluster.ts b/src/types/opencv/core_cluster.d.ts similarity index 100% rename from src/types/opencv/core_cluster.ts rename to src/types/opencv/core_cluster.d.ts diff --git a/src/types/opencv/core_hal_interface.ts b/src/types/opencv/core_hal_interface.d.ts similarity index 100% rename from src/types/opencv/core_hal_interface.ts rename to src/types/opencv/core_hal_interface.d.ts diff --git a/src/types/opencv/core_utils.ts b/src/types/opencv/core_utils.d.ts similarity index 100% rename from src/types/opencv/core_utils.ts rename to src/types/opencv/core_utils.d.ts diff --git a/src/types/opencv/dnn.ts b/src/types/opencv/dnn.d.ts similarity index 100% rename from src/types/opencv/dnn.ts rename to src/types/opencv/dnn.d.ts diff --git a/src/types/opencv/features2d_draw.ts b/src/types/opencv/features2d_draw.d.ts similarity index 100% rename from src/types/opencv/features2d_draw.ts rename to src/types/opencv/features2d_draw.d.ts diff --git a/src/types/opencv/fisheye.ts b/src/types/opencv/fisheye.d.ts similarity index 100% rename from src/types/opencv/fisheye.ts rename to src/types/opencv/fisheye.d.ts diff --git a/src/types/opencv/imgproc_color_conversions.ts b/src/types/opencv/imgproc_color_conversions.d.ts similarity index 100% rename from src/types/opencv/imgproc_color_conversions.ts rename to src/types/opencv/imgproc_color_conversions.d.ts diff --git a/src/types/opencv/imgproc_colormap.ts b/src/types/opencv/imgproc_colormap.d.ts similarity index 100% rename from src/types/opencv/imgproc_colormap.ts rename to src/types/opencv/imgproc_colormap.d.ts diff --git a/src/types/opencv/imgproc_draw.ts b/src/types/opencv/imgproc_draw.d.ts similarity index 100% rename from src/types/opencv/imgproc_draw.ts rename to src/types/opencv/imgproc_draw.d.ts diff --git a/src/types/opencv/imgproc_feature.ts b/src/types/opencv/imgproc_feature.d.ts similarity index 100% rename from src/types/opencv/imgproc_feature.ts rename to src/types/opencv/imgproc_feature.d.ts diff --git a/src/types/opencv/imgproc_filter.ts b/src/types/opencv/imgproc_filter.d.ts similarity index 100% rename from src/types/opencv/imgproc_filter.ts rename to src/types/opencv/imgproc_filter.d.ts diff --git a/src/types/opencv/imgproc_hist.ts b/src/types/opencv/imgproc_hist.d.ts similarity index 100% rename from src/types/opencv/imgproc_hist.ts rename to src/types/opencv/imgproc_hist.d.ts diff --git a/src/types/opencv/imgproc_misc.ts b/src/types/opencv/imgproc_misc.d.ts similarity index 100% rename from src/types/opencv/imgproc_misc.ts rename to src/types/opencv/imgproc_misc.d.ts diff --git a/src/types/opencv/imgproc_object.ts b/src/types/opencv/imgproc_object.d.ts similarity index 100% rename from src/types/opencv/imgproc_object.ts rename to src/types/opencv/imgproc_object.d.ts diff --git a/src/types/opencv/imgproc_shape.ts b/src/types/opencv/imgproc_shape.d.ts similarity index 100% rename from src/types/opencv/imgproc_shape.ts rename to src/types/opencv/imgproc_shape.d.ts diff --git a/src/types/opencv/imgproc_transform.ts b/src/types/opencv/imgproc_transform.d.ts similarity index 100% rename from src/types/opencv/imgproc_transform.ts rename to src/types/opencv/imgproc_transform.d.ts diff --git a/src/types/opencv/index.ts b/src/types/opencv/index.d.ts similarity index 100% rename from src/types/opencv/index.ts rename to src/types/opencv/index.d.ts diff --git a/src/types/opencv/objdetect.ts b/src/types/opencv/objdetect.d.ts similarity index 100% rename from src/types/opencv/objdetect.ts rename to src/types/opencv/objdetect.d.ts diff --git a/src/types/opencv/photo_inpaint.ts b/src/types/opencv/photo_inpaint.d.ts similarity index 100% rename from src/types/opencv/photo_inpaint.ts rename to src/types/opencv/photo_inpaint.d.ts diff --git a/src/types/opencv/softdouble.ts b/src/types/opencv/softdouble.d.ts similarity index 100% rename from src/types/opencv/softdouble.ts rename to src/types/opencv/softdouble.d.ts diff --git a/src/types/opencv/softfloat.ts b/src/types/opencv/softfloat.d.ts similarity index 100% rename from src/types/opencv/softfloat.ts rename to src/types/opencv/softfloat.d.ts diff --git a/src/types/opencv/video_track.ts b/src/types/opencv/video_track.d.ts similarity index 100% rename from src/types/opencv/video_track.ts rename to src/types/opencv/video_track.d.ts diff --git a/tsconfig.json b/tsconfig.json index 1da2a4c..361ce22 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,8 +8,10 @@ "sourceMap": true, "outDir": "./dist", "rootDir": ".", - "skipLibCheck": true, - "declaration": true + "noEmit": true, + "skipLibCheck": false, + "declaration": true, + "types": [], }, "include": ["src"] } From 55466d1e336809f4fefcc7f0a53445bf7750d7db Mon Sep 17 00:00:00 2001 From: ocavue Date: Thu, 13 Nov 2025 19:42:30 +1100 Subject: [PATCH 2/2] Improve some types --- src/types/opencv/Feature2D.d.ts | 2 +- src/types/opencv/ORB.d.ts | 2 +- src/types/opencv/RotatedRect.d.ts | 3 ++- src/types/opencv/_hacks.d.ts | 9 ++++++--- src/types/opencv/core_array.d.ts | 14 +++++++------- src/types/opencv/imgproc_color_conversions.d.ts | 2 +- src/types/opencv/imgproc_filter.d.ts | 6 +++--- src/types/opencv/imgproc_misc.d.ts | 16 ++++++++-------- src/types/opencv/imgproc_shape.d.ts | 12 ++++++------ src/types/opencv/imgproc_transform.d.ts | 6 +++--- 10 files changed, 38 insertions(+), 34 deletions(-) diff --git a/src/types/opencv/Feature2D.d.ts b/src/types/opencv/Feature2D.d.ts index b585fff..509e8d8 100644 --- a/src/types/opencv/Feature2D.d.ts +++ b/src/types/opencv/Feature2D.d.ts @@ -1,7 +1,7 @@ import type { Algorithm, KeyPointVector, Mat, OutputArray } from "./_types"; /** - * https://docs.opencv.org/master/d0/d13/classcv_1_1Feature2D.html + * https://docs.opencv.org/4.12.0/d0/d13/classcv_1_1Feature2D.html */ export declare class Feature2D extends Algorithm { /** diff --git a/src/types/opencv/ORB.d.ts b/src/types/opencv/ORB.d.ts index 6acf187..48b58e6 100644 --- a/src/types/opencv/ORB.d.ts +++ b/src/types/opencv/ORB.d.ts @@ -1,7 +1,7 @@ import type { Feature2D, float, int } from "./_types"; /** - * https://docs.opencv.org/master/db/d95/classcv_1_1ORB.html + * https://docs.opencv.org/4.12.0/db/d95/classcv_1_1ORB.html */ export declare class ORB extends Feature2D { public constructor( diff --git a/src/types/opencv/RotatedRect.d.ts b/src/types/opencv/RotatedRect.d.ts index 241c6b4..7b99193 100644 --- a/src/types/opencv/RotatedRect.d.ts +++ b/src/types/opencv/RotatedRect.d.ts @@ -63,7 +63,8 @@ export declare class RotatedRect { public static boundingRect2f(rect: RotatedRect): Rect; /** - returns 4 vertices of the rectangle + * returns 4 vertices of the rectangle + * * @param rect The rotated rectangle * @returns Array of 4 points in order: bottomLeft, topLeft, topRight, bottomRight */ diff --git a/src/types/opencv/_hacks.d.ts b/src/types/opencv/_hacks.d.ts index 98c8d4d..56456ad 100644 --- a/src/types/opencv/_hacks.d.ts +++ b/src/types/opencv/_hacks.d.ts @@ -1,5 +1,11 @@ // Scalar, Point, Rect, etc are defined by opencv.js (helpers.js) and we need to declare them manually: +import { Algorithm } from "./Algorithm"; +import { RotatedRect } from "./RotatedRect"; +import type { NormTypes } from './core_array' +import { Mat } from './Mat' +import type { LineTypes } from './imgproc_draw' + export declare class Range { public start: number; public end: number; @@ -92,9 +98,6 @@ export declare function FS_createDataFile( canOwn: boolean, ): any; -import { Algorithm, type LineTypes, Mat, type NormTypes, RotatedRect } from "."; -import "../_cv"; - /** * Base class for Contrast Limited Adaptive Histogram Equalization. */ diff --git a/src/types/opencv/core_array.d.ts b/src/types/opencv/core_array.d.ts index 24f264a..7c1b622 100644 --- a/src/types/opencv/core_array.d.ts +++ b/src/types/opencv/core_array.d.ts @@ -3051,7 +3051,7 @@ export declare const ROTATE_90_COUNTERCLOCKWISE: RotateFlags; // initializer: = * [borderInterpolate], [copyMakeBorder] * */ -export type BorderTypes = any; +export type BorderTypes = number; /** * Various border types, image boundaries are denoted with `|` @@ -3059,7 +3059,7 @@ export type BorderTypes = any; * [borderInterpolate], [copyMakeBorder] * */ -export type CmpTypes = any; +export type CmpTypes = number; /** * Various border types, image boundaries are denoted with `|` @@ -3067,7 +3067,7 @@ export type CmpTypes = any; * [borderInterpolate], [copyMakeBorder] * */ -export type DecompTypes = any; +export type DecompTypes = number; /** * Various border types, image boundaries are denoted with `|` @@ -3075,7 +3075,7 @@ export type DecompTypes = any; * [borderInterpolate], [copyMakeBorder] * */ -export type DftFlags = any; +export type DftFlags = number; /** * Various border types, image boundaries are denoted with `|` @@ -3083,7 +3083,7 @@ export type DftFlags = any; * [borderInterpolate], [copyMakeBorder] * */ -export type GemmFlags = any; +export type GemmFlags = number; /** * Various border types, image boundaries are denoted with `|` @@ -3091,7 +3091,7 @@ export type GemmFlags = any; * [borderInterpolate], [copyMakeBorder] * */ -export type NormTypes = any; +export type NormTypes = number; /** * Various border types, image boundaries are denoted with `|` @@ -3099,4 +3099,4 @@ export type NormTypes = any; * [borderInterpolate], [copyMakeBorder] * */ -export type RotateFlags = any; +export type RotateFlags = number; diff --git a/src/types/opencv/imgproc_color_conversions.d.ts b/src/types/opencv/imgproc_color_conversions.d.ts index 3bf45f6..4061df0 100644 --- a/src/types/opencv/imgproc_color_conversions.d.ts +++ b/src/types/opencv/imgproc_color_conversions.d.ts @@ -524,4 +524,4 @@ export declare const COLOR_COLORCVT_MAX: ColorConversionCodes; // initializer: = * [Color conversions] * */ -export type ColorConversionCodes = any; +export type ColorConversionCodes = number; diff --git a/src/types/opencv/imgproc_filter.d.ts b/src/types/opencv/imgproc_filter.d.ts index d528122..7cbc0bf 100644 --- a/src/types/opencv/imgproc_filter.d.ts +++ b/src/types/opencv/imgproc_filter.d.ts @@ -911,8 +911,8 @@ export declare const MORPH_HITMISS: MorphTypes; // initializer: = 7 export declare const FILTER_SCHARR: SpecialFilter; // initializer: = -1 -export type MorphShapes = any; +export type MorphShapes = number; -export type MorphTypes = any; +export type MorphTypes = number; -export type SpecialFilter = any; +export type SpecialFilter = number; diff --git a/src/types/opencv/imgproc_misc.d.ts b/src/types/opencv/imgproc_misc.d.ts index b46f435..ab2de54 100644 --- a/src/types/opencv/imgproc_misc.d.ts +++ b/src/types/opencv/imgproc_misc.d.ts @@ -557,7 +557,7 @@ export declare const THRESH_TRIANGLE: ThresholdTypes; // initializer: = 16 * [adaptiveThreshold] * */ -export type AdaptiveThresholdTypes = any; +export type AdaptiveThresholdTypes = number; /** * adaptive threshold algorithm @@ -565,7 +565,7 @@ export type AdaptiveThresholdTypes = any; * [adaptiveThreshold] * */ -export type DistanceTransformLabelTypes = any; +export type DistanceTransformLabelTypes = number; /** * adaptive threshold algorithm @@ -573,7 +573,7 @@ export type DistanceTransformLabelTypes = any; * [adaptiveThreshold] * */ -export type DistanceTransformMasks = any; +export type DistanceTransformMasks = number; /** * adaptive threshold algorithm @@ -581,7 +581,7 @@ export type DistanceTransformMasks = any; * [adaptiveThreshold] * */ -export type DistanceTypes = any; +export type DistanceTypes = number; /** * adaptive threshold algorithm @@ -589,7 +589,7 @@ export type DistanceTypes = any; * [adaptiveThreshold] * */ -export type FloodFillFlags = any; +export type FloodFillFlags = number; /** * adaptive threshold algorithm @@ -597,7 +597,7 @@ export type FloodFillFlags = any; * [adaptiveThreshold] * */ -export type GrabCutClasses = any; +export type GrabCutClasses = number; /** * adaptive threshold algorithm @@ -605,7 +605,7 @@ export type GrabCutClasses = any; * [adaptiveThreshold] * */ -export type GrabCutModes = any; +export type GrabCutModes = number; /** * adaptive threshold algorithm @@ -613,4 +613,4 @@ export type GrabCutModes = any; * [adaptiveThreshold] * */ -export type ThresholdTypes = any; +export type ThresholdTypes = number; diff --git a/src/types/opencv/imgproc_shape.d.ts b/src/types/opencv/imgproc_shape.d.ts index 66a9ce1..1c4bfc6 100644 --- a/src/types/opencv/imgproc_shape.d.ts +++ b/src/types/opencv/imgproc_shape.d.ts @@ -715,14 +715,14 @@ export declare const CONTOURS_MATCH_I2: ShapeMatchModes; // initializer: =2 export declare const CONTOURS_MATCH_I3: ShapeMatchModes; // initializer: =3 -export type ConnectedComponentsAlgorithmsTypes = any; +export type ConnectedComponentsAlgorithmsTypes = number; -export type ConnectedComponentsTypes = any; +export type ConnectedComponentsTypes = number; -export type ContourApproximationModes = any; +export type ContourApproximationModes = number; -export type RectanglesIntersectTypes = any; +export type RectanglesIntersectTypes = number; -export type RetrievalModes = any; +export type RetrievalModes = number; -export type ShapeMatchModes = any; +export type ShapeMatchModes = number; diff --git a/src/types/opencv/imgproc_transform.d.ts b/src/types/opencv/imgproc_transform.d.ts index 1bb3d3e..f815acc 100644 --- a/src/types/opencv/imgproc_transform.d.ts +++ b/src/types/opencv/imgproc_transform.d.ts @@ -567,8 +567,8 @@ export declare const WARP_POLAR_LINEAR: WarpPolarMode; // initializer: = 0 export declare const WARP_POLAR_LOG: WarpPolarMode; // initializer: = 256 -export type InterpolationFlags = any; +export type InterpolationFlags = number; -export type InterpolationMasks = any; +export type InterpolationMasks = number; -export type WarpPolarMode = any; +export type WarpPolarMode = number;