@techstark/opencv-js 4.10.0-release.1 → 4.11.0-release.1

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/README.md CHANGED
@@ -1,14 +1,41 @@
1
1
  # opencv-js
2
2
 
3
- OpenCV JavaScript version (NPM package) for node.js or browser. Get started guide [OpenCV.js Tutorials](https://docs.opencv.org/4.10.0/#:~:text=OpenCV%2DPython%20Tutorials-,OpenCV.js%20Tutorials,-Tutorials%20for%20contrib).
3
+ OpenCV JavaScript version (NPM package) for node.js or browser. Get started guide [OpenCV.js Tutorials](https://docs.opencv.org/4.11.0/#:~:text=OpenCV%2DPython%20Tutorials-,OpenCV.js%20Tutorials,-Tutorials%20for%20contrib).
4
4
 
5
- The file `opencv.js` was downloaded from https://docs.opencv.org/4.10.0/opencv.js
5
+ The file `opencv.js` was downloaded from https://docs.opencv.org/4.11.0/opencv.js
6
6
 
7
7
  TypeScript is supported (thanks to `mirada`).
8
8
 
9
+ # Basic Usage
10
+
11
+ ## >=4.11
12
+
13
+ ```js
14
+ import cvReadyPromise from "@techstark/opencv-js";
15
+
16
+ async function main() {
17
+ const cv = await cvReadyPromise;
18
+ console.log("OpenCV.js is ready!");
19
+ // You can now use OpenCV functions here
20
+ console.log(cv.getBuildInformation());
21
+ }
22
+ ```
23
+
24
+ ## <=4.10
25
+
26
+ ```js
27
+ import cv from "@techstark/opencv-js";
28
+
29
+ cv.onRuntimeInitialized = () => {
30
+ console.log("OpenCV.js is ready!");
31
+ // You can now use OpenCV functions here
32
+ console.log(cv.getBuildInformation());
33
+ };
34
+ ```
35
+
9
36
  # Code Examples
10
37
 
11
- - See code examples (React, Angular) in [opencv-js-examples](https://github.com/TechStark/opencv-js-examples)
38
+ - See code examples (React, Angular, Node.js) in [opencv-js-examples](https://github.com/TechStark/opencv-js-examples)
12
39
 
13
40
  # Live Demo
14
41