-
Notifications
You must be signed in to change notification settings - Fork 106
Description
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):
- 8631 millisecs
- 1333 millisecs
- 1103 millisecs
- 591 millisecs
- 568 millisecs
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