Structural element candidates, estimated to be predetermined structural
elements of a predetermined subject, are detected from an image that
includes the subject. The subject that includes the structural element
candidates is detected from the image in the vicinity of the detected
structural element candidates. The characteristics of the structural
elements are discriminated from the image in the vicinity of the
structural element candidates, at a higher accuracy than when the
structural elements were detected. In the case that the characteristics
of the structural elements are discriminated, the structural element
candidates are confirmed as being the predetermined structural elements.