A tool for solid color background removal and automatic subject cropping.
Move to the dir of rmbg:
cd dist
First change the file permission of the executable:
chmod +x rmbg
-
For images in a folder:
./rmbg -i path/to/folder
Images are stored in the folder "output_figs"
-
For one single image:
./rmbg -i path/to/the/image
The image will be output to the same dir.
The module samples color from a 5x5 block on the upper left corner as the background color. To change the tolerance of the color sampleing (default 40), try
./rmbg -i <path> -t <new tolerance value>