-
-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Labels
Description
Acknowledgements
- I read the documentation and searched existing issues to avoid duplicates
- I understand this is a bug tracker and anything other than a proven bug will be closed
- I understand this is a free project and relies on community contributions
- I read and understood the Contribution guide
Minimal reproduction URL
Problem & expected behavior (under 200 words)
Skip this section and let your reproduction do the talking...
- test.ts
import cvModule, { CV } from "@techstark/opencv-js";
async function getOpenCv():Promise<{ cv: CV }> {
let cv;
if (cvModule instanceof Promise) {
cv = await cvModule;
} else {
await new Promise((resolve) => {
cvModule.onRuntimeInitialized = () => resolve(1);
});
cv = cvModule;
}
return { cv };
}
async function main() {
const { cv } = await getOpenCv();
console.log("OpenCV.js is ready!");
// You can now use OpenCV functions here
console.log(cv.getBuildInformation());
let mat=new cv.Mat(100,100,cv.CV_8UC3,new cv.Scalar(255,0,0))
cv.imshow("mat:",mat)
}
main();Run command:
tsx ./test.ts
But if you really need to explain, keep it under 200 words:
- What happened
- The program frantically outputs commands to the command line, causing it to freeze and crash.
- What I expected
- Normal operation
- Error stack trace
- Unable to track, the program outputs incessantly, causing the editor to freeze.
- Documentation links
- Screenshots
Bugs are expected to be fixed by those affected by it
- I'm interested in working on this issue
Compensating engineering work will speed up resolution and support the project
- I'm willing to offer $10 for financial support