An authentication apparatus comprising: a first correction unit configured to perform a correction, for each region obtained by dividing image data, whose feature value extracted from a line contained in the image data is used for authentication, into a plurality of regions, on line information indicating an angle of the line contained in each region of the plurality of regions by using the shape of a line, indicated by the line information, contained in a neighboring region of each region; a second correction unit configured to perform a correction, for each region of the image data, on line information indicating the angle of the line contained in each region by using the shape of a line indicated by the line information calculated for each region contained in an area of the image data larger than the neighboring region; a calculating unit configured to calculate a difference between the line information of each region of the image data corrected by the first correction unit and the line information of each region of the image data corrected by the second correction unit and to calculate a sum total value of the calculated differences of the plurality of regions of the image data; an output unit configured to compare the sum total value of the differences calculated by the calculating unit with a threshold and, if the sum total value is less than the threshold, outputs, as the line information of the image data, the line information corrected by the first correction unit and, if the sum total value is greater than the threshold, output, as the line information of the image data, the line information corrected by the second correction unit; and a feature value extracting unit configured to extract a feature value for the authentication from the line information output by the output unit. a first correction unit configured to perform a correction, for each region obtained by dividing image data, whose feature value extracted from a line contained in the image data is used for authentication, into a plurality of regions, on line information indicating an angle of the line contained in each region of the plurality of regions by using the shape of a line, indicated by the line information, contained in a neighboring region of each region; a second correction unit configured to perform a correction, for each region of the image data, on line information indicating the angle of the line contained in each region by using the shape of a line indicated by the line information calculated for each region contained in an area of the image data larger than the neighboring region; a calculating unit configured to calculate a difference between the line information of each region of the image data corrected by the first correction unit and the line information of each region of the image data corrected by the second correction unit and to calculate a sum total value of the calculated differences of the plurality of regions of the image data; an output unit configured to compare the sum total value of the differences calculated by the calculating unit with a threshold and, if the sum total value is less than the threshold, outputs, as the line information of the image data, the line information corrected by the first correction unit and, if the sum total value is greater than the threshold, output, as the line information of the image data, the line information corrected by the second correction unit; and a feature value extracting unit configured to extract a feature value for the authentication from the line information output by the output unit.