Switchboard Canvas can use machine learning to remove the background from an image.
The machine learning algorithm first detects the primary subject of the image and then removes the background leaving a gradient feathered border between the image and the transparent background.
Background removal is ideal for isolating the primary subject of an image for products or replacing the original background with another.
Background removal is available on all plans.
Only one image in a template can feature the removeBackground
property. However, the image can either be one originally specified in the template or one supplied as an overwrite with the url
property.
A successful background removal operation is based on the model's perception of the image's primary subject. The background removal could struggle if there is not an obvious or clearly defined subject.
To remove the background from an image, use the removeBackground
property. Set the value to true
.
The following example removes the background from the image specified when the template was created. The image1
element will have its background removed.
Only one Image element can have the removeBackground
property specified in your API request.
{
"template": "sample-image",
"sizes": [
{
"width": 1080,
"height": 1080,
}
],
"elements": {
"image1": {
"removeBackground": true
}
}
}
The following example specifies an overwrite image which subsequently has its background removed.
{
"template": "sample-image",
"sizes": [
{
"width": 1080,
"height": 1080,
}
],
"elements": {
"image1": {
"url": "http://www.imagelibrary.com/someimage.jpg",
"removeBackground": true
}
}
}
We care about the protection of your data. Read our Privacy Policy.