opencv4nodejs
opencv4nodejs copied to clipboard
Async version of VideoCapture
Is there a non blocking version of VideoCapture(or plans to implement)? Right now the only way to leverage all cpus is to use cluster module. Thanks.
Yes, you can use cap.readAsync().
@justadudewhohacks Hi I mean this:
const vc = new cv.VideoCapture(http url);
const mat = await vc.readAsync();
new cv.VideoCapture(http url)
is blocking, for me it take ~3 seconds to complete.
Is it possible to make it async?
@justadudewhohacks Hi I mean this:
const vc = new cv.VideoCapture(http url); const mat = await vc.readAsync();
new cv.VideoCapture(http url)is blocking, for me it take ~3 seconds to complete.Is it possible to make it async?
I have the same problem, the unique way seems to use it in external process or workers but is a bit tricky and not so elegant. I'm tempted to use Python instead of using OpenCV in this way...