convert test1.tif -channel RGB -threshold 99% -fill black +opaque white -negate result1.tif
original

result

original

result

original

result

Code: Select all
mogrify -path /Users/fred/desktop/test2 -format png -bordercolor white -border 1 -fuzz 20% -fill black -draw "color 0,0 floodfill" -fill white -opaque white -fill black +opaque white -negate *.jpg
Code: Select all
convert tri.jpg -morphology open octagon:4 -threshold 60% -negate result.png
Code: Select all
convert in.tif -modulate 100,5000 -bordercolor white -border 1 -fuzz 17% -fill blue -draw "color 0,0 floodfill" -flatten -alpha OFF -format png temp.png
convert temp.png -fuzz 5% -fill black +opaque white -negate -morphology erode octagon -format tif out.tif
Code: Select all
convert in.tif \
-modulate 100,5000 \
-bordercolor white -border 1 \
-fuzz 17% -fill blue -draw "color 0,0 floodfill" \
-flatten -alpha OFF \
-fuzz 5% -fill black +opaque white -negate \
-morphology erode octagon \
out.tif