Search

CN-122023110-A - Bar code detection method, electronic equipment and computer readable storage medium

CN122023110ACN 122023110 ACN122023110 ACN 122023110ACN-122023110-A

Abstract

The application discloses a bar code detection method, electronic equipment and a computer readable storage medium. The method comprises the steps of obtaining zoom images on all channels by carrying out various zoom processes on the obtained target bar code images on all the channels, wherein the target bar code images comprise at least one bar code, carrying out fusion process on the zoom images on all the channels to obtain target fusion images, and carrying out bar code detection process on the target fusion images to obtain target bar code information. Thus, the success rate of bar code detection is improved.

Inventors

  • WANG FEI
  • LI YIZHI
  • ZHOU LU
  • LI XIANG
  • ZHANG XINGMING

Assignees

  • 浙江华睿科技股份有限公司

Dates

Publication Date
20260512
Application Date
20260108

Claims (10)

  1. 1. A method of bar code detection, the method comprising: performing various scaling treatments on the obtained target bar code images on the target channels to obtain scaled images on the channels, wherein the target bar code images comprise at least one bar code; carrying out fusion processing on the scaled images on each channel to obtain a target fusion image; And performing bar code detection processing on the target fusion image to obtain target bar code information.
  2. 2. The method of claim 1, wherein the step of performing a plurality of scaling processes on the acquired target barcode image on the target channel to obtain the scaled image on each channel comprises: performing bilinear interpolation scaling on the target bar code image on the target channel to obtain a first scaled image on a first channel; performing maximum value scaling processing on the target bar code image on the target channel to obtain a second scaled image on a second channel; performing minimum scaling processing on the target bar code image on the target channel to obtain a third scaled image on a third channel; the first scaled image, the second scaled image and the third scaled image are determined as scaled images on each channel.
  3. 3. The method of claim 2, wherein the step of performing maximum scaling on the target barcode image on the target channel to obtain a second scaled image on a second channel comprises: Traversing each pixel point in the target bar code image, and increasing the coordinates of the current pixel point according to the acquired image scaling to obtain the coordinates of the increased current pixel point; Constructing a preset window according to the coordinates of the increased current pixel point, and selecting a first pixel value from all pixel values in the preset window; And determining the first pixel value as the pixel value of the current pixel point in the second scaled image, and obtaining the second scaled image after the traversal is finished.
  4. 4. A method according to claim 3, wherein, before the step of increasing the coordinates of the current pixel point according to the acquired image scaling, to obtain the increased coordinates of the current pixel point, the method further comprises: Determining the number of the pixels occupied by the target bar code module from the number of the pixels occupied by the bar code modules according to the number of the pixels occupied by the bar code modules; and rounding the number of the pixel points occupied by the target bar code module to obtain the image scaling.
  5. 5. The method of claim 2, wherein the step of performing a minimum scaling process on the target barcode image on the target channel to obtain a third scaled image on a third channel comprises: Traversing each pixel point in the target bar code image, and increasing the coordinates of the current pixel point according to the acquired image scaling to obtain the coordinates of the increased current pixel point; Constructing a preset window according to the coordinates of the increased current pixel point, and selecting a second pixel value from all pixel values in the preset window; And determining a difference value between a preset pixel threshold value and the second pixel value as a pixel value of the current pixel point in the third scaling image, and obtaining the third scaling image after the traversal is finished.
  6. 6. The method of claim 1, wherein the scaled images on each channel include a first scaled image on a first channel, a second scaled image on a second channel, and a third scaled image on a third channel, and wherein the step of fusing the scaled images on each channel to obtain the target fused image comprises: performing channel stitching on the first zoom image, the second zoom image and the third zoom image to obtain stitched zoom images; And determining the spliced scaled image as the target fusion image.
  7. 7. The method of claim 1, wherein prior to the step of performing a plurality of scaling processes on the acquired target barcode image on the target channel to obtain scaled images on each channel, the method further comprises: determining a target scaling according to the acquired image scaling of the initial bar code image on the target channel and a preset channel scaling; Determining the amount to be filled of the initial bar code image according to the initial size of the initial bar code image and the target scaling; and carrying out boundary filling processing on the initial bar code image based on the to-be-filled amount to obtain the target bar code image.
  8. 8. The method of claim 1, wherein the step of performing barcode detection processing on the target fusion image to obtain target barcode information comprises: Inputting the target fusion image into a preset bar code detection model, and carrying out feature extraction processing on the target fusion image through a feature extraction module in the preset bar code detection model to obtain image features; Performing feature fusion processing on the image features through a feature fusion module in the preset bar code detection model to obtain fusion features; and detecting the fusion characteristic through a detection module in the preset bar code detection model to obtain the target bar code information.
  9. 9. An electronic device comprising a memory and a processor, wherein the memory stores program instructions and the processor invokes the program instructions from the memory to perform the method of any of claims 1-8.
  10. 10. A computer readable storage medium comprising program data stored thereon, which when executed by a processor is adapted to carry out the method according to any one of claims 1-8.

