1. A method of obtaining information included in an input image, the input image including a plurality of codes, each of the codes comprising a plurality of digits, the method executed by a computer, comprising: dividing the input image into a plurality of pairs of blocks; reading out correct solution frequency data including an absolute value of a difference between characteristic values forming the pairs of blocks, an obtaining number indicating a number of times for obtaining left and right pixel values, and a correct solution frequency number that advances each time a decoding processing of the input image is successful; determining, by the computer, a digit value of each of the block pairs on a basis of the absolute value of the difference of a degree of the characteristic values between adjacent blocks in each of the block pairs and a weighting value of the digit value on a basis of a correct solution frequency determined by the obtaining number and the correct solution frequency number; determining, by the computer, the weighted digit value corresponding to the pairs of blocks by calculating the determined correct solution frequency and the determined digit value; deciding, by the computer, a new digit value of associated pairs of blocks on a basis of a majority of the weighed digit values of the associated pairs of the blocks; and repeating, by the computer, the deciding in other associated pairs of the blocks to determine a code.