Green screen despill

The Remove Background API offers a feature to handle green screen despill.

Green screen despill works by automatically removing colored reflections that have been left on the main subject by a green background.

Please note that the green screen despill feature is currently in beta and is subject to changes.

To enable green screen despill, set the argument despill to the value true:

(original image)

despill=false

despill=true

Known limitations

  • This feature only works for green screen: it will not do anything for pictures that use a blue screen or any color other than green

  • All green color tones on the main subject will be affected by the feature: this means that for a person wearing green clothing, the color of the clothing will be modified

If you want to give it a try, here's the code to reproduce the example above:

curl --request POST \
  --url https://sdk.photoroom.com/v1/segment \
  --header 'x-api-key: YOUR_API_KEY' \
  --form 'image_file=@"/path/to/your/image.jpeg"' \
  --form 'despill=true' \
  --output result-with-green-screen-despill.png

Last updated