1. A non-transitory computer readable storage medium having stored therein an output program causing a computer serving as an information processing apparatus to execute a process comprising: calculating, for each of pixels that form a binary image, a first value by summing a pixel value of a pixel of interest and pixel values of a predetermined number of pixels neighboring the pixel of interest; calculating, for each of the pixels that form the binary image, a second value by calculating difference values each between the calculated first value of the pixel of interest and the calculated first value of each of the neighboring pixels and summing absolute values of the difference values; determining pixel whose second value that is smaller than a predetermined value; changing the pixel values of the determined pixels from “1” to “0”; and outputting the binary image with the changed pixel values.