ImageMagick で写真の輪郭を取り出す
ImageMagick の convert コマンドで、ペン描きのような輪郭を取り出す。
加工前。

$ convert -segment 1x1 +dither -colors 2 -edge 1 -negate monroe.jpg momroe-p.jpg

きれいな線で取り出せたが、柔らかいものは向いてない。
同じパラメータでも、硬い(元の輪郭がくっきりした)ものはうまくゆく。
加工前。

$ convert -segment 1x1 +dither -colors 2 -edge 1 -negate ford.jpg ford-p.jpg

加工前。

$ convert -segment 1x1 +dither -colors 2 -edge 1 -negate monroe.jpg momroe-p.jpg

きれいな線で取り出せたが、柔らかいものは向いてない。
同じパラメータでも、硬い(元の輪郭がくっきりした)ものはうまくゆく。
加工前。

$ convert -segment 1x1 +dither -colors 2 -edge 1 -negate ford.jpg ford-p.jpg
