1. An image processing device comprising: a memory; and a processor connected with the memory, to: acquire image data and barcode data indicating a barcode including a high luminance part and a low luminance part, set a region of the image data, the region including a plurality of pixels, and change, for each of the plurality of pixels, a luminance value into another luminance value based on a determination as to whether each of the plurality of pixels correspond to the high luminance part or the low luminance part of the barcode data, a comparison between the luminance value and a value corresponding with a moving average level of luminance values associated with the region, and a luminance difference needed to distinguish the high luminance part and the low luminance part.