I have an image that I am trying to convert to binary format using -floodfill etc. It works fine on the original image. But it fails in most tests when I use only the green channel in-line. It works if I save the green channel first to png.
Input:

This works fine:
convert 3.jpg -fuzz 18% -fill none -draw "matte 0,0 floodfill" \
-channel rgba -fill white +opaque none -background black -alpha background -alpha off \
-morphology open:2 diamond:1 show:
This works fine as two separate commands:
convert 3.jpg 3_green.png
convert 3_green.png -fuzz 18% -fill none -draw "matte 0,0 floodfill" \
-fill white +opaque none -background black -alpha background -alpha off \
-morphology open:2 diamond:1 show:
This fails inline:
convert 3.jpg -channel g -separate +channel -fuzz 18% -fill none -draw "matte 0,0 floodfill" \
-channel rgba -fill white +opaque none -background black -alpha background -alpha off \
-morphology open:2 diamond:1 show:
This fails using MIFF:
convert 3.jpg -channel g -separate +channel MIFF:- | convert - -fuzz 18% -fill none -draw "matte 0,0 floodfill" \
-channel rgba -fill white +opaque none -background black -alpha background -alpha off \
-morphology open:2 diamond:1 show:
This fails using TIFF:
convert 3.jpg -channel g -separate +channel TIFF:- | convert - -fuzz 18% -fill none -draw "matte 0,0 floodfill" \
-channel rgba -fill white +opaque none -background black -alpha background -alpha off \
-morphology open:2 diamond:1 show:
This works using PNG:
convert 3.jpg -channel g -separate +channel PNG:- | convert - -fuzz 18% -fill none -draw "matte 0,0 floodfill" \
-channel rgba -fill white +opaque none -background black -alpha background -alpha off \
-morphology open:2 diamond:1 show:
NOTE: this may have to do with transparency. Perhaps I am doing something wrong.
This new command fails using transparency:
convert 3.jpg -channel g -separate +channel -fuzz 18% -fill none -draw "matte 0,0 floodfill" \
-channel rgba -fill white +opaque none -fill black -opaque none \
-morphology open:2 diamond:1 show:
This new command works with non-transparent red
convert 3.jpg -channel g -separate +channel -fuzz 18% -fill red -draw "color 0,0 floodfill" \
-fill white +opaque red -fill black -opaque red \
-morphology open:2 diamond:1 show:
It also fails for me on 6.8.6.9
Can anyone duplicate these results (especially on a Mac)?