Missing getStucturingElement and morphologyEx
Hello,
I'm trying to translate a text classifier that uses morphology algorithms. Uefotunately, they dont seem to be present on node-opencv. Would it be possible to expose these functions?
Thanks,
xkxx
really sad, any news on that?
👍
http://docs.opencv.org/trunk/d9/d61/tutorial_py_morphological_ops.html
+1
http://docs.opencv.org/trunk/d9/d61/tutorial_py_morphological_ops.html
Just wanted to add that morphologyEx (i.e. opening and closing) as indicated by @kaue as follows:
Closing:
const kernel = cv.imgproc.getStructuringElement(2, [eps, eps]);
image.dilate(1, kernel);
image.erode(1, kernel);
Opening:
const kernel = cv.imgproc.getStructuringElement(2, [eps, eps]);
image.erode(1, kernel);
image.dilate(1, kernel);
Note for the docs about iterations from the docs
The number of iterations is the number of times erosion or dilatation operation will be applied. For instance, an opening operation (MORPH_OPEN) with two iterations is equivalent to apply successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).
Thanks @kaue