# segmentBackground method

Image segmentBackground(

1. Image image

)

Computes face segmentation mask for background removal. Important: This methods requires the `FaceBackgroundSegmenter` model to be loaded.

param image Source image to process. return The mask of segmented face. throws FaceException An error has occurred during Face Library execution.

## Implementation

    Image segmentBackground(Image image) {
      Image segmentationMask = Image();
      var err = faceSDK.id3FaceAnalyser_SegmentBackground(_pHandle.value, image.handle, segmentationMask.handle);
      if (err != FaceError.success.value) {
        segmentationMask.dispose();
        throw FaceException(err);
      }
      return segmentationMask;
    }