morphology operation that generate an additional compact border region around shapes
Posted: 2017-02-13T05:20:26-07:00
I have a gray scale mask (https://www.flickr.com/photos/gbachelie ... ed-public/) that should be used in CopyOpacity to mask out regions with strong aliased edges (https://www.flickr.com/photos/gbachelie ... 7436918822).
My idea was to enlarge the black shapes of the mask (and add a blur to get a soft transition). I thought something like "-negate -morphology Thicken Disk:n -negate" with n=5, 10, ... would work, but aliased edges were still visible after a compose Over. A compare with the enlarged mask without blur shows a disconnected pixel cloud instead of an additional compact border region around the areas (https://www.flickr.com/photos/gbachelie ... ed-public/). So I added a blur (-blur 4x3) (https://www.flickr.com/photos/gbachelie ... ed-public/). The compare (https://www.flickr.com/photos/gbachelie ... ed-public/) shows an expected compact border but in the result compositing aliased edges were still visible. Perhaps the blur transforms black pixels inside the shape boarder to gray pixels that become transparent but the larger the border the less this this effect would be ...
Perhaps the morphology operation is not the right one to generate an additional compact border region around shapes that will mask out aliased edges supported by the first compare. Any idea on this matter? Thank you!
best regards
Günter
My idea was to enlarge the black shapes of the mask (and add a blur to get a soft transition). I thought something like "-negate -morphology Thicken Disk:n -negate" with n=5, 10, ... would work, but aliased edges were still visible after a compose Over. A compare with the enlarged mask without blur shows a disconnected pixel cloud instead of an additional compact border region around the areas (https://www.flickr.com/photos/gbachelie ... ed-public/). So I added a blur (-blur 4x3) (https://www.flickr.com/photos/gbachelie ... ed-public/). The compare (https://www.flickr.com/photos/gbachelie ... ed-public/) shows an expected compact border but in the result compositing aliased edges were still visible. Perhaps the blur transforms black pixels inside the shape boarder to gray pixels that become transparent but the larger the border the less this this effect would be ...
Perhaps the morphology operation is not the right one to generate an additional compact border region around shapes that will mask out aliased edges supported by the first compare. Any idea on this matter? Thank you!
best regards
Günter