Foreground-background segmentation for mixed raster content compression door