1. A method for creating a binary mask image from an inputted digital image of a scanned document, comprising the steps of: a) creating a binarized image by binarizing said inputted digital image, b) detecting in said binarized image first text regions representing light text on a dark background in said inputted digital image, c) inverting said first text regions in said binarized image, such that a transformed binary image is formed in which the inverted first text regions are interpretable in the same way as dark text on a light background, wherein the steps of detecting and inverting the first text regions are performed on the basis of pixel blobs contained in the binarized image without interpreting the represented text.