CN117574931B - One-dimensional bar code information generation method based on 3D structure and laser decoding equipment - Google Patents

One-dimensional bar code information generation method based on 3D structure and laser decoding equipment Download PDF

Info

Publication number
CN117574931B
CN117574931B CN202410052451.3A CN202410052451A CN117574931B CN 117574931 B CN117574931 B CN 117574931B CN 202410052451 A CN202410052451 A CN 202410052451A CN 117574931 B CN117574931 B CN 117574931B
Authority
CN
China
Prior art keywords
bar code
character
pixel
preset
barcode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410052451.3A
Other languages
Chinese (zh)
Other versions
CN117574931A (en
Inventor
周钢
胡征慧
陈小垒
刘庆杰
王蕴红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Innovation Research Institute of Beihang University
Original Assignee
Hangzhou Innovation Research Institute of Beihang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Innovation Research Institute of Beihang University filed Critical Hangzhou Innovation Research Institute of Beihang University
Priority to CN202410052451.3A priority Critical patent/CN117574931B/en
Publication of CN117574931A publication Critical patent/CN117574931A/en
Application granted granted Critical
Publication of CN117574931B publication Critical patent/CN117574931B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14131D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10544Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
    • G06K7/10821Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum further details of bar or optical code scanning devices
    • G06K7/10881Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum further details of bar or optical code scanning devices constructional details of hand-held scanners
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10544Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
    • G06K7/10821Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum further details of bar or optical code scanning devices
    • G06K7/1098Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum further details of bar or optical code scanning devices the scanning arrangement having a modular construction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/143Glyph-codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1439Methods for optical code recognition including a method step for retrieval of the optical code
    • G06K7/1443Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps
    • G06K7/1486Setting the threshold-width for bar codes to be decoded

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Electromagnetism (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Printers Characterized By Their Purpose (AREA)

Abstract

The embodiment of the disclosure discloses a one-dimensional bar code information generation method and a laser decoding device based on a 3D structure. One embodiment of the method comprises the following steps: collecting a target bar code image, wherein the target bar code image is a one-dimensional bar code image with 3D structural information and laser projection lines; filtering the target bar code image by using an optical filter; threshold segmentation processing is carried out on the stereoscopic bar code image; performing straight line fitting treatment on each threshold segmentation bar code pixel point; determining the distance between each threshold value segmentation bar code pixel point and a gray fitting straight line; determining a pixel region; determining a pixel area as a first preset character area, wherein the first preset character area is a stereoscopic image area engraved by laser engraving equipment; determining the pixel area as a second preset character area; determining a bar code character string to be decoded; one-dimensional bar code information is generated. The embodiment can improve the decoding accuracy of the bar code and expand the application range of the bar code.

Description

One-dimensional bar code information generation method based on 3D structure and laser decoding equipment
Technical Field
The embodiment of the disclosure relates to the field of cross application of combining a laser measurement technology and a bar code technology, in particular to a one-dimensional bar code information generation method and laser decoding equipment based on a 3D structure.
Background
One-dimensional bar code technology is an automatic identification technique that is used to store and extract information by encoding the information into a specific set of side-by-side bars and spaces. The bars and spaces vary in width and spacing and represent various data such as numbers, letters or other characters. The bar code has the advantages of quick data input, high reliability, large information quantity, flexibility, practicability, convenience for real-time tracking and control and the like, and is widely applied to the fields of inventory control, logistics transportation, production process control, food safety, traceability and the like. The bar code label materials adopted in the market at present are two-dimensional plane materials such as coated paper, fragile paper, PET, PVC, thermal transfer paper, removable adhesive labels, thermal sensitive paper, writing paper, synthetic paper and the like. The encoding pattern is attached to the bar code label using a bar code printer. Currently, when generating one-dimensional bar code information, the following methods are generally adopted: firstly, sticking a printed bar code label on the surface of a material or printing the bar code label on the surface of the material, then, scanning a one-dimensional bar code by using an image sensor on a scanning device, reflecting light with different intensities by black-white bars and gaps of the bar code, sensing the reflected light signals by the scanning device, converting the reflected light signals into electric signals, and finally, converting the electric signals into corresponding bar code information by a decoder through analyzing the widths and the intervals of the bars and the gaps. Meanwhile, an LED light source is arranged in the scanning device so as to improve the definition of the captured bar code image.
However, when one-dimensional bar code information is generated in the above manner, there are often the following technical problems:
First, since the high-contrast black-and-white barcode label is adhered to or printed on the surface of the material under the conventional (e.g., normal temperature) condition, the existing barcode scanner has higher working efficiency, and can meet most of the scene demands. In some application scenarios with complex conditions (such as high temperature, greasy dirt, and multiple dust), the decoding accuracy of the bar code is low due to the high damage of the complex environment to the bar code (the probability of damaging the bar code label is high), that is, the generated bar code information has more error content or the bar code information cannot be identified. And simultaneously, the application range of the bar code is smaller.
Second, since the one-dimensional bar code label stuck or printed on the surface of the material only has two-dimensional information (bar height and width of the bar code) of the bar code, the bar code scanning device decodes the bar code only through the two-dimensional information of the bar code, so that the decoding mode of the bar code scanning device is single, and the application range of the bar code scanning device is smaller.
The above information disclosed in this background section is only for enhancement of understanding of the background of the inventive concept and, therefore, may contain information that does not form the prior art that is already known to those of ordinary skill in the art in this country.
Disclosure of Invention
The disclosure is in part intended to introduce concepts in a simplified form that are further described below in the detailed description. The disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose a 3D structure-based one-dimensional barcode information generation method and a handheld 3D barcode single-line laser decoding apparatus to solve one or more of the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a one-dimensional barcode information generation method based on a 3D structure, the method including: acquiring a target bar code image through an associated image acquisition device, wherein the target bar code image is a one-dimensional bar code image with 3D structure information and laser projection lines; filtering the target bar code image by using an optical filter to obtain a filtered target bar code image serving as a stereoscopic bar code image; threshold segmentation processing is carried out on the stereoscopic bar code image, and the stereoscopic bar code image after the threshold segmentation processing is obtained and is used as a threshold segmentation bar code image; performing straight line fitting processing on each threshold segmentation bar code pixel point meeting a preset threshold condition in the threshold segmentation bar code image to generate a gray fitting straight line; determining the distance between each threshold segmentation bar code pixel point in the threshold segmentation bar code image and the gray fitting straight line to obtain a pixel distance set; for each pixel distance in the set of pixel distances, performing the steps of: determining a pixel region corresponding to the pixel distance according to the pixel distance; in response to determining that the pixel distance meets a preset pixel distance condition, determining the pixel area as a first preset character area, wherein the first preset character area is a stereoscopic image area engraved by a laser engraving device; in response to determining that the pixel distance does not meet the preset pixel distance condition, determining the pixel area as a second preset character area, wherein the second preset character area is a blank area which is not engraved by the laser engraving equipment; determining a bar code character string to be decoded according to the determined first preset character areas and the determined second preset character areas; and generating one-dimensional bar code information according to the bar code character string to be decoded.
Optionally, the method further comprises: and sending the generated one-dimensional bar code information to an associated display terminal to display the one-dimensional bar code information.
Optionally, the performing threshold segmentation processing on the stereo barcode image to obtain a stereo barcode image after the threshold segmentation processing as a threshold segmentation barcode image includes: for each stereoscopic barcode pixel in the stereoscopic barcode image, the following steps are performed: in response to determining that the pixel value corresponding to the stereoscopic barcode pixel is greater than or equal to a preset pixel threshold, updating the pixel value corresponding to the stereoscopic barcode pixel to a first pixel threshold so as to update the pixel value corresponding to the stereoscopic barcode pixel; in response to determining that the pixel value corresponding to the stereoscopic barcode pixel is less than the preset pixel threshold, updating the pixel value corresponding to the stereoscopic barcode pixel to a second pixel threshold, so as to update the pixel value corresponding to the stereoscopic barcode pixel, wherein the second pixel threshold is less than the first pixel threshold; and determining the bar code image formed by the three-dimensional bar code pixels after updating the pixel values as a threshold segmentation bar code image.
Optionally, the determining the barcode string to be decoded according to the determined first preset character areas and the determined second preset character areas includes: for each first preset character area in the first preset character areas, determining the character corresponding to the first preset character area as a first character; sorting the determined first characters to obtain first character strings; for each second preset character area in the second preset character areas, determining the character corresponding to the second preset character area as a second character; sorting the determined second characters to obtain sorted second characters serving as second character strings; and sequencing the first character string and the second character string to generate a bar code character string to be decoded.
Optionally, the generating one-dimensional bar code information according to the bar code character string to be decoded includes: determining each bar code character to be decoded, which satisfies a preset decoding start character position condition, in the bar code character string to be decoded as a decoding start character set; determining each bar code character to be decoded, which satisfies a preset check character position condition, in the bar code character string to be decoded as a check character set; deleting the decoding start character set and the verification character set in the bar code character string to be decoded to obtain the bar code character string to be decoded after deletion as a data character string to be decoded; and generating one-dimensional bar code information according to the preset character set and the data character string to be decoded.
Optionally, the generating one-dimensional bar code information according to the preset character set and the to-be-decoded data character string includes: dividing the data character string to be decoded according to a preset dividing threshold value to generate a divided character string set; for each of the divided character strings in the divided character string set, performing conversion processing on the divided character string to generate converted character information; determining each generated conversion character information as a conversion character information set; for each conversion character information in the conversion character information set, determining preset characters in the preset character set meeting the matching conditions corresponding to the conversion character information as bar code characters; one-dimensional bar code information is determined based on the determined individual bar code characters.
In a second aspect, some embodiments of the present disclosure provide a handheld 3D barcode single-line laser decoding apparatus applied to the 3D structure-based one-dimensional barcode information generation method as described in the first aspect, wherein the handheld 3D barcode single-line laser decoding apparatus includes: the camera component is arranged on the left side of the decoding equipment main body, comprises an optical filter and a camera, wherein the optical filter is arranged at the front end of the camera, and the optical filter is used for filtering out shot image ambient light; the single line laser is arranged on the left side of the decoding equipment main body, the single line laser and the camera component are positioned at the same horizontal position, and the single line laser is used for projecting emitted single line laser onto the 3D bar code; the touch display screen component is arranged on the upper side of the decoding equipment main body and is used for displaying decoding information; the battery module assembly is arranged at the lower side of the decoding equipment main body and is fixedly connected with the decoding equipment main body; the camera assembly, the single-wire laser, the touch display screen assembly and the battery module assembly are all in communication connection with the decoding processor.
Optionally, the handheld 3D barcode single-wire laser decoding device further includes a handle assembly, where the handle assembly is disposed in a middle part of a lower side of the decoding device main body, and the handle assembly is fixedly connected with the decoding device main body.
Optionally, the handheld 3D barcode single-line laser decoding device further includes a switch assembly, where the switch assembly includes a switch housing and a switch controller, where the switch housing is engaged with the handle assembly, and where the switch controller is disposed in the switch housing, and where the camera assembly, the single-line laser, the battery module assembly, and the touch display assembly are all electrically connected with the switch assembly.
Optionally, the decoding processor is disposed inside the decoding apparatus main body.
The above embodiments of the present disclosure have the following advantages: according to the one-dimensional bar code information generation method based on the 3D structure, which is disclosed by the embodiment of the invention, the decoding accuracy of the bar code can be improved and the application range of the bar code can be enlarged. Specifically, the reasons that lead to lower decoding accuracy of the bar code and smaller application range of the bar code are: under the condition that high-contrast black-and-white alternate bar code labels are adhered to or printed on the surface of a material under the conventional (e.g. normal temperature) condition, the existing bar code scanner has higher working efficiency, and can meet most of scene requirements. In some application scenarios with complex conditions (such as high temperature, greasy dirt, and multiple dust), the decoding accuracy of the bar code is low due to the high damage of the complex environment to the bar code (the probability of damaging the bar code label is high), that is, the generated bar code information has more error content or the bar code information cannot be identified. And simultaneously, the application range of the bar code is smaller. Based on this, the one-dimensional barcode information generation method based on the 3D structure of some embodiments of the present disclosure first acquires a target barcode image by an associated image acquisition device. Wherein the target bar code image is a one-dimensional bar code image having 3D structural information and having laser projection lines. Thus, a target barcode image can be obtained, so that the barcode can be decoded from the 3D structure information of the barcode. And then, filtering the target bar code image by using a filter to obtain a filtered target bar code image serving as a stereoscopic bar code image. Therefore, the stereoscopic bar code image after the ambient light filtering treatment can be obtained, and the information extraction of the stereoscopic structure information is facilitated. And then, carrying out threshold segmentation processing on the stereoscopic barcode image to obtain a stereoscopic barcode image subjected to threshold segmentation processing as a threshold segmentation barcode image. Thus, a thresholded bar code image that characterizes the binarized gray scale map can be obtained. And then, carrying out straight line fitting processing on each threshold segmentation bar code pixel point meeting a preset threshold condition in the threshold segmentation bar code image so as to generate a gray fitting straight line. Thus, a gray scale fit line can be obtained, which can be used to determine the pixel brightness of the pixels in the bar code image. Along with the determination of the distance between each threshold-value-division bar code pixel point in the threshold-value-division bar code image and the gray level fitting straight line, a pixel distance set is obtained. Thus, a set of pixel distances may be obtained, which may be used to distinguish corresponding pixel areas in the barcode image. Next, for each pixel distance in the set of pixel distances, the following steps are performed: determining a pixel region corresponding to the pixel distance according to the pixel distance; and determining the pixel area as a first preset character area in response to determining that the pixel distance meets a preset pixel distance condition. The first preset character area is a stereoscopic image area engraved by the laser engraving equipment. Thus, a first predetermined character area may be obtained, which may be used to determine the character corresponding to the laser engraved bar area of the bar code. Then, in response to determining that the pixel distance does not satisfy the preset pixel distance condition, the pixel region is determined as a second preset character region. The second preset character area is a blank area which is not engraved by the laser engraving equipment. Thus, a second preset character area can be obtained, and thus the character corresponding to the blank bar area of the bar code can be determined. And then, determining the bar code character string to be decoded according to the determined first preset character areas and the determined second preset character areas. Thus, a bar code character string to be decoded which can be recognized by a machine can be obtained. And finally, generating one-dimensional bar code information according to the bar code character string to be decoded. Thus, one-dimensional bar code information recognizable to the user can be obtained. Thus completing decoding of the bar code. Also because the identified bar areas are bar areas of the material surface subjected to laser engraving, the damage of the complex environment to the bar code (the damage probability of the bar code label is smaller) can be reduced, so that the decoding accuracy of the bar code can be improved, namely, the error content of the generated bar code information is less. The application range of the bar code can be expanded.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow chart of some embodiments of a 3D structure-based one-dimensional bar code information generation method according to the present disclosure;
FIG. 2 is an image of a single line laser projected onto a 3D one-dimensional bar code pattern according to the present disclosure;
fig. 3 is a laser image (stereoscopic barcode image) photographed based on an image pickup device and subjected to a filter-filter process according to the present disclosure.
Fig. 4 is a schematic structural view of a handheld 3D barcode single line laser decoding device according to the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings. Embodiments of the present disclosure and features of embodiments may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates a flow 100 of some embodiments of a 3D structure-based one-dimensional barcode information generation method according to the present disclosure. The one-dimensional bar code information generation method based on the 3D structure comprises the following steps:
step 101, acquiring a target bar code image by an associated image acquisition device.
In some embodiments, an executing subject of a 3D structure-based one-dimensional barcode information generation method (e.g., a handheld 3D barcode single line laser decoding device) may acquire a target barcode image through an associated image acquisition device. Wherein the target bar code image is a one-dimensional bar code image having 3D structural information and having laser projection lines. As an example, the target barcode image described above may refer to fig. 2. The target barcode image may be a barcode image acquired from a surface of the target object by an associated image acquisition device. The target object may be an object capable of laser printing. The target object is not particularly limited herein. For example, the target object may be a hub of a high-speed railway vehicle. The associated image capture device may be a device capable of capturing an image of a target bar code. For example, the associated image capture device may be an industrial camera. Here, the laser projection line may be a one-dimensional laser projection line emitted by an associated laser emitter. For example, the associated laser emitters described above may be single-wire laser emitters. It is understood that the associated image acquisition device can acquire a bar code image with 3D structural information due to the projection of one-dimensional laser projection lines. The 3D structure information may be structure information including bar height, bar width, and bar depth of the bar code. For example, the bar height may be 20 millimeters. The strip width may be 1 mm. The stripe depth may be 1 millimeter.
Further, in the process of solving the technical problems mentioned in the background art by adopting the technical scheme, the inventor finds that the accuracy requirement of decoding the bar code by the user is higher, and the conventional technical scheme for meeting the accuracy requirement of identifying the bar code by the user is that in the process of encoding the bar code, the purpose of encoding the bar code is achieved by setting various data structures (such as a start symbol, a left data area, a middle separator, a right data area, a check symbol and a terminator) and various bar code widths (widths of different symbols are different) for the bar code. However, the coding structure of the method is complex, the types of the width of the bar codes are more, and the misdecoding probability is higher. The inventor decides to set a width for each black-and-white bar of the bar code in consideration of meeting the accuracy requirement of decoding the bar code of the user, simplifying the encoding structure, reducing the width variety of the bar code, thereby reducing the error decoding probability of the bar code, and sets the structure of the bar code as a start character (preset start character information) +data information (binary information set to be encoded) +check character (binary check information). Therefore, the effects of meeting the accuracy requirement of decoding the bar code of the user, simplifying the coding structure, reducing the width variety of the bar code and reducing the misdecoding probability of the bar code can be achieved.
In some alternative implementations of some embodiments, the target bar code in the target bar code image described above may be generated by:
first, obtaining a character string to be encoded. In practice, the executing body may acquire the character string to be encoded from the information database to be encoded. The character string to be encoded may be a character string waiting to be encoded to form a bar code. For example, the character string to be encoded may be A4F9T09Y. The information database to be encoded may be an information database storing a target character string to be encoded.
And secondly, determining a character information set to be encoded corresponding to the character string to be encoded according to the character string to be encoded and a preset character set. In practice, first, for each character to be encoded in the character string to be encoded, the execution body may determine, as character information to be encoded, a subscript of a preset character in a preset character set corresponding to the character to be encoded, and then may determine, as a set of character information to be encoded, each determined character information to be encoded. The preset character set may be a preset character set. Here, the predetermined character set may be {0,1,2,3,4,5,6,7,8,9, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z }. The character string to be encoded may be A4F9T09Y. The set of character information to be encoded corresponding to the character string to be encoded may be {11,5, 16, 10, 30,1, 10, 35}.
And thirdly, performing binary conversion processing on each piece of character information to be coded included in the character information set to be coded, and obtaining each piece of character information to be coded after the binary conversion processing as a binary information set to be coded.
And step four, determining check bit sum information corresponding to the character information set to be encoded according to the character information set to be encoded. In practice, first, for each character information to be encoded in the set of character information to be encoded, the execution body may determine the third power of the character information to be encoded as the first character information to be encoded. Then, the sum of the determined respective first character information to be encoded may be determined as check bit sum information. For example, the set of character information to be encoded may be {11,5, 16, 10, 30,1, 10, 35}. The checksum information may be 77428.
And fifthly, generating check information according to the check bit sum information and a preset check threshold value. The preset verification threshold may be a preset verification threshold. Here, the preset verification threshold may be 256. In practice, the execution body may determine the remainder of the checksum information and the preset checksum threshold as the checksum information. Here, the checksum information may be a dividend. The preset verification threshold may be a divisor.
And sixthly, performing binary conversion processing on the check information according to a preset check bit threshold value to obtain the check information subjected to binary conversion processing as binary check information. The preset check bit threshold may be a preset check bit threshold. Here, the preset check bit threshold may be 8. In practice, the execution body may convert the verification information into binary information corresponding to the preset threshold number of the verification bits, and obtain the verification information after the binary conversion processing as binary verification information. For example, the verification information may be 116. The binary check information may be 01110100.
Seventh, according to the preset beginning character information, the binary information set to be coded and the binary verification information, a binary bar code coding information set is generated. The binary bar code coding information in the binary bar code coding information set corresponds to each stereoscopic bar code pixel point in the stereoscopic bar code image one by one. In practice, the execution body may perform a combination process on the preset start character information, the binary information set to be encoded, and the binary verification information to generate a binary barcode encoded information set. Here, the manner of the combining process may be splicing. The splicing sequence can be { preset beginning character information + binary information set to be coded + binary check information }.
Eighth, for each binary bar code encoded information in the set of binary bar code encoded information, performing the steps of:
And a first sub-step, responding to the fact that the binary bar code coding information meets the preset character condition, taking a preset height threshold value as the bar code height, taking a preset width threshold value as the bar code width and taking a preset depth threshold value as the bar code depth, and carrying out laser engraving processing on the bar area corresponding to the binary bar code coding information by using the associated laser engraving equipment. The strip-shaped area may be a blank strip-shaped area on the surface of the target object. The predetermined character condition may be that the binary bar code encoded information is equal to the first predetermined character. Here, the first preset character may be 0. The preset height threshold may be a preset height threshold. Here, the preset height threshold may be 20 mm. The preset width threshold may be a preset width threshold. Here, the preset width threshold may be 1 mm. The preset depth threshold may be a preset depth. Here, the preset depth threshold may be 1 millimeter. The above-described associated laser engraving apparatus may be an apparatus capable of performing laser engraving on the surface of the target object. For example, the above-described associated laser engraving device may be a laser marking machine.
And a second sub-step of performing area white processing on a bar area corresponding to the binary bar code coding information by taking the preset height threshold value as the bar code height and the preset width threshold value as the bar code width in response to determining that the binary bar code coding information does not meet the preset character condition. Here, the area-blank processing may be performed on the bar-shaped area corresponding to the binary bar-code encoded information by adjusting the power of the laser of the associated laser engraving apparatus (reducing the laser power) or turning off the laser.
And ninth, shooting each bar-shaped area subjected to laser engraving processing and each bar-shaped area subjected to area white processing by using an associated image acquisition device, and obtaining a bar-code image as a target bar-code image. The associated image capturing device may be a device capable of capturing an image of a bar area of a bar code. And the bar codes corresponding to the bar areas subjected to the laser engraving treatment and the bar areas subjected to the area blank treatment, which are displayed in the target bar code image, are target bar codes. Here, the bar codes corresponding to the respective bar regions after the laser engraving process and the respective bar regions after the region blank process may be bar codes formed by splicing together the respective bar regions after the laser engraving process and the respective bar regions after the region blank process.
The first to ninth steps and the related content thereof are taken as an invention point of the embodiment of the disclosure, and the technical problems of complex coding structure, more bar code width types and higher misinterpretation probability are solved. The factors that lead to complex coding structure, more kinds of bar code width and higher probability of misdecoding are often as follows: in the process of encoding the bar code, the bar code is encoded by arranging various data structures (such as a start symbol, a left data area, a middle separator, a right data area, a check symbol and a terminator) and various bar code bar widths (different widths of different symbols) on the bar code. If the above factors are solved, the effects of simplifying the coding structure and reducing the width types of the bar codes can be achieved, so that the misdecoding probability of the bar codes is reduced. To achieve this effect, the present disclosure sets a width for both black and white bars of a bar code, and sets the structure of the bar code to a start character (preset start character information) +data information (binary set of information to be encoded) +a check symbol (binary check information). Therefore, the effects of meeting the accuracy requirement of decoding the bar code of the user, simplifying the coding structure, reducing the width variety of the bar code and reducing the misdecoding probability of the bar code can be achieved.
And 102, performing filtering processing on the target bar code image by using a filter to obtain the filtered target bar code image serving as a stereoscopic bar code image.
In some embodiments, the executing body may perform filtering processing on the target barcode image by using a filter, so as to obtain the filtered target barcode image as the stereoscopic barcode image. In practice, the execution subject may perform filtering processing on the target barcode image using a filter, and obtain the filtered target barcode image as a stereoscopic barcode image. As an example, the stereoscopic barcode image described above may refer to fig. 3.
And 103, performing threshold segmentation processing on the stereoscopic barcode image to obtain a stereoscopic barcode image subjected to the threshold segmentation processing as a threshold segmentation barcode image.
In some embodiments, the executing body may perform a threshold segmentation process on the stereoscopic barcode image, and obtain the stereoscopic barcode image after the threshold segmentation process as the threshold segmentation barcode image.
In some optional implementations of some embodiments, the executing body may perform a thresholding process on the stereoscopic barcode image by using the stereoscopic barcode image after the thresholding process as a thresholded barcode image:
first, for each stereoscopic barcode pixel in the stereoscopic barcode image, the following steps are performed:
And a first sub-step, in response to determining that the pixel value corresponding to the stereoscopic barcode pixel is greater than or equal to a preset pixel threshold, updating the pixel value corresponding to the stereoscopic barcode pixel to a first pixel threshold so as to update the pixel value corresponding to the stereoscopic barcode pixel. The preset pixel threshold may be a preset pixel threshold. Here, the preset pixel threshold may be 128. The first pixel threshold may be 255.
And a second sub-step of updating the pixel value corresponding to the stereoscopic barcode pixel to a second pixel threshold value in response to determining that the pixel value corresponding to the stereoscopic barcode pixel is smaller than the preset pixel threshold value, so as to update the pixel value corresponding to the stereoscopic barcode pixel. Wherein the second pixel threshold is smaller than the first pixel threshold. Here, the second pixel threshold may be 0.
And secondly, determining a bar code image formed by the pixels of each stereoscopic bar code after updating the pixel values as a threshold segmentation bar code image.
And 104, performing straight line fitting processing on each threshold segmentation bar code pixel point meeting a preset threshold condition in the threshold segmentation bar code image to generate a gray fitting straight line.
In some embodiments, the executing body may perform a line fitting process on each of the threshold-segmented barcode pixels in the threshold-segmented barcode image that satisfy a preset threshold condition, so as to generate a gray-scale fitting line. The gray fitting straight line can represent the linear relation of each threshold segmentation bar code pixel point meeting the preset threshold condition in the threshold segmentation bar code image. The preset threshold condition may be that a pixel value of the threshold-divided barcode pixel point is equal to a first preset pixel threshold. Here, the first preset pixel threshold may be 255. In practice, first, the executing body may perform a straight line fitting process on each threshold-divided barcode pixel point in the threshold-divided barcode image that satisfies a preset threshold condition by using a least square algorithm, so as to obtain a straight line after the fitting process as a gray-scale fitting straight line.
And 105, determining the distance between each threshold segmentation bar code pixel point in the threshold segmentation bar code image and the gray fitting straight line to obtain a pixel distance set.
In some embodiments, the executing body may determine a distance between each thresholding barcode pixel point in the thresholding barcode image and the gray scale fitting straight line, to obtain a set of pixel distances. When the threshold segmentation bar code pixel points are on the gray fitting straight line, the pixel distance is 0. In practice, the executing body can determine the distance between each threshold segmentation bar code pixel point in the threshold segmentation bar code image and the gray fitting straight line through a point-to-straight line distance formula, so as to obtain a pixel distance set.
Step 106, for each pixel distance in the set of pixel distances, performing the steps of:
in step 1061, a pixel region corresponding to the pixel distance is determined according to the pixel distance.
In some embodiments, according to the pixel distance, the execution body may determine a pixel region corresponding to the pixel distance. In practice, first, the execution body may determine the threshold-divided barcode pixel point corresponding to the pixel distance as the first pixel point. Then, the region corresponding to the first pixel point may be determined as a pixel region.
In response to determining that the pixel distance satisfies the preset pixel distance condition, a pixel region is determined to be a first preset character region, step 1062.
In some embodiments, the execution body may determine the pixel region as the first preset character region in response to determining that the pixel distance satisfies a preset pixel distance condition. The first preset character area is a stereoscopic image area engraved by the laser engraving equipment. The preset pixel distance condition may be that the pixel distance is greater than the first preset pixel distance and less than the second preset pixel distance. Here, the first preset pixel distance may be a preset pixel distance. For example, the first preset pixel distance may be 6. The second preset pixel distance may be a preset pixel distance. For example, the second preset pixel distance may be 20. Here, the first preset character region may be a region in which a character is 0 in the binary-coded character. In practice, the execution body may determine the pixel region as a first preset character region in response to determining that the pixel distance satisfies a preset pixel distance condition.
In response to determining that the pixel distance does not meet the preset pixel distance condition, step 1063, the pixel region is determined to be a second preset character region.
In some embodiments, the execution body may determine the pixel region as a second preset character region in response to determining that the pixel distance does not satisfy the preset pixel distance condition. The second preset character area is a blank area which is not engraved by the laser engraving equipment. Here, the second preset character area may be an area with a character of 1 in the binary coded character. In practice, the execution body may determine the pixel region as a second preset character region in response to determining that the pixel distance does not satisfy the preset pixel distance condition.
Step 107, determining the bar code character string to be decoded according to the determined first preset character areas and the determined second preset character areas.
In some embodiments, the executing body may determine the bar code character string to be decoded according to the determined respective first preset character areas and the determined respective second preset character areas.
In some optional implementations of some embodiments, the executing entity may determine the barcode string to be decoded according to the determined respective first preset character areas and the determined respective second preset character areas by:
The first step, for each first preset character area in the first preset character areas, determining the character corresponding to the first preset character area as a first character. Here, the first preset character may be 0.
And secondly, sorting the determined first characters to obtain the first characters after sorting as a first character string. In practice, the execution body may perform the sorting process on each first character according to the positional relationship of each threshold segmentation barcode pixel point corresponding to each first character, so as to obtain each first character after the sorting process as the first character string.
And thirdly, determining the character corresponding to each second preset character area as a second character for each second preset character area in the second preset character areas. Here, the second character may be 1.
And step four, sorting the determined second characters to obtain sorted second characters serving as second character strings. In practice, the execution body may perform the sorting process on each second character according to the positional relationship of each threshold segmentation barcode pixel point corresponding to each second character, so as to obtain each second character after the sorting process as the second character string.
And fifthly, sorting the first character string and the second character string to generate a bar code character string to be decoded. In practice, the execution body may sort the first character string and the second character string according to the positional relationship of the respective threshold segmentation barcode pixel points corresponding to the first character string and the second character string, so as to obtain the barcode character string to be decoded.
And step 108, generating one-dimensional bar code information according to the bar code character string to be decoded.
In some embodiments, the execution body may generate one-dimensional bar code information according to the bar code character string to be decoded.
In some optional implementations of some embodiments, according to the barcode string to be decoded, the executing entity may generate the one-dimensional barcode information by:
And determining each bar code symbol to be decoded, which satisfies the preset decoding start character position condition, in the bar code character string to be decoded as a decoding start character set. The preset decoding start character position condition may be a preset decoding start character position condition. Here, it is described. The preset decoding start character position condition may be that the position of the bar code character to be decoded is located in the first 4 bits of the bar code character string to be decoded.
And secondly, determining each bar code symbol to be decoded, which satisfies the preset check character position condition, in the bar code character string to be decoded as a check character set. The preset check character position condition may be a preset check character position condition. Here, the preset check character position condition may be that the barcode symbol position to be decoded is located in the last 8 bits of the barcode string to be decoded.
And thirdly, deleting the decoding start character set and the verification character set in the bar code character string to be decoded to obtain the bar code character string to be decoded after deletion as a data character string to be decoded.
And fourthly, generating one-dimensional bar code information according to the preset character set and the data character string to be decoded. The preset character set may be a preset character set. Here, the predetermined character set may be {0,1,2,3,4,5,6,7,8,9, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z }.
In some optional implementations of some embodiments, the executing entity may generate the one-dimensional barcode information according to a preset character set and the data string to be decoded by:
The first step, the data character string to be decoded is segmented according to a preset segmentation threshold value, so as to generate a segmented character string set. The preset dividing threshold may be a preset dividing threshold. Here, it is described. The preset division threshold may be 6. In practice, the execution body may divide the data character string to be decoded into a group of continuous data characters to be decoded corresponding to a preset threshold number, so as to obtain the data character string to be decoded after the division processing as a division character string set.
And a second step of performing conversion processing on the divided character strings for each divided character string in the divided character string set to generate converted character information. The conversion process may be a binary conversion process of data. The above-described binary conversion process may include, but is not limited to: binary conversion processing, octal conversion processing, decimal conversion processing, and hexadecimal conversion processing. Here, the above-described binary conversion process may be a decimal conversion process. In practice, for each of the divided strings in the divided string set, the execution body may perform decimal conversion processing on the divided string to obtain the divided string after decimal conversion processing as the converted character information.
And thirdly, determining each generated conversion character information as a conversion character information set.
Fourth, for each converted character information in the converted character information set, determining the preset character in the preset character set meeting the matching condition corresponding to the converted character information as a bar code character. Here, the matching condition corresponding to the converted character information may be that the converted character information is equal to a subscript of a preset character in the preset character set.
And fifthly, determining one-dimensional bar code information according to the determined bar code characters. In practice, first, the execution subject may determine the position of each bar code character, and then, look up a meaning comparison table corresponding to the character at the position to determine one-dimensional bar code information. Specifically, each of the barcode characters described above may be A4F9T09Y. The first bit a may characterize the company name. The second bit 4 may characterize the factory name. The last five bits F9T09Y may characterize the device name. For example, the one-dimensional bar code information may be a high-speed rail hub produced by company a, company B, factory. The meaning comparison table may be a preset comparison table storing the meaning of the bar code character.
Optionally, the executing body further transmits the generated one-dimensional barcode information to an associated display terminal to display the one-dimensional barcode information. The associated display terminal may be a display terminal capable of displaying information of the one-dimensional barcode information. For example, the associated display terminal may be a touch screen display.
Optionally, the decoding processor is disposed inside the decoding apparatus main body.
The above embodiments of the present disclosure have the following advantages: according to the one-dimensional bar code information generation method based on the 3D structure, which is disclosed by the embodiment of the invention, the decoding accuracy of the bar code can be improved and the application range of the bar code can be enlarged. Specifically, the reasons that lead to lower decoding accuracy of the bar code and smaller application range of the bar code are: under the condition that high-contrast black-and-white alternate bar code labels are adhered to or printed on the surface of a material under the conventional (e.g. normal temperature) condition, the existing bar code scanner has higher working efficiency, and can meet most of scene requirements. In some application scenarios with complex conditions (such as high temperature, greasy dirt, and multiple dust), the decoding accuracy of the bar code is low due to the high damage of the complex environment to the bar code (the probability of damaging the bar code label is high), that is, the generated bar code information has more error content or the bar code information cannot be identified. And simultaneously, the application range of the bar code is smaller. Based on this, the one-dimensional barcode information generation method based on the 3D structure of some embodiments of the present disclosure first acquires a target barcode image by an associated image acquisition device. Wherein the target bar code image is a one-dimensional bar code image having 3D structural information and having laser projection lines. Thus, a target barcode image can be obtained, so that the barcode can be decoded from the 3D structure information of the barcode. And then, filtering the target bar code image by using a filter to obtain a filtered target bar code image serving as a stereoscopic bar code image. Therefore, the stereoscopic bar code image after the ambient light filtering treatment can be obtained, and the information extraction of the stereoscopic structure information is facilitated. And then, carrying out threshold segmentation processing on the stereoscopic barcode image to obtain a stereoscopic barcode image subjected to threshold segmentation processing as a threshold segmentation barcode image. Thus, a thresholded bar code image that characterizes the binarized gray scale map can be obtained. And then, carrying out straight line fitting processing on each threshold segmentation bar code pixel point meeting a preset threshold condition in the threshold segmentation bar code image so as to generate a gray fitting straight line. Thus, a gray scale fit line can be obtained, which can be used to determine the pixel brightness of the pixels in the bar code image. Along with the determination of the distance between each threshold-value-division bar code pixel point in the threshold-value-division bar code image and the gray level fitting straight line, a pixel distance set is obtained. Thus, a set of pixel distances may be obtained, which may be used to distinguish corresponding pixel areas in the barcode image. Next, for each pixel distance in the set of pixel distances, the following steps are performed: determining a pixel region corresponding to the pixel distance according to the pixel distance; and determining the pixel area as a first preset character area in response to determining that the pixel distance meets a preset pixel distance condition. The first preset character area is a stereoscopic image area engraved by the laser engraving equipment. Thus, a first predetermined character area may be obtained, which may be used to determine the character corresponding to the laser engraved bar area of the bar code. Then, in response to determining that the pixel distance does not satisfy the preset pixel distance condition, the pixel region is determined as a second preset character region. The second preset character area is a blank area which is not engraved by the laser engraving equipment. Thus, a second preset character area can be obtained, and thus the character corresponding to the blank bar area of the bar code can be determined. And then, determining the bar code character string to be decoded according to the determined first preset character areas and the determined second preset character areas. Thus, a bar code character string to be decoded which can be recognized by a machine can be obtained. And finally, generating one-dimensional bar code information according to the bar code character string to be decoded. Thus, one-dimensional bar code information recognizable to the user can be obtained. Thus completing decoding of the bar code. Also because the identified bar areas are bar areas of the material surface subjected to laser engraving, the damage of the complex environment to the bar code (the damage probability of the bar code label is smaller) can be reduced, so that the decoding accuracy of the bar code can be improved, namely, the error content of the generated bar code information is less. The application range of the bar code can be expanded.
Fig. 4 is a schematic structural view of some embodiments of a handheld 3D barcode single line laser decoding device according to the present disclosure. Fig. 4 includes: a decoding device body 1, a camera assembly 2, a single-wire laser 3, a touch display screen assembly 4, a battery module assembly 5, a handle assembly 6, and a switch assembly 7.
In some embodiments, the camera assembly 2 is disposed on the left side of the decoding apparatus body 1, the camera assembly 2 includes a filter and a camera, the filter is disposed on the front end of the camera, and the filter is used to filter out the captured image ambient light. The camera is used for shooting the bar code. The video camera in the camera assembly can be used as an image acquisition device.
In some embodiments, the single line laser 3 is disposed on the left side of the decoding apparatus body 1, the single line laser 3 is at the same level as the camera assembly 2, and the single line laser 3 is used to project the emitted single line laser onto the 3D barcode. It is understood that the single line laser emits single line laser light onto the 3D barcode and the camera assembly photographs the 3D barcode with the single line laser beam. The 3D bar code can be a 3D bar code formed on the surface of the material through laser engraving.
In some embodiments, the touch display assembly 4 is disposed on the upper side of the decoding apparatus body 1, and the touch display assembly 4 is used for displaying decoding information. Meanwhile, the touch display screen assembly may also be used to manually input characters below the bar code and display decoding information of the inputted bar code.
In some embodiments, the battery module assembly 5 is disposed at the lower side of the decoding apparatus body 1, and the battery module assembly 5 is fixedly connected to the decoding apparatus body. The fixed connection may be an integral connection. The above battery module assembly may be an assembly capable of supplying power to the decoding apparatus body.
In some embodiments, the camera assembly 2, the single line laser 3, the touch display screen assembly 4, and the battery module assembly 5 are all communicatively coupled to the decode processor. Here, the decoding processor may be a microcontroller or a microprocessor.
Optionally, the handheld 3D barcode single-wire laser decoding apparatus further includes a handle assembly 6, where the handle assembly 6 is disposed in a middle portion of a lower side of the decoding apparatus main body 1, and the handle assembly 6 is fixedly connected with the decoding apparatus main body 1. Here, the manner of the fixed connection may be an integral connection.
Optionally, the handheld 3D barcode single-line laser decoding apparatus further includes a switch assembly 7, where the switch assembly 7 includes a switch housing and a switch controller, the switch housing is embedded with the handle assembly 6, the switch controller is disposed in the switch housing, and the camera assembly 2, the single-line laser 3, the battery module assembly 5, and the touch display screen assembly 4 are electrically connected with the switch assembly 7. Here, the switch controller may be a processor or a microprocessor that performs circuit control of the camera assembly, the single line laser, the battery module assembly, and the touch display screen assembly.
Alternatively, the decoding processor is provided inside the decoding apparatus main body 1. The position of the decoding processor in the decoding apparatus main body is not particularly limited. For example, the decoding processor is in the middle of the inside of the decoding apparatus main body.
The above embodiments of the present disclosure have the following advantages: through the handheld 3D bar code single-line laser decoding device of some embodiments of the present disclosure, the decoding mode of the bar code scanning device can be increased, and the application range of the bar code scanning device is enlarged. Specifically, the decoding mode of the barcode scanning device is single, and the reason why the application range of the barcode scanning device is small is that: because the one-dimensional bar code label stuck or printed on the surface of the material only has two-dimensional information (bar height and width of the bar code) of the bar code, the bar code scanning device decodes the bar code only through the two-dimensional information of the bar code, so that the decoding mode of the bar code scanning device is single, and the application range of the bar code scanning device is smaller. Based on this, the hand-held 3D barcode single-line laser decoding apparatus of some embodiments of the present disclosure, first, the above-described hand-held 3D barcode single-line laser decoding apparatus includes: the camera component is arranged on the left side of the decoding equipment main body, comprises an optical filter and a camera, wherein the optical filter is arranged at the front end of the camera, and the optical filter is used for filtering out shot image ambient light; the single line laser is arranged on the left side of the decoding equipment main body, the single line laser and the camera component are positioned at the same horizontal position, and the single line laser is used for projecting emitted single line laser onto the 3D bar code; the touch display screen component is arranged on the upper side of the decoding equipment main body and is used for displaying decoding information; the battery module assembly is arranged at the lower side of the decoding equipment main body and is fixedly connected with the decoding equipment main body; the camera assembly, the single-wire laser, the touch display screen assembly and the battery module assembly are all in communication connection with the decoding processor. Also because through setting up single line laser in equipment to use the camera to shoot 3D bar code, can catch the 3D structural information of bar code, and decode the 3D structural information of bar code through decoding the treater, increase the decoding mode of bar code scanning equipment, enlarge bar code scanning equipment's application scope. And because the optical filter is arranged at the front end of the camera, the shot image ambient light can be filtered, and the decoding accuracy of the bar code can be improved, namely, the error content of the generated bar code information is less.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (9)

1. A one-dimensional bar code information generation method based on a 3D structure comprises the following steps:
acquiring a target bar code image by an associated image acquisition device, wherein the target bar code image is a one-dimensional bar code image with 3D structural information and laser projection lines;
Filtering the target bar code image by using an optical filter to obtain a filtered target bar code image serving as a stereoscopic bar code image;
Threshold segmentation processing is performed on the stereoscopic barcode image to obtain a stereoscopic barcode image after threshold segmentation processing as a threshold segmentation barcode image, wherein the threshold segmentation processing is performed on the stereoscopic barcode image to obtain a stereoscopic barcode image after threshold segmentation processing as a threshold segmentation barcode image, and the method comprises the following steps:
For each stereoscopic barcode pixel in the stereoscopic barcode image, performing the steps of:
in response to determining that the pixel value corresponding to the stereoscopic barcode pixel is greater than or equal to a preset pixel threshold, updating the pixel value corresponding to the stereoscopic barcode pixel to a first pixel threshold so as to update the pixel value corresponding to the stereoscopic barcode pixel;
In response to determining that the pixel value corresponding to the stereoscopic barcode pixel is less than the preset pixel threshold, updating the pixel value corresponding to the stereoscopic barcode pixel to a second pixel threshold to update the pixel value corresponding to the stereoscopic barcode pixel, wherein the second pixel threshold is less than the first pixel threshold;
Determining a bar code image formed by each three-dimensional bar code pixel after pixel value updating as a threshold segmentation bar code image;
Performing straight line fitting processing on each threshold segmentation bar code pixel point meeting a preset threshold condition in the threshold segmentation bar code image to generate a gray fitting straight line;
Determining the distance between each threshold segmentation bar code pixel point in the threshold segmentation bar code image and the gray fitting straight line to obtain a pixel distance set;
for each pixel distance in the set of pixel distances, performing the steps of:
Determining a pixel region corresponding to the pixel distance according to the pixel distance;
In response to determining that the pixel distance meets a preset pixel distance condition, determining the pixel area as a first preset character area, wherein the first preset character area is a stereoscopic image area engraved by laser engraving equipment;
in response to determining that the pixel distance does not meet the preset pixel distance condition, determining the pixel area as a second preset character area, wherein the second preset character area is a blank area which is not engraved by the laser engraving equipment;
Determining a bar code character string to be decoded according to the determined first preset character areas and the determined second preset character areas;
and generating one-dimensional bar code information according to the bar code character string to be decoded.
2. The method of claim 1, wherein the method further comprises:
And sending the generated one-dimensional bar code information to an associated display terminal to display the one-dimensional bar code information.
3. The method of claim 1, wherein the determining the bar code string to be decoded from the determined respective first preset character areas and the determined respective second preset character areas comprises:
for each first preset character area in the first preset character areas, determining the character corresponding to the first preset character area as a first character;
sorting the determined first characters to obtain first character strings;
For each second preset character area in the second preset character areas, determining the character corresponding to the second preset character area as a second character;
Sorting the determined second characters to obtain sorted second characters serving as second character strings;
and sequencing the first character string and the second character string to generate a bar code character string to be decoded.
4. The method of claim 1, wherein the generating one-dimensional bar code information from the bar code string to be decoded comprises:
determining each bar code character to be decoded, which satisfies a preset decoding start character position condition, in the bar code character string to be decoded as a decoding start character set;
Determining each bar code character to be decoded, which satisfies a preset check character position condition, in the bar code character string to be decoded as a check character set;
deleting the decoding start character set and the check character set in the bar code character string to be decoded to obtain the bar code character string to be decoded after deletion as a data character string to be decoded;
And generating one-dimensional bar code information according to a preset character set and the data character string to be decoded.
5. The method of claim 4, wherein the generating one-dimensional bar code information from the preset character set and the data string to be decoded comprises:
dividing the data character string to be decoded according to a preset dividing threshold value to generate a divided character string set;
for each segmented string in the set of segmented strings, performing conversion processing on the segmented string to generate converted character information;
determining each generated conversion character information as a conversion character information set;
For each conversion character information in the conversion character information set, determining preset characters in the preset character set meeting the matching conditions corresponding to the conversion character information as bar code characters;
one-dimensional bar code information is determined based on the determined individual bar code characters.
6. A handheld 3D barcode single line laser decoding device for use in the method of one of claims 1-5, wherein the handheld 3D barcode single line laser decoding device comprises: the decoding device comprises a decoding device main body, a camera component, a single-line laser, a touch display screen component, a battery module component and a decoding processor,
The camera component is arranged on the left side of the decoding equipment main body and comprises an optical filter and a camera, the optical filter is arranged at the front end of the camera and is used for filtering out the shot image ambient light;
The single-line laser is arranged on the left side of the decoding equipment main body, is positioned at the same horizontal position with the camera component, and is used for projecting emitted single-line laser onto the 3D bar code;
The touch display screen component is arranged on the upper side of the decoding equipment main body and is used for displaying decoding information;
The battery module assembly is arranged on the lower side of the decoding equipment main body and is fixedly connected with the decoding equipment main body;
the camera assembly, the single-line laser, the touch display screen assembly and the battery module assembly are all in communication connection with the decoding processor.
7. The handheld 3D barcode single line laser decoding device of claim 6, wherein the handheld 3D barcode single line laser decoding device further comprises a handle assembly disposed in a middle portion of a lower side of the decoding device body, the handle assembly being fixedly connected with the decoding device body.
8. The handheld 3D barcode single line laser decoding device of claim 7, further comprising a switch assembly comprising a switch housing and a switch controller, the switch housing being mated with the handle assembly, the switch controller being disposed within the switch housing, the camera assembly, the single line laser, the battery module assembly, the touch display screen assembly being electrically connected with the switch assembly.
9. The handheld 3D barcode single line laser decoding device of claim 6, wherein the decoding processor is disposed inside the decoding device body.
CN202410052451.3A 2024-01-15 2024-01-15 One-dimensional bar code information generation method based on 3D structure and laser decoding equipment Active CN117574931B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410052451.3A CN117574931B (en) 2024-01-15 2024-01-15 One-dimensional bar code information generation method based on 3D structure and laser decoding equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410052451.3A CN117574931B (en) 2024-01-15 2024-01-15 One-dimensional bar code information generation method based on 3D structure and laser decoding equipment

Publications (2)

Publication Number Publication Date
CN117574931A CN117574931A (en) 2024-02-20
CN117574931B true CN117574931B (en) 2024-04-30

Family

ID=89888472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410052451.3A Active CN117574931B (en) 2024-01-15 2024-01-15 One-dimensional bar code information generation method based on 3D structure and laser decoding equipment

Country Status (1)

Country Link
CN (1) CN117574931B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111783495A (en) * 2020-06-30 2020-10-16 创新奇智(南京)科技有限公司 Bar code identification method and device, electronic equipment and storage medium
JP2020194594A (en) * 2020-09-01 2020-12-03 東芝テック株式会社 Code recognition device
CN114240912A (en) * 2021-12-21 2022-03-25 深圳市易展鸿业科技有限公司 Method for detecting printing quality of one-dimensional bar code
CN115759148A (en) * 2023-01-10 2023-03-07 深圳思谋信息科技有限公司 Image processing method, image processing device, computer equipment and computer readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016007662A1 (en) * 2014-07-08 2016-01-14 Padloc Inc. Imaging and peripheral enhancements for mobile devices
JP6246176B2 (en) * 2015-11-05 2017-12-13 株式会社オプティム Three-dimensional information code and three-dimensional information code reading device
US10114997B2 (en) * 2016-11-16 2018-10-30 Hand Held Products, Inc. Reader for optical indicia presented under two or more imaging conditions within a single frame time
WO2019209756A1 (en) * 2018-04-24 2019-10-31 University Of Pittsburgh-Of The Commonwealth System Of Higher Education System and method of decoding a barcode using machine learning
EP3789906B1 (en) * 2019-09-05 2021-07-07 Sick Ag Determine the module size of an optical code

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111783495A (en) * 2020-06-30 2020-10-16 创新奇智(南京)科技有限公司 Bar code identification method and device, electronic equipment and storage medium
JP2020194594A (en) * 2020-09-01 2020-12-03 東芝テック株式会社 Code recognition device
CN114240912A (en) * 2021-12-21 2022-03-25 深圳市易展鸿业科技有限公司 Method for detecting printing quality of one-dimensional bar code
CN115759148A (en) * 2023-01-10 2023-03-07 深圳思谋信息科技有限公司 Image processing method, image processing device, computer equipment and computer readable storage medium

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
"Camera Based Barcode Localization and Decoding in Real-World Applications";R Brylka et al.;《2020 International Conference on Omni-layer Intelligent Systems (COINS)》;20200910;第1-8页 *
"一种改进的复杂环境下条形码图像增强和定位算法";廖文婧;杨秀璋;吕询;敖进;范郁锋;于小民;赵小明;;《现代计算机》;20200415(第11期);第37-45页 *
"复杂环境下快递条形码快速检测***";王建锋 等;《物联网技术》;20220720;第12卷(第7期);第26-29页 *
H Wang et al.."Nano-Resolution Visual Identifiers Enable Secure Monitoring in Next-Generation Cyber-Physical Systems".《2022 International Conference on Computational Science and Computational Intelligence (CSCI)》.2023,第856-861页. *
周昌伟 等."基于机器视觉的条形码定位方法研究与设计".《中国仪器仪表》.2022,(第2022(5)期),第64-67页. *
易志远 ; ."一种条码识别***的研究".《科技经济导刊》.2020,(第04期),第22-23页. *

Also Published As

Publication number Publication date
CN117574931A (en) 2024-02-20

Similar Documents

Publication Publication Date Title
US11036949B2 (en) Scanner with control logic for resolving package labeling conflicts
US5880451A (en) System and method for OCR assisted bar code decoding
CN101874250B (en) Enhanced virtual scan line processing
CN109059922B (en) Mobile robot positioning method, device and system
WO2008010513A1 (en) Optical symbol, article to which the optical symbol is attached, method for attaching optical symbol to article, optical symbol decoding method, related device, and related program
CN102779264B (en) Method and device for realizing barcode recognition
EP2507741B1 (en) Imaging-based scanner including border searching for image acquisition
WO2006101437A1 (en) Combined detection of position-coding pattern and bar codes
US20090224187A1 (en) Counting device for small series
CN110114781B (en) Method for detecting and identifying remote high density visual indicia
CN100353370C (en) Method and system for decoding bar code image
CN103218596A (en) Bar-code scanner with dynamic multi-angle illuminating system and bar-code scanning method thereof
KR20090035529A (en) Optical symbol, article to which the optical symbol is attached, method for attaching optical symbol to article, and optical recognition code recognizing method
CN117574931B (en) One-dimensional bar code information generation method based on 3D structure and laser decoding equipment
CN1150440C (en) interface arrangment for use with coded data processing systems
CN104217189A (en) Self-learning identification method of barcode used for test strip
CN110866570A (en) Transfer luggage transcoding system
CN106295455B (en) Bar code indicating method and bar code reader
CN117574930B (en) Method and device for generating three-dimensional bar code information, electronic equipment and readable medium
CN109359705B (en) System and method for searching misplaced books
CN114444531A (en) Method and system for collecting data for training Machine Learning (ML) models
JP4100273B2 (en) Two-dimensional code reading method and two-dimensional code reading apparatus
US10121040B2 (en) Recognition apparatus, recognition method, storage medium, management system, and conveyance system
CN111062228A (en) LED array signal detection method and device
CN203242005U (en) Barcode scanner with dynamic and multi-angle lighting system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant