Search

CN-122023181-A - Picking image enhancement method based on deep learning

CN122023181ACN 122023181 ACN122023181 ACN 122023181ACN-122023181-A

Abstract

The invention provides a picking image enhancement method based on deep learning, which aims at solving the problem of unstable decoding of bar codes in video caused by motion blur and noise, introduces bar code structure constraint on the basis of a deblurring model, and firstly positions bar code areas from original video frames, and extracts structural parameters such as dead zones, bar code intervals, black-white sequences and the like; and then generating an update diagram by using a deep learning model, directly enhancing a non-bar code area, updating the bar code area according to the restriction projection restriction to obtain an enhanced frame, combining bar code decoding and structure judgment, backing the bar code area for a result exceeding the allowable variation range of a reading code, and carrying out parallel judgment on a clear and scanning result.

Inventors

  • TANG YAYUAN
  • HUANG WEIGUO
  • CHEN XIANGQUAN
  • DAI ZHENHUA
  • TANG JIE

Assignees

  • 湖南科技学院

Dates

Publication Date
20260512
Application Date
20251119

Claims (8)

  1. 1. The picking image enhancement method based on deep learning is characterized by comprising the following steps of: s1, receiving an original video frame, positioning a bar code area, calculating a code reading boundary parameter according to international bar code specifications, aligning a static area range, bar code spacing and grids, and outputting the bar code area and the code reading boundary parameter in a black-and-white sequence; S2, establishing a reading code allowable variation range according to reading code boundary parameters and forming constraint projection, namely keeping blank in a dead zone, keeping the alignment of bar code spacing and grids unchanged, keeping black and white sequence unchanged, allowing slight straightening and small noise reduction along the bar code stripe direction, eliminating the change of stripe width or generating redundant edge when the vertical direction is eliminated, mapping any image update to allowable change, and outputting constraint projection; S3, invoking a causal flow field deblurring model, calculating a convolution speed field based on an original video frame and a past video frame, generating an update chart, adjusting the update direction and strength in a bar code area according to constraint projection, and generating update in a non-bar code area according to the speed field; S4, directly updating the non-bar code area according to the update diagram, performing constraint projection on the bar code area, updating the bar code area, generating an enhancement frame and outputting the enhancement frame; S5, extracting bar code content according to the original video frame, decoding and generating a code reading result; S6, calculating a structure judgment result based on the enhancement frame and the code reading boundary parameter, outputting a final enhancement frame when the code reading allowable variation range is met, and outputting the final enhancement frame after the bar code area of the original video frame is replaced when the code reading allowable variation range is not met; And S7, calculating a clear and code scanning parallel establishment judgment result according to the final enhancement frame and the code reading result.
  2. 2. The method for enhancing picking images based on deep learning as claimed in claim 1, wherein S1 is specifically: Taking an original video frame as input, adopting direction consistency detection and one-dimensional projection combined positioning, extracting a communication area with obvious alternate stripes, screening non-bar code candidates according to a size range threshold value and an aspect ratio threshold value, determining a bar code area, and defining a bar code stripe direction by using a normal direction of maximum stripe response; in the bar code area, a gray sequence is acquired along a scanning line vertical to the bar code stripe direction, continuous black-and-white switching is positioned according to the black-and-white switching rule and the edge contrast threshold value of the international bar code specification, black-and-white sequence is sequentially generated according to the first switching starting point, switching interval distribution is calculated, and a spacing reference and a grid alignment reference are fitted under the alignment error threshold value constraint; Expanding outwards at two sides of a bar code area along the bar code stripe direction, detecting a low texture zone, determining the inner and outer boundaries of the static zone according to the combined judgment of the static zone requirement of the international bar code specification, the lower limit threshold of the static zone width and the texture energy threshold, and removing pixel segments which do not meet the continuity to obtain the static zone range; And forming a code reading boundary parameter by the static area range, the spacing reference and the grid alignment reference in black-and-white sequence, writing the direction of the bar code stripes into the direction parameter of the bar code spacing and the grid alignment, and outputting the bar code area and the code reading boundary parameter.
  3. 3. The method for enhancing picking images based on deep learning as claimed in claim 1, wherein S2 is specifically: The method comprises the steps of taking a barcode area and a barcode reading boundary parameter as input, decoupling a dead zone range, a barcode interval and grid alignment and black-and-white sequence in the barcode reading boundary parameter, and determining a barcode stripe direction and a vertical direction according to the barcode interval and grid alignment for limiting an updating direction and amplitude; Setting a straightening intensity threshold and a noise reduction amplitude threshold along the bar code stripe direction in the bar code area, generating an allowable change upper limit along the bar code stripe direction, and limiting updating to only generate shape correction and noise suppression; setting a bar width change threshold and an edge newly-added threshold along the vertical direction in a bar code area, cutting off the update in the vertical direction in amplitude, and eliminating update components which can change the bar width or generate redundant edges; Segmenting a bar code area according to a dead zone range, setting the upper limit of the update amplitude to zero in the dead zone range, and reserving the allowable change upper limit in the non-dead zone range along the bar code stripe direction to form a limit of dead zone blank; Dividing a bar code area into strip areas according to the alignment of the bar code space and the grid, carrying out alignment correction on the updating of the strip areas along the vertical direction, setting the vertical displacement exceeding the bar width change threshold value to zero, and keeping the bar code space and the grid alignment unchanged; setting up a switching sequence check for updating in the vertical direction by taking the black-and-white sequence as a reference, removing updating components which cause the black-and-white sequence to be reversed or the switching position to cross the boundary of the banded region, and keeping the black-and-white sequence unchanged; And combining the dead zone keeping blank limit, the bar code spacing and grid alignment limit, the black-and-white sequence limit and the straightening and noise reduction allowance of the bar code stripe direction to form constraint projection, mapping the image update into an update amount which accords with the reading allowable variation range, providing the update direction and the intensity limit of the update map for the follow-up, and outputting the constraint projection.
  4. 4. The method for enhancing picking images based on deep learning as claimed in claim 1, wherein S3 specifically comprises: Taking an original video frame and a past video frame as input, stacking the original video frame and the past video frame according to time sequence to form a time sequence input block, and sending the time sequence input block into a causal flow field deblurring model to generate four characteristic layers; performing time alignment and fusion on the four feature layers in the time sequence convolution layer, and sending a fusion result into the multi-scale fusion layer and the up-sampling layer to obtain a high-resolution feature map; A convolution speed field output head is adopted, a high-resolution characteristic diagram is taken as input, a convolution speed field is calculated, and pixel displacement amounts in the horizontal direction and the vertical direction are output; adopting an updating image output head, taking a convolution velocity field and a high-resolution characteristic image as input, generating an updating image of an original video frame, and enabling a model end not to receive constraint projection and a bar code area; After the model is output, taking a bar code area and constraint projection as inputs, performing constraint projection mapping on the update diagram in the bar code area, limiting the update direction and the intensity to a reading allowable variation range, and reserving allowable variation along the bar code stripe direction according to a straightening intensity threshold value and a noise reduction amplitude threshold value; Cutting off the vertical updating according to the change threshold value of the bar width and the newly added threshold value of the edge in the bar code area according to the alignment of the bar code spacing and the grid, the black-and-white sequence and the static area range, setting the updating in the static area range to zero, and eliminating the updating which leads to the reversal of the black-and-white sequence; generating update in the non-bar code area according to the convolution velocity field, combining the update after the constraint of the bar code area with the update of the non-bar code area to form an update diagram and outputting the update diagram.
  5. 5. The method for enhancing picking images based on deep learning as claimed in claim 1, wherein S4 is specifically: dividing an original video frame and an update chart into a bar code area and a non-bar code area according to the bar code area, aligning the color sequence of the three channels of the update chart corresponding to the original video frame according to the pixel position; in the non-bar code area, directly adding the update image to the original video frame to form an update result of the non-bar code area; in the bar code area, carrying out constraint projection mapping on the update map by taking constraint projection as input, retaining updating along the bar code stripe direction according to the straightening intensity threshold and the noise reduction amplitude threshold, cutting off the vertical direction updating according to the stripe width change threshold and the edge newly added threshold, and setting the updating to zero in the dead zone range; And merging the constrained updating of the bar code area and the updating of the non-bar code area according to the pixel positions, keeping the bar code spacing aligned with the grid and the black-and-white sequence unchanged, generating an enhancement frame and outputting the enhancement frame.
  6. 6. The method for enhancing picking images based on deep learning as claimed in claim 1, wherein S5 specifically comprises: Taking an original video frame and a bar code area as input, acquiring a gray sequence along a scanning line perpendicular to the bar code stripe direction, cutting a scanning interval according to a dead zone range, removing pixel segments outside the dead zone range, and reserving an effective gray sequence in the bar code area; Positioning black-and-white switching on the effective gray sequence according to the edge contrast threshold, generating a black-and-white switching sequence according to a first switching starting point, combining the switching of adjacent switching intervals smaller than the alignment error threshold, and eliminating pseudo switching lower than the edge contrast threshold to obtain a switching sequence with consistent black-and-white sequence; quantifying the switching interval into a bar width sequence according to an alignment error threshold according to the alignment of the bar code spacing and the grid, limiting a sequence range by a dead zone range, carrying out sequence correction on the bar width sequence by adopting a black-white sequence, and outputting a symbol sequence meeting the alignment of the bar code spacing and the grid; mapping the symbol sequence into a character sequence according to the international barcode specification, performing consistency check according to the international barcode specification, generating a code reading result and outputting the code reading result.
  7. 7. The method for enhancing picking images based on deep learning as claimed in claim 1, wherein S6 is specifically: Taking the boundary parameters of the enhancement frame and the code reading as input, positioning black-and-white switching in the vertical direction of the bar code area according to the edge contrast threshold, calculating the bar width and the bar code distance, comparing the bar width with the bar code distance and grid alignment to obtain an alignment error, calculating texture energy in the static area range, and checking the switching sequence under the black-and-white sequence reference to form a structure judgment result; according to the structure judgment result, the alignment error, the stripe width change and the static area texture energy are respectively compared with an alignment error threshold value, a stripe width change threshold value and a texture energy threshold value, and if all the alignment error, the stripe width change and the static area texture energy do not exceed the corresponding threshold values and the black-white sequence is consistent, the reading code allowable variation range is considered to be met; when the reading code allowable variation range is determined to be met, taking the enhancement frame as a final enhancement frame and outputting the final enhancement frame; when the reading allowable variation range is not met, the bar code area of the enhancement frame is replaced by the bar code area of the original video frame, the non-bar code area is kept unchanged, and the final enhancement frame is output.
  8. 8. The method for enhancing picking images based on deep learning as claimed in claim 1, wherein S7 specifically comprises: The final enhancement frame and the code reading result are taken as input, the final enhancement frame is divided into a bar code area and a non-bar code area according to the division of the bar code area, judgment is carried out within the bar code area by taking the dead zone range as a boundary, and the non-bar code area is extracted for clear evaluation; Calculating edge contrast and texture energy in the horizontal direction and the vertical direction of the non-bar code area, comparing the edge contrast with an edge contrast threshold, comparing the texture energy with a texture energy threshold, and generating a clear judgment result to pass when the edge contrast and the edge contrast threshold are not lower than the corresponding threshold at the same time, or generating a clear judgment result to not pass; Taking a code reading result as input, carrying out consistency verification according to international bar code specifications, generating a code scanning judgment result to pass when the verification passes, and generating the code scanning judgment result to fail when the verification fails; and combining the definition judging result and the code scanning judging result, outputting a parallel establishment judging result when the definition judging result and the code scanning judging result are both passed, and outputting a parallel establishment judging result when any one of the definition judging result and the code scanning judging result is not passed.

