-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance question for NodeJs #36
Comments
Hi, forgot to mention that I used the same input image as in the tutorial, which has even a lower resolution (402x402) as in the forum link above. Could the cause be:
Kind regards, |
Hi, first off, I'm also not an expert. Do you use the wasm or asm.js version? In this repo, there is only the asm.js version. Webassembly should be a bit faster than asm.js. Best |
Hi Joe, Thanks for your help!! It seems a good suggestion to use the PR (which I have voted). And I also don't understand why - in case of WebAssembly - the xxx.js need to be loaded instead of the xxx.wasm file, like they do here. Thanks again, |
Hi, hm... I'm not sure about node. I have only used it on the clientside. I think you load the js because it contains the module structure. I think, this will be different in node and I'm also not perfectly sure if the version you obtained via npm is the same as the one in this repo. I just realized, that now also in the official opencv repo there is a js build version and a js tutorial, which appear to be related to but maybe newer/more active than this repository. |
Dear,
I started yesterday developing a Node-Red contribution, to allow OpenCv.js to be used in our dataflows. Must admit that I'm new to OpenCv, but I'm already very enthousiastic about this project!
I tried the Canny Edge Detection example from npm, but the performance was not really what I expected. I executed the tests on my Raspberry Pi 3 running NodeJs version 7.9.0.
Issue 1 - descending execution duration
I repeated the same test (on the same image) a couple of times, and the execution durations were descending (and becoming rather stable after about 3 tests):
And even the CPU consumption was descending:
Does this make any sense?
Issue 2 - high execution duration
Don't know about native OpenCv performance, but for example on this forum I found following measurement:
A pure OpenCV VideoCapture vc(0) grabbing loop (no display, no waitKey) gets about 30 fps at 640x480 with nearly no CPU load. Adding a Canny edge filter, I still get 30 fps at 640x480 but CPU load increases to 250% (out of the 400% for all cores).
I realize that (w)asm is slower than native C++, but are my execution times normal? If not normal, is there any kind of troubleshooting I can do to find the root cause?
I would also have expected that more CPU would be used in this case, but it seems only a single core is being used. Hopefully somebody can help me out ...
Thanks a lot !!!
Bart Butenaers
The text was updated successfully, but these errors were encountered: