Write-mask not working with define connected components?
Posted: 2018-03-03T09:59:15-07:00
Hi,
I have a mask, and also morphology edgeout from the mask. I want to remove unwanted black holes inside the edgeout, but since there may be holes I need to keep, I am trying to use a write-mask using the original alpha mask to keep the connected components code from removing parts I want to keep. Problem is, it's not working, and I don't know why. Am I doing it wrong, or is there another way to do this?
Mask
Edgeout
Connected components code
What I'm trying to do
I'm using IM 7
I have a mask, and also morphology edgeout from the mask. I want to remove unwanted black holes inside the edgeout, but since there may be holes I need to keep, I am trying to use a write-mask using the original alpha mask to keep the connected components code from removing parts I want to keep. Problem is, it's not working, and I don't know why. Am I doing it wrong, or is there another way to do this?
Mask
Edgeout
Connected components code
Code: Select all
-define connected-components:mean-color=true \
-define connected-components:area-threshold=500 \
-connected-components 4
Code: Select all
-write-mask mask.png \
-define connected-components:mean-color=true \
-define connected-components:area-threshold=500 \
-connected-components 4 +write-mask