MarcoForte / closed-form-matting

Python implementation of A. Levin D. Lischinski and Y. Weiss. A Closed Form Solution to Natural Image Matting. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), June 2006, New York
MIT License
435 stars 107 forks source link

Mask dilation #25

Open vadimkantorov opened 11 months ago

vadimkantorov commented 11 months ago

Hi!

In https://github.com/MarcoForte/closed-form-matting/blob/master/closed_form_matting/closed_form_matting.py#L82 cv2.dilate is applied to the mask, while in matting.tar.gz is applied imerode

If I understand correctlu, imerode is the opposite of imdilate (https://docs.opencv.org/3.4/db/df6/tutorial_erosion_dilatation.html). Any hints on why this preproc op was reversed in your repro?

Thanks :)