1. A method for detecting an image area in a digital image including said image area and a background area, said digital image being represented as a two-dimensional array of pixel values, comprising: identifying in said digital image a first image region indicative of said background area and a second image region indicative of said image area; computing gradient values using said pixel values for pixel locations in said digital image associated with a boundary between said first image region and said second image region; defining a plurality of strokes based on said gradient values, each stroke being a line segment having a start pixel location and an end pixel location, and each stroke being derived from a region of pixel locations having non-zero gradient values of the same sign, wherein pixel locations to a first side of each stroke are in said second image region and pixel locations to a second side of each stroke are in said first image region; merging said plurality of strokes, wherein a first stroke and a second stroke in said plurality of strokes are merged when said first and second strokes are collinear and a start pixel location of one of said first and second strokes is near an end pixel location of the other one of said first and second strokes; defining a plurality of corners using said strokes, wherein each corner is a pixel location of an intersection of a third stroke and a fourth stroke, said third stroke and said fourth stroke forming a corner when said third stroke is perpendicular to said fourth stroke, said third and fourth strokes are arranged in a third direction, and a start pixel location of one of said third and fourth strokes is close to an end pixel location of the other one of said third and fourth strokes; and defining an image area rectangle delimiting said image area using said plurality of corners and said plurality of strokes, wherein said image area rectangle is defined based on one or more corners fitting a predefined corner configuration and one or more strokes associated with said one or more corners, said one or more strokes forming at least a portion of a perimeter of said image area rectangle.