The invention discloses a bar code scanning
image enhancement method and
system based on
deep learning, and relates to the technical field of
deep learning and
image processing, and the method comprises the steps: collecting a bar code image, carrying out the preprocessing, and generating a standardized and
grayscale image; constructing a difference value and a gradient response diagram based on the
grayscale image, obtaining an attention map according to the standardized image, performing linear superposition in combination with the difference value and the gradient response diagram, obtaining a combined attention map, performing masking and shielding, and generating a
mask and a shielding map; carrying out image interception on the
mask image and the joint attention
image based on the
mask image and the calculation external rectangular frame, then executing channel splicing, obtaining an input
tensor, inputting the input
tensor into a conditional
generative adversarial network, and outputting a repaired image; according to the invention, natural transition between a restoration result and an original image is realized by using a pixel-
level fusion strategy based on
Gaussian weight, and common visual artifacts such as edge fault and brightness jump can be effectively avoided.