Skip to content
Use grabcut on an image with basic UI and basic alpha masking
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information. Update Mar 21, 2019 Add files via upload Mar 21, 2019


An implementation of grabcut that allows you to select a region using a GUI.


python inputimage

Draw around region using your mouse

Press enter

THe resultant file will but output with the same file name as teh input with the region dimensions appended. This is so you can manually execute the region selection at a later date without using a GUI


One ouput of Grabcut produces a nearly black image except the mask has the colour #060606. To produce an alpha mask this is replaced with #FFFFFF. This fill process sometimse overspills and so your output image may have some random #000000 pixels.

You can’t perform that action at this time.