Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automated Image Background removal Software [closed]

I am looking for a tool that can remove the background from an image in an automated way requiring zero human interaction. I'm currently experimenting with a tool called Image Magick (http://www.imagemagick.org/script/index.php). I'm using actual photos that are taken by me. I first take a photo of a background, then I introduce an object into that same frame and take another shot. I have the camera on a tripod so that there is no movement. The shadows that are cast by that object seems to effect the results as well as the texture of the background. I don't mind if the preparation of the scene takes more time as long as I can successfully remove the entire background without having to touch it up in photoshop (or any other image editing application). The issues I'm facing with ImageMagick, is that it is also removing parts of the object in the foreground. Does anyone know of any other tool or suggestions on how to "prep" the scene in a way that I can cleanly remove the background only using this tool or any other? All tips/advice/suggestions are greatly appreciated. Thanks everyone!

like image 581
user_rz_jaz Avatar asked Mar 29 '11 13:03

user_rz_jaz


People also ask

Is remove BG free for commercial use?

Commercial use is permitted for the following plans:Subscription plans with 200 credits per month or more: Full-Resolution Images and Preview Images.

Is Background Eraser free?

Background Eraser Background Eraser is an Android application that comes with the functionality to remove the background of any image. This application can be downloaded from the play store for free of cost and you can use it without any limitations.


2 Answers

How are you using Imagemagick? I am doing something similar in one project, with this commands:

# Detect modified pixels
composite -compose difference picture1.jpg picture2.jpg diff.png
# Ignore minor differences (jpeg noise)
convert -threshold 25% diff.png diff2.png
# Apply mask
composite -compose CopyOpacity diff2.png picture.jpg result.png

Note: I use a very old imageMagick version (6.2.4.3). Commands syntax may have changed.

like image 24
Francisco R Avatar answered Oct 03 '22 15:10

Francisco R


Try this (using ImageMagick):

convert picture.jpg -fill none -fuzz 12% -draw "matte 0,0 floodfill" -flop  -draw "matte 0,0 floodfill" -flip  -draw "matte 0,0 floodfill" -flop  -draw "matte 0,0 floodfill" -flip  result.png

It basically takes an image file (i.e. picture.jpg), and using a fuzz factor of 12% (you can play with this value for better results) floodfills the image based on the pixel colors of the image's four corners. After all that process, the image outputted is result.png.

Based on this post: http://snippets.aktagon.com/snippets/558-how-to-remove-a-background-with-imagemagick

like image 139
Guillermo Gutiérrez Avatar answered Oct 03 '22 14:10

Guillermo Gutiérrez