@techstark/opencv-js 4.8.0-release.7 → 4.8.0-release.8
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/src/index.d.ts +1 -0
- package/dist/src/index.js +18 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/types/_cv.d.ts +7 -0
- package/dist/src/types/_cv.js +3 -0
- package/dist/src/types/_cv.js.map +1 -0
- package/dist/src/types/emscripten.d.ts +166 -0
- package/dist/src/types/emscripten.js +4 -0
- package/dist/src/types/emscripten.js.map +1 -0
- package/dist/src/types/opencv/Affine3.d.ts +183 -0
- package/dist/src/types/opencv/Affine3.js +3 -0
- package/dist/src/types/opencv/Affine3.js.map +1 -0
- package/dist/src/types/opencv/Algorithm.d.ts +105 -0
- package/dist/src/types/opencv/Algorithm.js +4 -0
- package/dist/src/types/opencv/Algorithm.js.map +1 -0
- package/dist/src/types/opencv/AutoBuffer.d.ts +41 -0
- package/dist/src/types/opencv/AutoBuffer.js +3 -0
- package/dist/src/types/opencv/AutoBuffer.js.map +1 -0
- package/dist/src/types/opencv/BFMatcher.d.ts +33 -0
- package/dist/src/types/opencv/BFMatcher.js +3 -0
- package/dist/src/types/opencv/BFMatcher.js.map +1 -0
- package/dist/src/types/opencv/BOWTrainer.d.ts +36 -0
- package/dist/src/types/opencv/BOWTrainer.js +3 -0
- package/dist/src/types/opencv/BOWTrainer.js.map +1 -0
- package/dist/src/types/opencv/CascadeClassifier.d.ts +100 -0
- package/dist/src/types/opencv/CascadeClassifier.js +4 -0
- package/dist/src/types/opencv/CascadeClassifier.js.map +1 -0
- package/dist/src/types/opencv/DescriptorMatcher.d.ts +172 -0
- package/dist/src/types/opencv/DescriptorMatcher.js +3 -0
- package/dist/src/types/opencv/DescriptorMatcher.js.map +1 -0
- package/dist/src/types/opencv/DynamicBitset.d.ts +57 -0
- package/dist/src/types/opencv/DynamicBitset.js +3 -0
- package/dist/src/types/opencv/DynamicBitset.js.map +1 -0
- package/dist/src/types/opencv/Exception.d.ts +38 -0
- package/dist/src/types/opencv/Exception.js +3 -0
- package/dist/src/types/opencv/Exception.js.map +1 -0
- package/dist/src/types/opencv/Feature2D.d.ts +14 -0
- package/dist/src/types/opencv/Feature2D.js +4 -0
- package/dist/src/types/opencv/Feature2D.js.map +1 -0
- package/dist/src/types/opencv/FlannBasedMatcher.d.ts +41 -0
- package/dist/src/types/opencv/FlannBasedMatcher.js +3 -0
- package/dist/src/types/opencv/FlannBasedMatcher.js.map +1 -0
- package/dist/src/types/opencv/HOGDescriptor.d.ts +265 -0
- package/dist/src/types/opencv/HOGDescriptor.js +3 -0
- package/dist/src/types/opencv/HOGDescriptor.js.map +1 -0
- package/dist/src/types/opencv/Logger.d.ts +27 -0
- package/dist/src/types/opencv/Logger.js +3 -0
- package/dist/src/types/opencv/Logger.js.map +1 -0
- package/dist/src/types/opencv/LshTable.d.ts +67 -0
- package/dist/src/types/opencv/LshTable.js +3 -0
- package/dist/src/types/opencv/LshTable.js.map +1 -0
- package/dist/src/types/opencv/Mat.d.ts +1589 -0
- package/dist/src/types/opencv/Mat.js +3 -0
- package/dist/src/types/opencv/Mat.js.map +1 -0
- package/dist/src/types/opencv/MatExpr.d.ts +78 -0
- package/dist/src/types/opencv/MatExpr.js +4 -0
- package/dist/src/types/opencv/MatExpr.js.map +1 -0
- package/dist/src/types/opencv/MatOp.d.ts +29 -0
- package/dist/src/types/opencv/MatOp.js +3 -0
- package/dist/src/types/opencv/MatOp.js.map +1 -0
- package/dist/src/types/opencv/Matx.d.ts +84 -0
- package/dist/src/types/opencv/Matx.js +3 -0
- package/dist/src/types/opencv/Matx.js.map +1 -0
- package/dist/src/types/opencv/Node.d.ts +25 -0
- package/dist/src/types/opencv/Node.js +3 -0
- package/dist/src/types/opencv/Node.js.map +1 -0
- package/dist/src/types/opencv/ORB.d.ts +11 -0
- package/dist/src/types/opencv/ORB.js +4 -0
- package/dist/src/types/opencv/ORB.js.map +1 -0
- package/dist/src/types/opencv/PCA.d.ts +170 -0
- package/dist/src/types/opencv/PCA.js +3 -0
- package/dist/src/types/opencv/PCA.js.map +1 -0
- package/dist/src/types/opencv/RotatedRect.d.ts +63 -0
- package/dist/src/types/opencv/RotatedRect.js +3 -0
- package/dist/src/types/opencv/RotatedRect.js.map +1 -0
- package/dist/src/types/opencv/_hacks.d.ts +267 -0
- package/dist/src/types/opencv/_hacks.js +15 -0
- package/dist/src/types/opencv/_hacks.js.map +1 -0
- package/dist/src/types/opencv/_types.d.ts +44 -0
- package/dist/src/types/opencv/_types.js +61 -0
- package/dist/src/types/opencv/_types.js.map +1 -0
- package/dist/src/types/opencv/calib3d.d.ts +2180 -0
- package/dist/src/types/opencv/calib3d.js +3 -0
- package/dist/src/types/opencv/calib3d.js.map +1 -0
- package/dist/src/types/opencv/core_array.d.ts +2513 -0
- package/dist/src/types/opencv/core_array.js +3 -0
- package/dist/src/types/opencv/core_array.js.map +1 -0
- package/dist/src/types/opencv/core_cluster.d.ts +54 -0
- package/dist/src/types/opencv/core_cluster.js +3 -0
- package/dist/src/types/opencv/core_cluster.js.map +1 -0
- package/dist/src/types/opencv/core_hal_interface.d.ts +92 -0
- package/dist/src/types/opencv/core_hal_interface.js +3 -0
- package/dist/src/types/opencv/core_hal_interface.js.map +1 -0
- package/dist/src/types/opencv/core_utils.d.ts +510 -0
- package/dist/src/types/opencv/core_utils.js +3 -0
- package/dist/src/types/opencv/core_utils.js.map +1 -0
- package/dist/src/types/opencv/dnn.d.ts +336 -0
- package/dist/src/types/opencv/dnn.js +3 -0
- package/dist/src/types/opencv/dnn.js.map +1 -0
- package/dist/src/types/opencv/features2d_draw.d.ts +75 -0
- package/dist/src/types/opencv/features2d_draw.js +3 -0
- package/dist/src/types/opencv/features2d_draw.js.map +1 -0
- package/dist/src/types/opencv/imgproc_color_conversions.d.ts +299 -0
- package/dist/src/types/opencv/imgproc_color_conversions.js +3 -0
- package/dist/src/types/opencv/imgproc_color_conversions.js.map +1 -0
- package/dist/src/types/opencv/imgproc_draw.d.ts +502 -0
- package/dist/src/types/opencv/imgproc_draw.js +3 -0
- package/dist/src/types/opencv/imgproc_draw.js.map +1 -0
- package/dist/src/types/opencv/imgproc_feature.d.ts +533 -0
- package/dist/src/types/opencv/imgproc_feature.js +3 -0
- package/dist/src/types/opencv/imgproc_feature.js.map +1 -0
- package/dist/src/types/opencv/imgproc_filter.d.ts +689 -0
- package/dist/src/types/opencv/imgproc_filter.js +3 -0
- package/dist/src/types/opencv/imgproc_filter.js.map +1 -0
- package/dist/src/types/opencv/imgproc_hist.d.ts +291 -0
- package/dist/src/types/opencv/imgproc_hist.js +3 -0
- package/dist/src/types/opencv/imgproc_hist.js.map +1 -0
- package/dist/src/types/opencv/imgproc_misc.d.ts +473 -0
- package/dist/src/types/opencv/imgproc_misc.js +3 -0
- package/dist/src/types/opencv/imgproc_misc.js.map +1 -0
- package/dist/src/types/opencv/imgproc_object.d.ts +41 -0
- package/dist/src/types/opencv/imgproc_object.js +3 -0
- package/dist/src/types/opencv/imgproc_object.js.map +1 -0
- package/dist/src/types/opencv/imgproc_shape.d.ts +570 -0
- package/dist/src/types/opencv/imgproc_shape.js +3 -0
- package/dist/src/types/opencv/imgproc_shape.js.map +1 -0
- package/dist/src/types/opencv/imgproc_transform.d.ts +430 -0
- package/dist/src/types/opencv/imgproc_transform.js +3 -0
- package/dist/src/types/opencv/imgproc_transform.js.map +1 -0
- package/dist/src/types/opencv/index.d.ts +4 -0
- package/dist/src/types/opencv/index.js +19 -0
- package/dist/src/types/opencv/index.js.map +1 -0
- package/dist/src/types/opencv/objdetect.d.ts +43 -0
- package/dist/src/types/opencv/objdetect.js +3 -0
- package/dist/src/types/opencv/objdetect.js.map +1 -0
- package/dist/src/types/opencv/photo_inpaint.d.ts +25 -0
- package/dist/src/types/opencv/photo_inpaint.js +3 -0
- package/dist/src/types/opencv/photo_inpaint.js.map +1 -0
- package/dist/src/types/opencv/softdouble.d.ts +38 -0
- package/dist/src/types/opencv/softdouble.js +3 -0
- package/dist/src/types/opencv/softdouble.js.map +1 -0
- package/dist/src/types/opencv/softfloat.d.ts +38 -0
- package/dist/src/types/opencv/softfloat.js +3 -0
- package/dist/src/types/opencv/softfloat.js.map +1 -0
- package/dist/src/types/opencv/video_track.d.ts +276 -0
- package/dist/src/types/opencv/video_track.js +3 -0
- package/dist/src/types/opencv/video_track.js.map +1 -0
- package/package.json +5 -3
- package/src/index.ts +1 -0
- package/src/types/_cv.ts +6 -0
- package/src/types/emscripten.ts +286 -0
- package/src/types/opencv/Affine3.ts +206 -0
- package/src/types/opencv/Algorithm.ts +126 -0
- package/src/types/opencv/AutoBuffer.ts +50 -0
- package/src/types/opencv/BFMatcher.ts +37 -0
- package/src/types/opencv/BOWTrainer.ts +43 -0
- package/src/types/opencv/CascadeClassifier.ts +153 -0
- package/src/types/opencv/DescriptorMatcher.ts +244 -0
- package/src/types/opencv/DynamicBitset.ts +68 -0
- package/src/types/opencv/Exception.ts +54 -0
- package/src/types/opencv/Feature2D.ts +20 -0
- package/src/types/opencv/FlannBasedMatcher.ts +50 -0
- package/src/types/opencv/HOGDescriptor.ts +401 -0
- package/src/types/opencv/Logger.ts +34 -0
- package/src/types/opencv/LshTable.ts +81 -0
- package/src/types/opencv/Mat.ts +1764 -0
- package/src/types/opencv/MatExpr.ts +107 -0
- package/src/types/opencv/MatOp.ts +70 -0
- package/src/types/opencv/Matx.ts +228 -0
- package/src/types/opencv/Node.ts +33 -0
- package/src/types/opencv/ORB.ts +22 -0
- package/src/types/opencv/PCA.ts +204 -0
- package/src/types/opencv/RotatedRect.ts +72 -0
- package/src/types/opencv/_hacks.ts +322 -0
- package/src/types/opencv/_types.ts +44 -0
- package/src/types/opencv/calib3d.ts +2937 -0
- package/src/types/opencv/core_array.ts +3102 -0
- package/src/types/opencv/core_cluster.ts +81 -0
- package/src/types/opencv/core_hal_interface.ts +159 -0
- package/src/types/opencv/core_utils.ts +748 -0
- package/src/types/opencv/dnn.ts +505 -0
- package/src/types/opencv/features2d_draw.ts +114 -0
- package/src/types/opencv/imgproc_color_conversions.ts +527 -0
- package/src/types/opencv/imgproc_draw.ts +733 -0
- package/src/types/opencv/imgproc_feature.ts +681 -0
- package/src/types/opencv/imgproc_filter.ts +918 -0
- package/src/types/opencv/imgproc_hist.ts +399 -0
- package/src/types/opencv/imgproc_misc.ts +616 -0
- package/src/types/opencv/imgproc_object.ts +58 -0
- package/src/types/opencv/imgproc_shape.ts +734 -0
- package/src/types/opencv/imgproc_transform.ts +574 -0
- package/src/types/opencv/index.ts +4 -0
- package/src/types/opencv/objdetect.ts +103 -0
- package/src/types/opencv/photo_inpaint.ts +37 -0
- package/src/types/opencv/softdouble.ts +64 -0
- package/src/types/opencv/softfloat.ts +64 -0
- package/src/types/opencv/video_track.ts +372 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { bool, double, FileNode, InputArray, int, Mat, Ptr, Size } from "./_types";
|
|
2
|
+
export declare class CascadeClassifier extends Mat {
|
|
3
|
+
cc: Ptr;
|
|
4
|
+
constructor();
|
|
5
|
+
/**
|
|
6
|
+
* @param filename Name of the file from which the classifier is loaded.
|
|
7
|
+
*/
|
|
8
|
+
constructor(filename: String);
|
|
9
|
+
/**
|
|
10
|
+
* The function is parallelized with the TBB library.
|
|
11
|
+
*
|
|
12
|
+
* (Python) A face detection example using cascade classifiers can be found at
|
|
13
|
+
* opencv_source_code/samples/python/facedetect.py
|
|
14
|
+
*
|
|
15
|
+
* @param image Matrix of the type CV_8U containing an image where objects are detected.
|
|
16
|
+
*
|
|
17
|
+
* @param objects Vector of rectangles where each rectangle contains the detected object, the
|
|
18
|
+
* rectangles may be partially outside the original image.
|
|
19
|
+
*
|
|
20
|
+
* @param scaleFactor Parameter specifying how much the image size is reduced at each image scale.
|
|
21
|
+
*
|
|
22
|
+
* @param minNeighbors Parameter specifying how many neighbors each candidate rectangle should have
|
|
23
|
+
* to retain it.
|
|
24
|
+
*
|
|
25
|
+
* @param flags Parameter with the same meaning for an old cascade as in the function
|
|
26
|
+
* cvHaarDetectObjects. It is not used for a new cascade.
|
|
27
|
+
*
|
|
28
|
+
* @param minSize Minimum possible object size. Objects smaller than that are ignored.
|
|
29
|
+
*
|
|
30
|
+
* @param maxSize Maximum possible object size. Objects larger than that are ignored. If maxSize ==
|
|
31
|
+
* minSize model is evaluated on single scale.
|
|
32
|
+
*/
|
|
33
|
+
detectMultiScale(image: InputArray, objects: any, scaleFactor?: double, minNeighbors?: int, flags?: int, minSize?: Size, maxSize?: Size): InputArray;
|
|
34
|
+
/**
|
|
35
|
+
* This is an overloaded member function, provided for convenience. It differs from the above
|
|
36
|
+
* function only in what argument(s) it accepts.
|
|
37
|
+
*
|
|
38
|
+
* @param image Matrix of the type CV_8U containing an image where objects are detected.
|
|
39
|
+
*
|
|
40
|
+
* @param objects Vector of rectangles where each rectangle contains the detected object, the
|
|
41
|
+
* rectangles may be partially outside the original image.
|
|
42
|
+
*
|
|
43
|
+
* @param numDetections Vector of detection numbers for the corresponding objects. An object's number
|
|
44
|
+
* of detections is the number of neighboring positively classified rectangles that were joined
|
|
45
|
+
* together to form the object.
|
|
46
|
+
*
|
|
47
|
+
* @param scaleFactor Parameter specifying how much the image size is reduced at each image scale.
|
|
48
|
+
*
|
|
49
|
+
* @param minNeighbors Parameter specifying how many neighbors each candidate rectangle should have
|
|
50
|
+
* to retain it.
|
|
51
|
+
*
|
|
52
|
+
* @param flags Parameter with the same meaning for an old cascade as in the function
|
|
53
|
+
* cvHaarDetectObjects. It is not used for a new cascade.
|
|
54
|
+
*
|
|
55
|
+
* @param minSize Minimum possible object size. Objects smaller than that are ignored.
|
|
56
|
+
*
|
|
57
|
+
* @param maxSize Maximum possible object size. Objects larger than that are ignored. If maxSize ==
|
|
58
|
+
* minSize model is evaluated on single scale.
|
|
59
|
+
*/
|
|
60
|
+
detectMultiScale(image: InputArray, objects: any, numDetections: any, scaleFactor?: double, minNeighbors?: int, flags?: int, minSize?: Size, maxSize?: Size): InputArray;
|
|
61
|
+
/**
|
|
62
|
+
* This is an overloaded member function, provided for convenience. It differs from the above
|
|
63
|
+
* function only in what argument(s) it accepts. This function allows you to retrieve the final stage
|
|
64
|
+
* decision certainty of classification. For this, one needs to set `outputRejectLevels` on true and
|
|
65
|
+
* provide the `rejectLevels` and `levelWeights` parameter. For each resulting detection,
|
|
66
|
+
* `levelWeights` will then contain the certainty of classification at the final stage. This value can
|
|
67
|
+
* then be used to separate strong from weaker classifications.
|
|
68
|
+
*
|
|
69
|
+
* A code sample on how to use it efficiently can be found below:
|
|
70
|
+
*
|
|
71
|
+
* ```cpp
|
|
72
|
+
* Mat img;
|
|
73
|
+
* vector<double> weights;
|
|
74
|
+
* vector<int> levels;
|
|
75
|
+
* vector<Rect> detections;
|
|
76
|
+
* CascadeClassifier model("/path/to/your/model.xml");
|
|
77
|
+
* model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
|
|
78
|
+
* cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
detectMultiScale(image: InputArray, objects: any, rejectLevels: any, levelWeights: any, scaleFactor?: double, minNeighbors?: int, flags?: int, minSize?: Size, maxSize?: Size, outputRejectLevels?: bool): InputArray;
|
|
82
|
+
empty(): bool;
|
|
83
|
+
getFeatureType(): int;
|
|
84
|
+
getMaskGenerator(): Ptr;
|
|
85
|
+
getOldCascade(): any;
|
|
86
|
+
getOriginalWindowSize(): Size;
|
|
87
|
+
isOldFormatCascade(): bool;
|
|
88
|
+
/**
|
|
89
|
+
* @param filename Name of the file from which the classifier is loaded. The file may contain an old
|
|
90
|
+
* HAAR classifier trained by the haartraining application or a new cascade classifier trained by the
|
|
91
|
+
* traincascade application.
|
|
92
|
+
*/
|
|
93
|
+
load(filename: String): String;
|
|
94
|
+
/**
|
|
95
|
+
* The file may contain a new cascade classifier (trained traincascade application) only.
|
|
96
|
+
*/
|
|
97
|
+
read(node: FileNode): FileNode;
|
|
98
|
+
setMaskGenerator(maskGenerator: Ptr): Ptr;
|
|
99
|
+
static convert(oldcascade: String, newcascade: String): String;
|
|
100
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CascadeClassifier.js","sourceRoot":"","sources":["../../../../src/types/opencv/CascadeClassifier.ts"],"names":[],"mappings":";;AAAA,qCASkB"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { bool, FileNode, FileStorage, float, InputArray, InputArrayOfArrays, int, Mat, Ptr } from "./_types";
|
|
2
|
+
/**
|
|
3
|
+
* It has two groups of match methods: for matching descriptors of an image with another image or with
|
|
4
|
+
* an image set.
|
|
5
|
+
*
|
|
6
|
+
* Source:
|
|
7
|
+
* [opencv2/features2d.hpp](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/features2d.hpp#L860).
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export declare class DescriptorMatcher {
|
|
11
|
+
/**
|
|
12
|
+
* If the collection is not empty, the new descriptors are added to existing train descriptors.
|
|
13
|
+
*
|
|
14
|
+
* @param descriptors Descriptors to add. Each descriptors[i] is a set of descriptors from the same
|
|
15
|
+
* train image.
|
|
16
|
+
*/
|
|
17
|
+
add(descriptors: InputArrayOfArrays): InputArrayOfArrays;
|
|
18
|
+
clear(): void;
|
|
19
|
+
/**
|
|
20
|
+
* @param emptyTrainData If emptyTrainData is false, the method creates a deep copy of the object,
|
|
21
|
+
* that is, copies both parameters and train data. If emptyTrainData is true, the method creates an
|
|
22
|
+
* object copy with the current parameters but with empty train data.
|
|
23
|
+
*/
|
|
24
|
+
clone(emptyTrainData?: bool): Ptr;
|
|
25
|
+
empty(): bool;
|
|
26
|
+
getTrainDescriptors(): Mat;
|
|
27
|
+
isMaskSupported(): bool;
|
|
28
|
+
/**
|
|
29
|
+
* These extended variants of [DescriptorMatcher::match] methods find several best matches for each
|
|
30
|
+
* query descriptor. The matches are returned in the distance increasing order. See
|
|
31
|
+
* [DescriptorMatcher::match] for the details about query and train descriptors.
|
|
32
|
+
*
|
|
33
|
+
* @param queryDescriptors Query set of descriptors.
|
|
34
|
+
*
|
|
35
|
+
* @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors
|
|
36
|
+
* collection stored in the class object.
|
|
37
|
+
*
|
|
38
|
+
* @param matches Matches. Each matches[i] is k or less matches for the same query descriptor.
|
|
39
|
+
*
|
|
40
|
+
* @param k Count of best matches found per each query descriptor or less if a query descriptor has
|
|
41
|
+
* less than k possible matches in total.
|
|
42
|
+
*
|
|
43
|
+
* @param mask Mask specifying permissible matches between an input query and train matrices of
|
|
44
|
+
* descriptors.
|
|
45
|
+
*
|
|
46
|
+
* @param compactResult Parameter used when the mask (or masks) is not empty. If compactResult is
|
|
47
|
+
* false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, the
|
|
48
|
+
* matches vector does not contain matches for fully masked-out query descriptors.
|
|
49
|
+
*/
|
|
50
|
+
knnMatch(queryDescriptors: InputArray, trainDescriptors: InputArray, matches: any, k: int, mask?: InputArray, compactResult?: bool): InputArray;
|
|
51
|
+
/**
|
|
52
|
+
* This is an overloaded member function, provided for convenience. It differs from the above
|
|
53
|
+
* function only in what argument(s) it accepts.
|
|
54
|
+
*
|
|
55
|
+
* @param queryDescriptors Query set of descriptors.
|
|
56
|
+
*
|
|
57
|
+
* @param matches Matches. Each matches[i] is k or less matches for the same query descriptor.
|
|
58
|
+
*
|
|
59
|
+
* @param k Count of best matches found per each query descriptor or less if a query descriptor has
|
|
60
|
+
* less than k possible matches in total.
|
|
61
|
+
*
|
|
62
|
+
* @param masks Set of masks. Each masks[i] specifies permissible matches between the input query
|
|
63
|
+
* descriptors and stored train descriptors from the i-th image trainDescCollection[i].
|
|
64
|
+
*
|
|
65
|
+
* @param compactResult Parameter used when the mask (or masks) is not empty. If compactResult is
|
|
66
|
+
* false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, the
|
|
67
|
+
* matches vector does not contain matches for fully masked-out query descriptors.
|
|
68
|
+
*/
|
|
69
|
+
knnMatch(queryDescriptors: InputArray, matches: any, k: int, masks?: InputArrayOfArrays, compactResult?: bool): InputArray;
|
|
70
|
+
/**
|
|
71
|
+
* In the first variant of this method, the train descriptors are passed as an input argument. In the
|
|
72
|
+
* second variant of the method, train descriptors collection that was set by [DescriptorMatcher::add]
|
|
73
|
+
* is used. Optional mask (or masks) can be passed to specify which query and training descriptors can
|
|
74
|
+
* be matched. Namely, queryDescriptors[i] can be matched with trainDescriptors[j] only if
|
|
75
|
+
* mask.at<uchar>(i,j) is non-zero.
|
|
76
|
+
*
|
|
77
|
+
* @param queryDescriptors Query set of descriptors.
|
|
78
|
+
*
|
|
79
|
+
* @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors
|
|
80
|
+
* collection stored in the class object.
|
|
81
|
+
*
|
|
82
|
+
* @param matches Matches. If a query descriptor is masked out in mask , no match is added for this
|
|
83
|
+
* descriptor. So, matches size may be smaller than the query descriptors count.
|
|
84
|
+
*
|
|
85
|
+
* @param mask Mask specifying permissible matches between an input query and train matrices of
|
|
86
|
+
* descriptors.
|
|
87
|
+
*/
|
|
88
|
+
match(queryDescriptors: InputArray, trainDescriptors: InputArray, matches: any, mask?: InputArray): InputArray;
|
|
89
|
+
/**
|
|
90
|
+
* This is an overloaded member function, provided for convenience. It differs from the above
|
|
91
|
+
* function only in what argument(s) it accepts.
|
|
92
|
+
*
|
|
93
|
+
* @param queryDescriptors Query set of descriptors.
|
|
94
|
+
*
|
|
95
|
+
* @param matches Matches. If a query descriptor is masked out in mask , no match is added for this
|
|
96
|
+
* descriptor. So, matches size may be smaller than the query descriptors count.
|
|
97
|
+
*
|
|
98
|
+
* @param masks Set of masks. Each masks[i] specifies permissible matches between the input query
|
|
99
|
+
* descriptors and stored train descriptors from the i-th image trainDescCollection[i].
|
|
100
|
+
*/
|
|
101
|
+
match(queryDescriptors: InputArray, matches: any, masks?: InputArrayOfArrays): InputArray;
|
|
102
|
+
/**
|
|
103
|
+
* For each query descriptor, the methods find such training descriptors that the distance between
|
|
104
|
+
* the query descriptor and the training descriptor is equal or smaller than maxDistance. Found matches
|
|
105
|
+
* are returned in the distance increasing order.
|
|
106
|
+
*
|
|
107
|
+
* @param queryDescriptors Query set of descriptors.
|
|
108
|
+
*
|
|
109
|
+
* @param trainDescriptors Train set of descriptors. This set is not added to the train descriptors
|
|
110
|
+
* collection stored in the class object.
|
|
111
|
+
*
|
|
112
|
+
* @param matches Found matches.
|
|
113
|
+
*
|
|
114
|
+
* @param maxDistance Threshold for the distance between matched descriptors. Distance means here
|
|
115
|
+
* metric distance (e.g. Hamming distance), not the distance between coordinates (which is measured in
|
|
116
|
+
* Pixels)!
|
|
117
|
+
*
|
|
118
|
+
* @param mask Mask specifying permissible matches between an input query and train matrices of
|
|
119
|
+
* descriptors.
|
|
120
|
+
*
|
|
121
|
+
* @param compactResult Parameter used when the mask (or masks) is not empty. If compactResult is
|
|
122
|
+
* false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, the
|
|
123
|
+
* matches vector does not contain matches for fully masked-out query descriptors.
|
|
124
|
+
*/
|
|
125
|
+
radiusMatch(queryDescriptors: InputArray, trainDescriptors: InputArray, matches: any, maxDistance: float, mask?: InputArray, compactResult?: bool): InputArray;
|
|
126
|
+
/**
|
|
127
|
+
* This is an overloaded member function, provided for convenience. It differs from the above
|
|
128
|
+
* function only in what argument(s) it accepts.
|
|
129
|
+
*
|
|
130
|
+
* @param queryDescriptors Query set of descriptors.
|
|
131
|
+
*
|
|
132
|
+
* @param matches Found matches.
|
|
133
|
+
*
|
|
134
|
+
* @param maxDistance Threshold for the distance between matched descriptors. Distance means here
|
|
135
|
+
* metric distance (e.g. Hamming distance), not the distance between coordinates (which is measured in
|
|
136
|
+
* Pixels)!
|
|
137
|
+
*
|
|
138
|
+
* @param masks Set of masks. Each masks[i] specifies permissible matches between the input query
|
|
139
|
+
* descriptors and stored train descriptors from the i-th image trainDescCollection[i].
|
|
140
|
+
*
|
|
141
|
+
* @param compactResult Parameter used when the mask (or masks) is not empty. If compactResult is
|
|
142
|
+
* false, the matches vector has the same size as queryDescriptors rows. If compactResult is true, the
|
|
143
|
+
* matches vector does not contain matches for fully masked-out query descriptors.
|
|
144
|
+
*/
|
|
145
|
+
radiusMatch(queryDescriptors: InputArray, matches: any, maxDistance: float, masks?: InputArrayOfArrays, compactResult?: bool): InputArray;
|
|
146
|
+
read(fileName: String): String;
|
|
147
|
+
read(fn: FileNode): FileNode;
|
|
148
|
+
/**
|
|
149
|
+
* Trains a descriptor matcher (for example, the flann index). In all methods to match, the method
|
|
150
|
+
* [train()] is run every time before matching. Some descriptor matchers (for example,
|
|
151
|
+
* BruteForceMatcher) have an empty implementation of this method. Other matchers really train their
|
|
152
|
+
* inner structures (for example, [FlannBasedMatcher] trains [flann::Index] ).
|
|
153
|
+
*/
|
|
154
|
+
train(): void;
|
|
155
|
+
write(fileName: String): String;
|
|
156
|
+
write(fs: FileStorage): FileStorage;
|
|
157
|
+
write(fs: Ptr, name?: String): Ptr;
|
|
158
|
+
/**
|
|
159
|
+
* @param descriptorMatcherType Descriptor matcher type. Now the following matcher types are
|
|
160
|
+
* supported:
|
|
161
|
+
* BruteForce (it uses L2 )BruteForce-L1BruteForce-HammingBruteForce-Hamming(2)FlannBased
|
|
162
|
+
*/
|
|
163
|
+
static create(descriptorMatcherType: String): Ptr;
|
|
164
|
+
static create(matcherType: any): Ptr;
|
|
165
|
+
}
|
|
166
|
+
export declare const FLANNBASED: MatcherType;
|
|
167
|
+
export declare const BRUTEFORCE: MatcherType;
|
|
168
|
+
export declare const BRUTEFORCE_L1: MatcherType;
|
|
169
|
+
export declare const BRUTEFORCE_HAMMING: MatcherType;
|
|
170
|
+
export declare const BRUTEFORCE_HAMMINGLUT: MatcherType;
|
|
171
|
+
export declare const BRUTEFORCE_SL2: MatcherType;
|
|
172
|
+
export type MatcherType = any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DescriptorMatcher.js","sourceRoot":"","sources":["../../../../src/types/opencv/DescriptorMatcher.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { bool, size_t } from "./_types";
|
|
2
|
+
/**
|
|
3
|
+
* Class re-implementing the boost version of it This helps not depending on boost, it also does not do
|
|
4
|
+
* the bound checks and has a way to reset a block for speed
|
|
5
|
+
*
|
|
6
|
+
* Source:
|
|
7
|
+
* [opencv2/flann/dynamic_bitset.h](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/flann/dynamic_bitset.h#L150).
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export declare class DynamicBitset {
|
|
11
|
+
/**
|
|
12
|
+
* default constructor
|
|
13
|
+
*/
|
|
14
|
+
constructor();
|
|
15
|
+
/**
|
|
16
|
+
* only constructor we use in our code
|
|
17
|
+
*
|
|
18
|
+
* @param sz the size of the bitset (in bits)
|
|
19
|
+
*/
|
|
20
|
+
constructor(sz: size_t);
|
|
21
|
+
/**
|
|
22
|
+
* Sets all the bits to 0
|
|
23
|
+
*/
|
|
24
|
+
clear(): void;
|
|
25
|
+
/**
|
|
26
|
+
* true if the bitset is empty
|
|
27
|
+
*/
|
|
28
|
+
empty(): bool;
|
|
29
|
+
/**
|
|
30
|
+
* set all the bits to 0
|
|
31
|
+
*/
|
|
32
|
+
reset(): void;
|
|
33
|
+
reset(index: size_t): void;
|
|
34
|
+
reset_block(index: size_t): void;
|
|
35
|
+
/**
|
|
36
|
+
* resize the bitset so that it contains at least sz bits
|
|
37
|
+
*/
|
|
38
|
+
resize(sz: size_t): void;
|
|
39
|
+
/**
|
|
40
|
+
* set a bit to true
|
|
41
|
+
*
|
|
42
|
+
* @param index the index of the bit to set to 1
|
|
43
|
+
*/
|
|
44
|
+
set(index: size_t): void;
|
|
45
|
+
/**
|
|
46
|
+
* gives the number of contained bits
|
|
47
|
+
*/
|
|
48
|
+
size(): size_t;
|
|
49
|
+
/**
|
|
50
|
+
* check if a bit is set
|
|
51
|
+
*
|
|
52
|
+
* true if the bit is set
|
|
53
|
+
*
|
|
54
|
+
* @param index the index of the bit to check
|
|
55
|
+
*/
|
|
56
|
+
test(index: size_t): bool;
|
|
57
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DynamicBitset.js","sourceRoot":"","sources":["../../../../src/types/opencv/DynamicBitset.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { int } from "./_types";
|
|
2
|
+
/**
|
|
3
|
+
* This class encapsulates all or almost all necessary information about the error happened in the
|
|
4
|
+
* program. The exception is usually constructed and thrown implicitly via CV_Error and CV_Error_
|
|
5
|
+
* macros.
|
|
6
|
+
*
|
|
7
|
+
* [error](#db/de0/group__core__utils_1gacbd081fdb20423a63cf731569ba70b2b})
|
|
8
|
+
*
|
|
9
|
+
* Source:
|
|
10
|
+
* [opencv2/core.hpp](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/core.hpp#L135).
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export declare class Exception {
|
|
14
|
+
/**
|
|
15
|
+
* CVStatus
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
code: int;
|
|
19
|
+
err: String;
|
|
20
|
+
file: String;
|
|
21
|
+
func: String;
|
|
22
|
+
line: int;
|
|
23
|
+
msg: String;
|
|
24
|
+
/**
|
|
25
|
+
* Default constructor
|
|
26
|
+
*/
|
|
27
|
+
constructor();
|
|
28
|
+
/**
|
|
29
|
+
* Full constructor. Normally the constructor is not called explicitly. Instead, the macros
|
|
30
|
+
* [CV_Error()], [CV_Error_()] and [CV_Assert()] are used.
|
|
31
|
+
*/
|
|
32
|
+
constructor(_code: int, _err: String, _func: String, _file: String, _line: int);
|
|
33
|
+
formatMessage(): void;
|
|
34
|
+
/**
|
|
35
|
+
* the error description and the context as a text string.
|
|
36
|
+
*/
|
|
37
|
+
what(): any;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Exception.js","sourceRoot":"","sources":["../../../../src/types/opencv/Exception.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Algorithm, KeyPointVector, Mat, OutputArray } from "./_types";
|
|
2
|
+
/**
|
|
3
|
+
* https://docs.opencv.org/4.8.0/d0/d13/classcv_1_1Feature2D.html
|
|
4
|
+
*/
|
|
5
|
+
export declare class Feature2D extends Algorithm {
|
|
6
|
+
/**
|
|
7
|
+
* Detects keypoints and computes the descriptors
|
|
8
|
+
* @param img
|
|
9
|
+
* @param mask
|
|
10
|
+
* @param keypoints
|
|
11
|
+
* @param descriptors
|
|
12
|
+
*/
|
|
13
|
+
detectAndCompute(img: Mat, mask: Mat, keypoints: KeyPointVector, descriptors: OutputArray): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Feature2D.js","sourceRoot":"","sources":["../../../../src/types/opencv/Feature2D.ts"],"names":[],"mappings":";;AAAA,qCAAuE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { bool, FileNode, FileStorage, InputArrayOfArrays, Ptr } from "./_types";
|
|
2
|
+
/**
|
|
3
|
+
* This matcher trains [cv::flann::Index](#d1/db2/classcv_1_1flann_1_1Index}) on a train descriptor
|
|
4
|
+
* collection and calls its nearest search methods to find the best matches. So, this matcher may be
|
|
5
|
+
* faster when matching a large train collection than the brute force matcher.
|
|
6
|
+
* [FlannBasedMatcher](#dc/de2/classcv_1_1FlannBasedMatcher}) does not support masking permissible
|
|
7
|
+
* matches of descriptor sets because [flann::Index](#d1/db2/classcv_1_1flann_1_1Index}) does not
|
|
8
|
+
* support this. :
|
|
9
|
+
*
|
|
10
|
+
* Source:
|
|
11
|
+
* [opencv2/features2d.hpp](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/features2d.hpp#L1187).
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export declare class FlannBasedMatcher {
|
|
15
|
+
constructor(indexParams?: Ptr, searchParams?: Ptr);
|
|
16
|
+
/**
|
|
17
|
+
* If the collection is not empty, the new descriptors are added to existing train descriptors.
|
|
18
|
+
*
|
|
19
|
+
* @param descriptors Descriptors to add. Each descriptors[i] is a set of descriptors from the same
|
|
20
|
+
* train image.
|
|
21
|
+
*/
|
|
22
|
+
add(descriptors: InputArrayOfArrays): InputArrayOfArrays;
|
|
23
|
+
clear(): void;
|
|
24
|
+
/**
|
|
25
|
+
* @param emptyTrainData If emptyTrainData is false, the method creates a deep copy of the object,
|
|
26
|
+
* that is, copies both parameters and train data. If emptyTrainData is true, the method creates an
|
|
27
|
+
* object copy with the current parameters but with empty train data.
|
|
28
|
+
*/
|
|
29
|
+
clone(emptyTrainData?: bool): Ptr;
|
|
30
|
+
isMaskSupported(): bool;
|
|
31
|
+
read(fn: FileNode): FileNode;
|
|
32
|
+
/**
|
|
33
|
+
* Trains a descriptor matcher (for example, the flann index). In all methods to match, the method
|
|
34
|
+
* [train()] is run every time before matching. Some descriptor matchers (for example,
|
|
35
|
+
* BruteForceMatcher) have an empty implementation of this method. Other matchers really train their
|
|
36
|
+
* inner structures (for example, [FlannBasedMatcher] trains [flann::Index] ).
|
|
37
|
+
*/
|
|
38
|
+
train(): void;
|
|
39
|
+
write(fs: FileStorage): FileStorage;
|
|
40
|
+
static create(): Ptr;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlannBasedMatcher.js","sourceRoot":"","sources":["../../../../src/types/opencv/FlannBasedMatcher.ts"],"names":[],"mappings":""}
|