But it runs on every platform with a webasm-enabled browser without installing or recompiling anything. It seems like a lot more potential users for a lot less work than targeting every hardware platform.
I wouldn't be so harsh; this was a self-directed learning project as part of a 12-week educational course. And they totally managed to get it working, which is no small feat given that WebAssembly only hit v1 a few months prior, and the tooling is still rather rough.
Wasm is very new, give it time. It will eventually get support for SIMD and maybe multi threading and GPU compute. It's amazing you can get results this good without all that though.
I wonder how much of the perf/feature diff is due to lack of simd or threads? I don't even know if OpenCV uses either (I'd be surprised if they didn't), but both features are coming to WebAssembly.
Regular python/C++ API is threaded (to some extent). Parts of the C++ API is GPU enabled. Simd - pretty sure, the library originated at Intel, after all.
It is so subpar compared to native, both in terms of time needed to reach the result (6 weeks 4 engineers) and fps (30 fps, no low pass filter, lots of noise and drop in the result...) that it confirms me that wasm is not ready for primetime. Overall, the web techonologies are loosing ground.
I wouldn't build any company around this technology.
In this demo, they're not writing code in JS. They're compiling C++ code to run in the browser's webasm runtime.
Same with ucisysarch's demos. All opencv.js does is add JS bindings to compiled C++ code. They could've made it output webasm just by adding a "-s WASM=1" to the g++/em++ flags.
I wonder why they didn't contribute directly to https://github.com/ucisysarch/opencvjs. It was suffering from a bit of code rot so a lot of the demos no longer work. But the ones that do are still pretty comprehensive in terms of opencv feature coverage (at least compared to the demo they built):
Canny w/ webcam: https://ucisysarch.github.io/opencvjs/examples/live/img_proc...
Colors, canny, blurs, contours, histogram, morphology: http://ucisysarch.github.io/opencvjs/examples/img_proc.html
And much more from: https://github.com/ucisysarch/opencvjs/tree/gh-pages/example....
Here's a much better demo of browser-based face detection and face tracking and other cool stuff:
I was just writing about using PNACL for a project the other day: http://www.doxsey.net/blog/juggle-tutor.
In some ways the death of PNACL is kind of sad - as I think it was probably a technically superior solution. But cross-browser support is nice.