How would you do morphological closing with JS?
I have tried some known image processing libraries for JS like Pixastic but I cannot find there any related closing function.
If you use Processing.js, you seem to have dilation and erosion filters available (at least they appear in the documentation). Closing is a combination of these, i.e.:
Close = Dilate + Erode