Remove white background from images

I have some product photos from which I would like to remove the white background. Example:

alt text http://www.dewalt.at/ProductImages/imports/EU_Images/Dewalt/573786_DC415N.jpg

Is there a good library or manual way to do this using Cocoa or C? For which keywords (image processing methods) should I look for?

+4
source share
1 answer

You can try ImageMagick:

convert input.gif -transparent white output.gif 

For more complex functions, you should try something like masking images, or do it manually using any image library, setting the pixel values ​​to something with a high alpha value.

See also this topic: http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=10665

+7
source

Source: https://habr.com/ru/post/1286196/


All Articles