問題描述
從圖像中刪除白色背景 (Remove white backgrounds from images)
I have some product photos, from which I would like to remove the white background. An example:
(source: dewalt.at)
Is there a nice library or a manual way to do it with Cocoa or C? For which keywords (image processing methods) do I have to search?
參考解法
方法 1:
You can try ImageMagick:
convert input.gif -transparent white output.gif
For more advanced features you should try something like image masking or do it manually using any image library, setting the pixel values to something with a high alpha value.
See also this thread: http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=10665