CN108108646B - Bar code information identification method, terminal and computer readable storage medium - Google Patents
Bar code information identification method, terminal and computer readable storage medium Download PDFInfo
- Publication number
- CN108108646B CN108108646B CN201711499393.5A CN201711499393A CN108108646B CN 108108646 B CN108108646 B CN 108108646B CN 201711499393 A CN201711499393 A CN 201711499393A CN 108108646 B CN108108646 B CN 108108646B
- Authority
- CN
- China
- Prior art keywords
- information
- bar code
- image information
- image
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods 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/1404—Methods for optical code recognition
- G06K7/1408—Methods for optical code recognition the method being specifically adapted for the type of code
- G06K7/1413—1D bar codes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods 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/1404—Methods for optical code recognition
- G06K7/1439—Methods for optical code recognition including a method step for retrieval of the optical code
- G06K7/1443—Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods 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/1404—Methods for optical code recognition
- G06K7/146—Methods for optical code recognition the method including quality enhancement steps
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/28—Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Toxicology (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Electromagnetism (AREA)
- Health & Medical Sciences (AREA)
- Quality & Reliability (AREA)
- Multimedia (AREA)
- Character Input (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a bar code information identification method, which comprises the following steps: collecting image information of a bar code to be identified; processing the image information according to a preset mode, and positioning an image area containing bar code information from the processed image information; and identifying the bar code information from the image area according to a preset standard coding mode. The invention also discloses a terminal and a computer readable storage medium. The invention firstly collects the image information of the bar code to be identified, then positions the image area containing the bar code information according to a certain mode, and then identifies the bar code information from the image area according to a preset standard coding mode. The success rate of the poor-definition bar code is improved, and the bar code is identified more accurately.
Description
Technical Field
The invention relates to the technical field of data processing, in particular to a barcode information identification method, a terminal and a computer readable storage medium.
Background
The bar code technology (bar code for short) is a new technology integrating graphic coding, information acquisition and image identification, and has become a social product as an information processing technology. The information is stored through the arrangement and combination of the bars and the spaces, and the bar codes provide product identification in the product classification and storage management of the production line, so that the sorting and the management of the products are facilitated, and the production line and the product logistics efficiency of a workshop are substantially improved. Therefore, the barcode recognition technology corresponding to the barcode is also continuously updated.
At present, laser scanning equipment and linear CCD equipment (camera equipment) of one-dimensional bar codes and the technology thereof are relatively mature, the application field is also very wide, and the laser scanning equipment and the linear CCD equipment are characterized in that: the operation flow is simple and the use is convenient. However, these devices have strict requirements on the quality of the printed bar code, and can only recognize bar codes with certain definition, and the recognition process of the devices depends on hardware decoding of photosensitive components, and the recognition operation must also meet specific identification standards.
According to the bar code identification mode, the bar codes with poor definition are identified into power difference, and the bar codes cannot be accurately identified.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a barcode information identification method, a terminal and a computer readable storage medium, and aims to solve the technical problem that a barcode with poor definition cannot be accurately identified due to power difference of the barcode identification in the conventional barcode identification mode.
In order to achieve the above object, the present invention provides a barcode information identification method, wherein the barcode information identification method comprises the following steps:
collecting image information of a bar code to be identified;
processing the image information according to a preset mode, and positioning an image area containing bar code information from the processed image information;
and identifying the bar code information from the image area according to a preset standard coding mode.
Optionally, the step of processing the image information according to a preset mode, and positioning an image area containing barcode information from the processed image information includes:
processing the image information according to a preset mathematical mode to obtain image information to be binarized;
and binarizing the image information to be binarized, and positioning an image area containing bar code information from the binarized image information.
Optionally, the step of processing the image information according to a preset mathematical manner to obtain image information to be binarized includes:
establishing a coordinate system based on the image information;
and solving a first-order partial derivative of the image information in the X/Y direction, determining transverse and longitudinal extreme points in the image information, and adjusting the obtained extreme points according to a preset threshold value to obtain the image information to be binarized.
Optionally, after the step of processing the image information according to a preset mathematical manner to obtain the image information to be binarized, the method further includes:
binarizing the image information to be binarized, and performing closed/open operation on the binarized image information to position a preliminary image area containing bar code information;
and converting the preliminary image area into an image area with a preset length-width ratio, and adjusting the converted image area according to a preset value to obtain an image area containing bar code information.
Optionally, before the step of identifying barcode information from the image region according to a preset standard encoding manner, the method further includes:
judging whether the image area is normal or not according to the directionality of the bar code area and the bar space interval;
when the image area is normal, identifying bar code information from the image area according to a preset standard coding mode;
and when the image information is wrong, returning to execute the step of processing the image information according to a preset mode and positioning the image area containing the bar code information from the processed image information.
Optionally, after the step of identifying barcode information from the image region according to a preset standard encoding manner, the method further includes:
carrying out interactive verification on the identified bar code information;
and outputting the identified bar code information after the interactive verification is passed.
Optionally, the step of interactively verifying the identified barcode information includes:
acquiring bar code information extracted by other acquisition modes;
comparing the identified bar code information with bar code information extracted by other acquisition modes;
if the two types of verification are consistent, judging that the interactive verification is passed;
and when the two pieces of information are inconsistent, judging that the interactive verification is not passed.
Optionally, the step of collecting image information of the barcode to be recognized includes:
and controlling the object of the bar code to be identified to be scanned line by line to acquire the image information of the bar code to be identified.
In addition, to achieve the above object, the present invention also provides a terminal, including: the bar code information identification program realizes the steps of the bar code information identification when being executed by the processor.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium having stored thereon a barcode information identification program, which when executed by a processor, implements the steps of barcode information identification as described above.
The invention firstly collects the image information of the bar code to be identified, then positions the image area containing the bar code information according to a certain mode, and then identifies the bar code information from the image area according to a preset standard coding mode. Rather than manually or by merely laser browsing the barcode, the poor quality barcode cannot be identified. The success rate of the poor-definition bar code is improved, and the bar code is identified more accurately.
Drawings
FIG. 1 is a schematic diagram of a terminal \ device structure of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a barcode information recognition method according to a first embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating a process of processing the image information according to a predetermined manner to locate an image region containing barcode information according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating a process of processing the image information according to a predetermined manner to locate an image region containing barcode information according to another embodiment of the present invention;
FIG. 5 is a flowchart illustrating a barcode information recognition method according to a second embodiment of the present invention;
fig. 6 is a schematic flow chart illustrating interactive verification of recognized barcode information according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: collecting image information of a bar code to be identified; processing the image information according to a preset mode, and positioning an image area containing bar code information from the processed image information; and identifying the bar code information from the image area according to a preset standard coding mode.
Because the current bar code identification mode, the bar code with poor definition is identified into the power difference, and the bar code can not be accurately identified. The invention provides a solution, which comprises the steps of firstly collecting image information of a bar code to be identified, then positioning an image area containing the bar code information according to a certain mode, and then identifying the bar code information from the image area according to a preset standard coding mode. Rather than manually or by merely laser browsing the barcode, the poor quality barcode cannot be identified. The success rate of the poor-definition bar code is improved, and the bar code is identified more accurately.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention firstly collects the image information of the bar code to be identified, then positions the image area containing the bar code information according to a certain mode, and then identifies the bar code information from the image area according to a preset standard coding mode. Rather than manually or by merely laser browsing the barcode, the poor quality barcode cannot be identified. The success rate of the poor-definition bar code is improved, and the bar code is identified more accurately. The terminal is a mobile phone, a notebook computer or a pad and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile terminal is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the mobile terminal; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a temperature sensor, and a holman sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a barcode information recognition application.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the barcode information identification application stored in the memory 1005 and perform the following operations:
collecting image information of a bar code to be identified;
processing the image information according to a preset mode, and positioning an image area containing bar code information from the processed image information;
and identifying the bar code information from the image area according to a preset standard coding mode.
Further, the processor 1001 may be configured to invoke a barcode information identification application stored in the memory 1005 and perform the following operations:
processing the image information according to a preset mathematical mode to obtain image information to be binarized;
and binarizing the image information to be binarized, and positioning an image area containing bar code information from the binarized image information.
Further, the processor 1001 may be configured to invoke a barcode information identification application stored in the memory 1005 and perform the following operations:
establishing a coordinate system based on the image information;
and solving a first-order partial derivative of the image information in the X/Y direction, determining transverse and longitudinal extreme points in the image information, and adjusting the obtained extreme points according to a preset threshold value to obtain the image information to be binarized.
Further, after the step of processing the image information in a preset mathematical manner to obtain the image information to be binarized, the processor 1001 may be configured to call a barcode information identification application stored in the memory 1005, and perform the following operations:
binarizing the image information to be binarized, and performing closed/open operation on the binarized image information to position a preliminary image area containing bar code information;
and converting the preliminary image area into an image area with a preset length-width ratio, and adjusting the converted image area according to a preset value to obtain an image area containing bar code information.
Further, before the step of identifying barcode information from the image area according to the preset standard encoding manner, the processor 1001 may be configured to call a barcode information identification application stored in the memory 1005, and perform the following operations:
judging whether the image area is normal or not according to the directionality of the bar code area and the bar space interval;
when the image area is normal, identifying bar code information from the image area according to a preset standard coding mode;
and when the image information is wrong, returning to execute the step of processing the image information according to a preset mode and positioning the image area containing the bar code information from the processed image information.
Further, after the step of identifying barcode information from the image area according to a preset standard encoding manner, the processor 1001 may be configured to call a barcode information identification application stored in the memory 1005, and perform the following operations:
carrying out interactive verification on the identified bar code information;
and outputting the identified bar code information after the interactive verification is passed.
Further, the processor 1001 may be configured to invoke a barcode information identification application stored in the memory 1005 and perform the following operations:
acquiring bar code information extracted by other acquisition modes;
comparing the identified bar code information with bar code information extracted by other acquisition modes;
if the two types of verification are consistent, judging that the interactive verification is passed;
and when the two pieces of information are inconsistent, judging that the interactive verification is not passed.
Further, the processor 1001 may be configured to invoke a barcode information identification application stored in the memory 1005 and perform the following operations:
and controlling the object of the bar code to be identified to be scanned line by line to acquire the image information of the bar code to be identified.
Referring to fig. 2, a first embodiment of the present invention provides a barcode information identification method, including:
step S10, collecting image information of the bar code to be identified;
in this embodiment, the barcode information identification may be performed by a device dedicated to barcode identification, or may be performed by a terminal loaded with a barcode identification function, where the terminal may be a mobile phone, a pad, or the like. The present embodiment is preferably a terminal.
When the bar code needs to be identified, the article to be identified, such as food or clothes, is acquired. After an article of the bar code to be recognized is obtained, image information of the bar code to be recognized is collected through a camera on a terminal, and the image information comprises the bar code to be recognized. Certainly, the image information of the barcode to be identified may also be obtained by shooting through other shooting devices, and then transmitted to the terminal, so that the barcode is identified through the transmitted image information at the terminal side.
In order to improve the reliability of the acquired image information of the bar code to be recognized, the image of the bar code to be recognized is scanned line by line to acquire the image information of the bar code, and the image information of the bar code to be recognized is more reliable than that acquired by only one line.
Step S20, processing the image information according to a preset mode, and positioning an image area containing bar code information from the processed image information;
after the image information to be identified is obtained, noise is removed by adopting a characteristic point sampling mode, and filtering can be performed by a matched filtering method through simulation noise.
After the noise is removed or the noise is not removed, the image information is processed according to a preset mode, an image area containing the bar code information is positioned from the processed image information, a part containing the bar code in the acquired image information of the bar code to be identified is positioned, and the part containing the bar code is extracted from the acquired image information. The preset mode can be a mathematical mode or other modes which can divide the image, obtain an image area containing bar code information according to the mode of acquiring the bar code part in the image by the characteristics, and position the image area where the bar code is positioned.
In an embodiment of the present invention, referring to fig. 3, the step of processing the image information according to a preset mode to locate an image area containing barcode information includes:
step S21, processing the image information according to a preset mathematical mode to obtain image information to be binarized;
and step S22, binarizing the image information to be binarized, and positioning an image area containing bar code information from the binarized image information.
The mathematical mode can be a first-order partial derivative or other applicable modes, and a coordinate system is established based on the image information in the process of extracting the region; and solving a first-order partial derivative of the image information in the X/Y direction, determining transverse and longitudinal extreme points in the image information, and adjusting the obtained extreme points according to a preset threshold value to obtain the image information to be binarized. Solving a first-order partial derivative in the X/Y direction, determining transverse and vertical extreme points, and obtaining reasonable image information needing binarization processing through threshold adjustment.
After binarizing the image, referring to fig. 4, after the step of processing the image information according to a preset mathematical manner to obtain the image information to be binarized, the method further includes:
step S23, binarizing the image information to be binarized, and performing on/off operation on the binarized image information to position a preliminary image area containing bar code information;
and step S24, converting the preliminary image area into an image area with a preset length-width ratio, and adjusting the converted image area according to a preset value to obtain an image area containing barcode information.
Binarization is the most basic mode in region segmentation, and after binarization, an image and a background can be segmented by adjusting a threshold value. Although the possibility of losing partial image information exists, the selection of the threshold value has a relation with the quality of the bar code, and the more the bar code is fuzzy, the fewer images are segmented, so that the segmentation of the fuzzy part including the bar code is avoided; and the higher the definition is, the more accurate the segmentation operation is, and the clear segmentation can be made.
And step S30, identifying the bar code information from the image area according to a preset standard coding mode.
After the image area of the bar Code is positioned, matching is carried out in the image area of the bar Code according to the bar Code coding specification, wherein different coding modes such as Code128/39/93 and the like are included, in the decoding process realized by different measurement degrees of the image, the measurement of the width can be determined by recording the number of pixel points in a specific direction, the measurement of a blank area is carried out by using the pixel size in the same direction, finally, specific crazy gambling is obtained by recording the statistical value of the pixel points in the direction distance, and finally, the information represented by the whole bar Code symbol is determined. By segmenting the bar code and positioning the bar code area, the image analysis of the area where the bar code is located can be more accurately captured, and therefore, even if the quality of the bar code is poor, the success rate can be provided by positioning the bar code area and segmenting the image.
In order to further improve the barcode recognition rate, in the whole barcode recognition process, if a certain section or a certain part of a certain row of barcodes has poor quality, the region is positioned, matching similar to the barcodes is found from a barcode library according to a difference matching mode, recognition is carried out according to an image of the region, barcode information matched with the region is obtained, more accurate barcode recognition is realized, and the recognition rate is improved.
In one embodiment of the invention, whether the image area is normal or not is judged according to the directionality of the bar code area and the bar space interval; when the image area is normal, identifying bar code information from the image area according to a preset standard coding mode; and if the image information is wrong, returning to execute the step of processing the image information according to a preset mode to position the image area containing the bar code information. The determination will not have errors in the scanning direction, which causes problems in the located image area, rather than identifying an erroneous area in which there is no barcode information.
In the embodiment, the image information of the barcode to be identified is collected firstly, then the image area containing the barcode information is positioned according to a certain mode, and then the barcode information is identified from the image area according to a preset standard coding mode. Rather than manually or by merely laser browsing the barcode, the poor quality barcode cannot be identified. The success rate of the poor-definition bar code is improved, and the bar code is identified more accurately.
In an embodiment of the present invention, referring to fig. 5, after the step of identifying barcode information from the image area according to a preset standard encoding manner, the method further includes:
step S40, interactive verification is carried out on the identified bar code information;
and step S50, outputting the identified bar code information after the interactive verification is passed.
In this embodiment, in order to improve the accuracy of the recognized barcode information, after the barcode information is recognized by the method of this embodiment, the recognized barcode information is interactively verified, and after the interactive verification is passed, the recognized barcode information is output.
In a specific interactive verification manner, referring to fig. 6, the step of interactively verifying the identified barcode information includes:
step S41, acquiring bar code information extracted by other acquisition modes;
step S42, comparing the identified bar code information with bar code information extracted by other acquisition modes;
step S43, when the two are consistent, the interactive verification is judged to be passed;
in step S44, if the two are not consistent, it is determined that the interactive authentication is not passed.
After the bar code information is identified, the bar code information needs to be verified, the verification can be combined with an OCR (Optical Character Recognition) system, the bar code identification and the OCR system are interactively verified, when the identification results of the bar code identification and the OCR system are consistent, the bar code identification can be passed through the verification, the accuracy of the bar code identification is improved through the interactive verification, and the bar code information identification error is prevented.
In one embodiment, after the bar code information is recognized, the article corresponding to the bar code information is marked according to the recognized bar code information, and the storage position where the article is located is recorded into a system or is associated with the bar code information, so that reasonable article management is realized.
In an embodiment, the present invention further provides a terminal, including: the system comprises a memory, a processor and a bar code information identification program which is stored on the memory and can run on the processor, wherein the bar code information identification program realizes the steps of the bar code information identification method when being executed by the processor. The terminal is a mobile phone, a notebook computer, a pad and the like.
The terminal of the embodiment collects the image information of the bar code to be identified, then positions the image area containing the bar code information according to a certain mode, and then identifies the bar code information from the image area according to a preset standard coding mode. Rather than manually or by merely laser browsing the barcode, the poor quality barcode cannot be identified. The success rate of the poor-definition bar code is improved, and the bar code is identified more accurately.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a barcode information identification program is stored on the computer-readable storage medium, and when executed by a processor, the barcode information identification program implements the following operations:
collecting image information of a bar code to be identified;
processing the image information according to a preset mode, and positioning an image area containing bar code information from the processed image information;
and identifying the bar code information from the image area according to a preset standard coding mode.
Further, the barcode information identification program, when executed by the processor, implements the following operations:
processing the image information according to a preset mathematical mode to obtain image information to be binarized;
and binarizing the image information to be binarized, and positioning an image area containing bar code information from the binarized image information.
Further, the barcode information identification program, when executed by the processor, implements the following operations:
establishing a coordinate system based on the image information;
and solving a first-order partial derivative of the image information in the X/Y direction, determining transverse and longitudinal extreme points in the image information, and adjusting the obtained extreme points according to a preset threshold value to obtain the image information to be binarized.
Further, after the step of processing the image information in a preset mathematical manner to obtain the image information to be binarized, the barcode information identification program is executed by the processor to implement the following operations:
binarizing the image information to be binarized, and performing closed/open operation on the binarized image information to position a preliminary image area containing bar code information;
and converting the preliminary image area into an image area with a preset length-width ratio, and adjusting the converted image area according to a preset value to obtain an image area containing bar code information.
Further, before the step of identifying the barcode information from the image area according to the preset standard encoding manner, the barcode information identification program is executed by the processor to implement the following operations:
judging whether the image area is normal or not according to the directionality of the bar code area and the bar space interval;
when the image area is normal, identifying bar code information from the image area according to a preset standard coding mode;
and when the image information is wrong, returning to execute the step of processing the image information according to a preset mode and positioning the image area containing the bar code information from the processed image information.
Further, after the step of identifying the barcode information from the image area according to the preset standard encoding manner, the barcode information identification program when executed by the processor implements the following operations:
carrying out interactive verification on the identified bar code information;
and outputting the identified bar code information after the interactive verification is passed.
Further, the barcode information identification program, when executed by the processor, implements the following operations:
acquiring bar code information extracted by other acquisition modes;
comparing the identified bar code information with bar code information extracted by other acquisition modes;
if the two types of verification are consistent, judging that the interactive verification is passed;
and when the two pieces of information are inconsistent, judging that the interactive verification is not passed.
Further, the barcode information identification program, when executed by the processor, implements the following operations:
and controlling the object of the bar code to be identified to be scanned line by line to acquire the image information of the bar code to be identified.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, a television, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A bar code information identification method is characterized by comprising the following steps:
collecting image information of a bar code to be identified;
processing the image information according to a preset mode, and positioning an image area containing bar code information from the processed image information;
identifying bar code information from the image area according to a preset standard coding mode;
the image information of the bar code is poor in definition, the image information with poor definition is located, the bar code information of the located image information with poor definition is obtained by matching the bar codes from a bar code library according to a difference matching mode, the image information with poor definition is the image information lower than the set definition, and the matching modes adopted by different areas with different definitions are different.
2. The method of claim 1, wherein the processing the image information according to a predetermined manner, and the positioning the image area including the barcode information from the processed image information comprises:
processing the image information according to a preset mathematical mode to obtain image information to be binarized;
and binarizing the image information to be binarized, and positioning an image area containing bar code information from the binarized image information.
3. The barcode information identifying method according to claim 2, wherein the step of processing the image information in a preset mathematical manner to obtain image information to be binarized comprises:
establishing a coordinate system based on the image information;
and solving a first-order partial derivative of the image information in the X/Y direction, determining transverse and longitudinal extreme points in the image information, and adjusting the obtained extreme points according to a preset threshold value to obtain the image information to be binarized.
4. The barcode information identifying method according to claim 2, wherein after the step of processing the image information in a preset mathematical manner to obtain image information to be binarized, further comprising:
binarizing the image information to be binarized, and performing closed/open operation on the binarized image information to position a preliminary image area containing bar code information;
and converting the preliminary image area into an image area with a preset length-width ratio, and adjusting the converted image area according to a preset value to obtain an image area containing bar code information.
5. The method for identifying barcode information according to claim 1, wherein the step of identifying barcode information from the image area according to a preset standard encoding manner further comprises:
judging whether the image area is normal or not according to the directionality of the bar code area and the bar space interval;
when the image area is normal, identifying bar code information from the image area according to a preset standard coding mode;
and when the image information is wrong, returning to execute the step of processing the image information according to a preset mode and positioning the image area containing the bar code information from the processed image information.
6. The method for identifying barcode information according to claim 1, wherein the step of identifying barcode information from the image area according to a preset standard encoding manner further comprises:
carrying out interactive verification on the identified bar code information;
and outputting the identified bar code information after the interactive verification is passed.
7. The method of claim 6, wherein the step of interactively verifying the recognized barcode information comprises:
acquiring bar code information extracted by other acquisition modes;
comparing the identified bar code information with bar code information extracted by other acquisition modes;
if the two types of verification are consistent, judging that the interactive verification is passed;
and when the two pieces of information are inconsistent, judging that the interactive verification is not passed.
8. The method for identifying barcode information according to any one of claims 1 to 7, wherein the step of collecting image information of the barcode to be identified comprises:
and controlling the object of the bar code to be identified to be scanned line by line to acquire the image information of the bar code to be identified.
9. A terminal, characterized in that the terminal comprises: a memory, a processor and a barcode information identification program stored on the memory and executable on the processor, the barcode information identification program when executed by the processor implementing the steps of the barcode information identification method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that a barcode information identification program is stored on the computer-readable storage medium, which when executed by a processor implements the steps of the barcode information identification method according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711499393.5A CN108108646B (en) | 2017-12-29 | 2017-12-29 | Bar code information identification method, terminal and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711499393.5A CN108108646B (en) | 2017-12-29 | 2017-12-29 | Bar code information identification method, terminal and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108108646A CN108108646A (en) | 2018-06-01 |
CN108108646B true CN108108646B (en) | 2022-04-22 |
Family
ID=62215538
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711499393.5A Active CN108108646B (en) | 2017-12-29 | 2017-12-29 | Bar code information identification method, terminal and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108108646B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109543479B (en) * | 2018-10-24 | 2021-12-07 | 金蝶蝶金云计算有限公司 | Code scanning method, device, equipment and storage medium |
CN110008782A (en) * | 2019-06-06 | 2019-07-12 | 江苏东大集成电路系统工程技术有限公司 | The acquisition methods and device of bar code information |
CN113542730A (en) * | 2021-06-29 | 2021-10-22 | 深圳市天视通视觉有限公司 | Sensor testing method and device of camera and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101911095A (en) * | 2008-02-22 | 2010-12-08 | 高通股份有限公司 | Barcode detection based on morphological operations |
CN102521558A (en) * | 2011-11-18 | 2012-06-27 | 深圳市宝捷信科技有限公司 | Bar code identifying method and device |
CN103336938A (en) * | 2013-06-05 | 2013-10-02 | 华南理工大学 | Recognition method based one-dimensional bar code image |
CN103761499A (en) * | 2014-01-20 | 2014-04-30 | 江苏物联网研究发展中心 | Barcode identification method based on multi-core DSP |
CN103793679A (en) * | 2014-03-05 | 2014-05-14 | 江苏物联网研究发展中心 | One-dimensional bar code recognition method based on DaVinci technology |
CN103870790A (en) * | 2014-04-02 | 2014-06-18 | 胡建国 | Recognition method and device of two-dimensional bar code |
CN104573674A (en) * | 2015-01-29 | 2015-04-29 | 杨克己 | 1D (one-dimensional) barcode recognition for real-time embedded system |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100375104C (en) * | 2004-04-16 | 2008-03-12 | 广州市瀚迪科技开发有限公司 | A 1D bar code decoding method |
KR100766600B1 (en) * | 2006-07-18 | 2007-10-12 | 삼성전자주식회사 | Scanner |
CN102955834A (en) * | 2011-08-31 | 2013-03-06 | 上海夏尔软件有限公司 | Precise image splitting method based on bar code position identification |
JP5819698B2 (en) * | 2011-09-30 | 2015-11-24 | 株式会社Screenホールディングス | PRINT DATA PROCESSING DEVICE, PRINT DATA PROCESSING METHOD, PRINTING SYSTEM AND PROGRAM, AND PAGE DATA CREATION DEVICE AND Rasterization Processing Device |
CN104794420A (en) * | 2015-04-27 | 2015-07-22 | 江苏中科贯微自动化科技有限公司 | Code128 automatic identification method for industrial automatic production |
CN106845317A (en) * | 2017-02-03 | 2017-06-13 | 宋金睿 | Many bar code localization methods, device and terminal |
-
2017
- 2017-12-29 CN CN201711499393.5A patent/CN108108646B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101911095A (en) * | 2008-02-22 | 2010-12-08 | 高通股份有限公司 | Barcode detection based on morphological operations |
CN102521558A (en) * | 2011-11-18 | 2012-06-27 | 深圳市宝捷信科技有限公司 | Bar code identifying method and device |
CN103336938A (en) * | 2013-06-05 | 2013-10-02 | 华南理工大学 | Recognition method based one-dimensional bar code image |
CN103761499A (en) * | 2014-01-20 | 2014-04-30 | 江苏物联网研究发展中心 | Barcode identification method based on multi-core DSP |
CN103793679A (en) * | 2014-03-05 | 2014-05-14 | 江苏物联网研究发展中心 | One-dimensional bar code recognition method based on DaVinci technology |
CN103870790A (en) * | 2014-04-02 | 2014-06-18 | 胡建国 | Recognition method and device of two-dimensional bar code |
CN104573674A (en) * | 2015-01-29 | 2015-04-29 | 杨克己 | 1D (one-dimensional) barcode recognition for real-time embedded system |
Also Published As
Publication number | Publication date |
---|---|
CN108108646A (en) | 2018-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2568412B1 (en) | Apparatus for recognizing character and barcode simultaneously and method for controlling the same | |
US8774453B2 (en) | Method and arrangement for retrieving information comprised in a barcode | |
CN110348439B (en) | Method, computer readable medium and system for automatically identifying price tags | |
CN108108646B (en) | Bar code information identification method, terminal and computer readable storage medium | |
KR20160022383A (en) | Two-dimensional code recognition method and apparatus | |
CN112100431B (en) | Evaluation method, device and equipment of OCR system and readable storage medium | |
JPWO2004055713A1 (en) | Bar code recognition device | |
US9501681B1 (en) | Decoding visual codes | |
CN109116129B (en) | Terminal detection method, detection device, system and storage medium | |
CN108268811B (en) | Image processing method, image processing apparatus, and computer-readable storage medium | |
CN112465517A (en) | Anti-counterfeiting verification method and device and computer readable storage medium | |
CN111080665B (en) | Image frame recognition method, device, equipment and computer storage medium | |
CN112163443A (en) | Code scanning method, code scanning device and mobile terminal | |
CN108647570B (en) | Zebra crossing detection method and device and computer readable storage medium | |
JP4163406B2 (en) | Bar code recognition device | |
CN103716685A (en) | Icon recognition system, server and method | |
KR101320247B1 (en) | Apparatus and method for image matching in augmented reality service system | |
JP2016206909A (en) | Information processor, and information processing method | |
CN114241356A (en) | Wood board color identification method and device, electronic equipment and storage medium | |
CN110287754B (en) | Vehicle information management method, apparatus and computer readable storage medium | |
CN108519962B (en) | Font display method and apparatus applied to android system, and terminal device | |
CN112634382A (en) | Image recognition and replacement method and device for unnatural object | |
CN111507324B (en) | Card frame recognition method, device, equipment and computer storage medium | |
CN116109643B (en) | Market layout data acquisition method, device and computer readable storage medium | |
CN112749591B (en) | Storage logistics robot and article identification method and chip thereof |
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 |