1. A method for detecting an object in an image by processing signals corresponding to the image, the method comprising: comparing a template comprising a plurality of line segments for the object with regions of an image, and determining a similarity measure (S(x)), wherein the similarity measure is determined using a statistical measure based on sums of pixel values and sums of squared pixel values of line segments of the image corresponding to each of the line segments of the template.