Function clearBorder

  • Set the pixels connected to the border of the mask to zero. You can chose to allow corner connection of not with the allowCorners option.

    Parameters

    Returns Mask

    The image with cleared borders.