Description

Picking image enhancement method based on deep learning Technical Field The invention relates to the technical field of image processing and bar code reading, in particular to a picking image enhancement method based on deep learning. Background In the scenes of warehouse picking, logistics sorting and the like, a large amount of commodities are collected into picking images through an industrial camera or terminal equipment, and automatic identification and circulation are completed by means of one-dimensional bar codes. Such barcodes typically have a fixed stripe orientation, alternating black and white sequences, and meet the reading structural requirements of the international barcode specification, such as stripe width, spacing, and dead space. In practical application, factors such as object motion, equipment shake, illumination fluctuation and the like easily cause motion blurring and noise to appear in a video frame, so that manual viewing definition is influenced, and subsequent automatic decoding is also influenced. With the development of deep learning and video deblurring technologies, the overall sharpening process of picked images by using a neural network, and the improvement of the picture readability and the bar code reading stability become an important direction. In the prior art, one scheme is mainly based on traditional image processing, and after preprocessing such as sharpening, noise reduction, histogram equalization and the like is performed on an acquired bar code image, decoding is realized through one-dimensional scanning, edge detection and bar width quantification along the vertical direction of bar code stripes. Another scheme uses a deep learning video deblurring or image enhancement model to carry out end-to-end sharpening treatment on the whole frame image, then the enhanced bar code area is input into a conventional decoding algorithm to finish reading, and the technology firstly carries out bar code area detection, then uniformly applies the deblurring or enhancement model on the area, and finally enters a standard bar code decoding process. When the bar code area is enhanced, the existing scheme generally lacks explicit constraint on the code reading structure such as dead zone range, alignment of bar width and space grid, black-white sequence and the like, and the deblurring or enhancement process can change the width and edge position of bar code stripes or introduce textures in the dead zone, so that decoding is unstable. Meanwhile, in the prior art, the image sharpening and code scanning results are used as serial processing and lack of linkage verification, and the mechanism for uniformly judging the sharpening effect and the code scanning reliability and carrying out rollback protection in the same video frame is lacked. Therefore, a method for enhancing picking images, which solves the above-mentioned shortcomings of the prior art, is a problem that needs to be solved by those skilled in the art. Disclosure of Invention The invention aims to provide a picking image enhancement method based on deep learning, which aims to apply structural constraint and result verification conforming to international bar code standards to a bar code area while carrying out integral deblurring and sharpening on a picking image by using a deep learning model in video processing of a picking scene, so that key code reading structures such as dead zones, bar width intervals, black and white sequences and the like are only adjusted within an allowable variation range, and rollback processing is carried out on the bar code area when the structures are abnormal, thereby realizing reliable parallel establishment of image sharpening and bar code scanning results on the same enhancement frame. According to the embodiment of the invention, the picking image enhancement method based on deep learning comprises the following steps: s1, receiving an original video frame, positioning a bar code area, calculating a code reading boundary parameter according to international bar code specifications, aligning a static area range, bar code spacing and grids, and outputting the bar code area and the code reading boundary parameter in a black-and-white sequence; S2, establishing a reading code allowable variation range according to reading code boundary parameters and forming constraint projection, namely keeping blank in a dead zone, keeping the alignment of bar code spacing and grids unchanged, keeping black and white sequence unchanged, allowing slight straightening and small noise reduction along the bar code stripe direction, eliminating the change of stripe width or generating redundant edge when the vertical direction is eliminated, mapping any image update to allowable change, and outputting constraint projection; S3, invoking a causal flow field deblurring model, calculating a convolution speed field based on an original video frame and a past video frame, generating an update chart, adjusting t