
Experimenting with WebAssembly and Computer Vision - happy-go-lucky
https://hacks.mozilla.org/2017/09/bootcamps-webassembly-and-computer-vision/
======
batmansmk
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.

~~~
markdog12
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.

~~~
pletnes
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.

------
arnioxux
I wonder why they didn't contribute directly to
[https://github.com/ucisysarch/opencvjs](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...](https://ucisysarch.github.io/opencvjs/examples/live/img_proc.html)

Colors, canny, blurs, contours, histogram, morphology:
[http://ucisysarch.github.io/opencvjs/examples/img_proc.html](http://ucisysarch.github.io/opencvjs/examples/img_proc.html)

Detect face/eyes:
[http://ucisysarch.github.io/opencvjs/examples/face_detect.ht...](http://ucisysarch.github.io/opencvjs/examples/face_detect.html)

And much more from: [https://github.com/ucisysarch/opencvjs/tree/gh-
pages/example...](https://github.com/ucisysarch/opencvjs/tree/gh-
pages/examples).

~~~
sp332
In this demo, they're not writing code in JS. They're compiling C++ code to
run in the browser's webasm runtime.

~~~
arnioxux
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.

------
reuben_scratton
Here's a much better demo of browser-based face detection and face tracking
and other cool stuff:

[https://tastenkunst.github.io/brfv4_javascript_examples/](https://tastenkunst.github.io/brfv4_javascript_examples/)

------
cdoxsey
I was just writing about using PNACL for a project the other day:
[http://www.doxsey.net/blog/juggle-tutor](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.

