1. A method of detecting a presence of an image of a linear grid parallel to one of the edges of an image represented by a digital image representation, comprising: computing predefined measures for different image locations in said image in a computer, determining an assumed direction of said grid by comparing said predefined measures for a first direction and a second direction, computing a confidence feature by steps including: deducing a reference value from the predefined measures in a direction perpendicular to said assumed direction, calculating said confidence feature as a ratio of a number of the predefined measures in the assumed grid direction which are larger than said reference value to the total number of predefined measures in the assumed direction, detecting a presence of said grid from the predefined measures and said confidence feature.