Description

Bar code detection method, electronic equipment and computer readable storage medium Technical Field The present application relates to the field of image processing technologies, and in particular, to a barcode detection method, an electronic device, and a computer readable storage medium. Background The bar code technology converts information into a bar code form which can be identified by a machine through a specific rule, and the data of bar code characterization can be rapidly read and identified through a scanning device. The bar code technology has the characteristics of rapidness, accuracy and high efficiency, and is widely applied to various fields such as production, circulation, logistics, retail, product tracing and the like. In the bar code technology, the bar code in the image needs to be accurately detected in order to realize rapid reading and recognition of the bar code representation data. The current bar code detection method generally adopts a bilinear interpolation scaling method to scale an image containing a bar code, and then inputs the scaled image into a bar code detection model to obtain a bar code detection result. However, the processing by only adopting bilinear interpolation scaling can cause the bar code information to be lost, and the success rate of bar code detection is affected. Disclosure of Invention The application mainly solves the technical problem of providing a bar code detection method, electronic equipment and a computer readable storage medium, which can improve the success rate of bar code detection. In order to solve the technical problems, the application provides a bar code detection method, which comprises the steps of performing various scaling treatments on target bar code images on acquired target channels to obtain scaled images on all channels, wherein the target bar code images comprise at least one bar code, performing fusion treatment on the scaled images on all channels to obtain target fusion images, and performing bar code detection on the target fusion images to obtain target bar code information. In an embodiment, the step of performing multiple scaling treatments on the obtained target barcode image on the target channel to obtain scaled images on each channel includes performing bilinear interpolation scaling treatment on the target barcode image on the target channel to obtain a first scaled image on a first channel, performing maximum scaling treatment on the target barcode image on the target channel to obtain a second scaled image on a second channel, performing minimum scaling treatment on the target barcode image on the target channel to obtain a third scaled image on a third channel, and determining the first scaled image, the second scaled image and the third scaled image as scaled images on each channel. In an embodiment, the step of performing maximum value scaling processing on the target barcode image on the target channel to obtain a second scaled image on a second channel includes traversing each pixel point in the target barcode image, performing increasing processing on coordinates of a current pixel point according to an obtained image scaling ratio to obtain coordinates of the increased current pixel point, constructing a preset window according to the coordinates of the increased current pixel point, selecting a first pixel value from pixel values in the preset window, determining the first pixel value as a pixel value of the current pixel point in the second scaled image, and ending traversing to obtain the second scaled image. In an embodiment, before the step of increasing the coordinates of the current pixel point according to the obtained image scaling to obtain the coordinates of the increased current pixel point, the method further includes determining the number of pixels occupied by the target barcode module from the numbers of pixels occupied by the plurality of barcode modules according to the number of pixels occupied by the obtained plurality of barcode modules, and rounding the number of pixels occupied by the target barcode module to obtain the image scaling. In an embodiment, the step of performing minimum value scaling processing on the target barcode image on the target channel to obtain a third scaled image on a third channel includes traversing each pixel point in the target barcode image, increasing coordinates of a current pixel point according to an obtained image scaling ratio to obtain increased coordinates of the current pixel point, constructing a preset window according to the increased coordinates of the current pixel point, selecting a second pixel value from each pixel value in the preset window, and determining a difference value between a preset pixel threshold value and the second pixel value as a pixel value of the current pixel point in the third scaled image, wherein the traversing is finished to obtain the third scaled image. In an embodiment, the scaled images on each channel include