1. A fingerprint/palmprint image processing apparatus for extracting ridge lines from an input fingerprint/palmprint image, comprising: local information extracting means for dividing the fingerprint palmprint image into two-dimensional local regions and extracting, in each of the two-dimensional local regions, a plurality of ridge line candidate images that represent ridge lines from each of the two-dimensional local regions, each of the plurality of ridge line candidate images being represented as a sine wave with a corresponding amplitude; first ridge line candidate image selecting means for evaluating the likelihood of a ridge line for each of the ridge line candidate images in each of the two-dimensional local regions, and selecting one first ridge line candidate image that represents a ridge line candidate image with the maximum likelihood of a ridge line from ridge line candidate images in each of the two-dimensional local regions, the selecting being made based on the one first ridge line candidate image having a maximum amplitude with respect to the ridge line candidate images in each of the two-dimensional local regions; connectivity evaluating means for evaluating the connectivity of first ridge line candidate images selected by the first ridge line candidate image selecting means in adjacent two-dimensional local regions; clustering means for clustering two-dimensional local regions that have high connectivity of first ridge line candidate images corresponding to the determined result of said connectivity evaluating means and generating a local region group; cluster evaluating means for evaluating the likelihood of a ridge line for the first ridge line candidate image in each of the two-dimensional local regions in the local region group generated by said clustering means and determining a local region group that has high likelihood of a ridge line as an initial local region group; and ridge line image restoring means for outputting the first ridge line candidate image in each of two-dimensional local regions included in the initial local region group as a ridge line image.