以下のバッチファイルを実行します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.5-Q16
%im%\convert.exe sample6.jpg -channel a -fx "(hue>0.11&&hue<0.19&&intensity<0.93&&saturation>0.5)?1:0" sample212a.png
%im%\convert.exe sample7.jpg -channel a -fx "(hue>0.11&&hue<0.19&&intensity<0.93&&saturation>0.5)?1:0" sample212b.png
元画像1(sample6.jpg)

出力画像1(sample212a.png)

元画像2(sample7.jpg)

出力画像2(sample212b.png)

2008/01/04追記
ver6.3.7では、以下のように-matteを追加します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.7-Q16
%im%\convert.exe sample6.jpg -matte -channel a -fx "(hue>0.11&&hue<0.19&&intensity<0.93&&saturation>0.5)?1:0" sample212a.png
%im%\convert.exe sample7.jpg -matte -channel a -fx "(hue>0.11&&hue<0.19&&intensity<0.93&&saturation>0.5)?1:0" sample212b.png
No comments:
Post a Comment