CN113658164A - Two-dimensional code information extraction accuracy assessment method and device - Google Patents

Two-dimensional code information extraction accuracy assessment method and device Download PDF

Info

Publication number
CN113658164A
CN113658164A CN202110978073.8A CN202110978073A CN113658164A CN 113658164 A CN113658164 A CN 113658164A CN 202110978073 A CN202110978073 A CN 202110978073A CN 113658164 A CN113658164 A CN 113658164A
Authority
CN
China
Prior art keywords
module
gray
image
dimensional code
information
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.)
Granted
Application number
CN202110978073.8A
Other languages
Chinese (zh)
Other versions
CN113658164B (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.)
Shenzhen Lingyun Shixun Technology Co ltd
Luster LightTech Co Ltd
Original Assignee
Shenzhen Lingyun Shixun Technology Co ltd
Luster LightTech Co Ltd
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 Shenzhen Lingyun Shixun Technology Co ltd, Luster LightTech Co Ltd filed Critical Shenzhen Lingyun Shixun Technology Co ltd
Priority to CN202110978073.8A priority Critical patent/CN113658164B/en
Publication of CN113658164A publication Critical patent/CN113658164A/en
Application granted granted Critical
Publication of CN113658164B publication Critical patent/CN113658164B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/155Segmentation; Edge detection involving morphological operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)

Abstract

The application discloses a method and a device for evaluating two-dimension code information extraction accuracy, wherein the method comprises the following steps: performing binary segmentation on the two-dimensional code image, and converting the two-dimensional code image gray image into a binary image; respectively analyzing the gray level image before segmentation and the binary image after segmentation to obtain the gray level information of the whole image; extracting gray distribution information of all modules in the data area; setting a two-dimensional code information extraction accuracy evaluation criterion according to the whole image gray information and the gray distribution information, wherein the two-dimensional code information extraction accuracy evaluation criterion comprises the following steps: similarity between the gray information of the module to be evaluated and all modules, similarity between sampling information of the module to be evaluated and the gray information of the full image, and the number or proportion of pixels of the main gray peak corresponding to the gray distribution histogram of the full image of each module to be evaluated; and adopting one or more two-dimension code information extraction accuracy evaluation criteria to comprehensively evaluate the accuracy of the sampling value of the module to be evaluated and the extraction accuracy of the whole two-dimension code information.

Description

Two-dimensional code information extraction accuracy assessment method and device
Technical Field
The application relates to the technical field of two-dimensional code decoding, in particular to a method and a device for evaluating the information extraction accuracy of a two-dimensional code.
Background
The two-dimensional code decoding process can be divided into three steps of bar code positioning, two-dimensional bar code information extraction and decoding, wherein the extracted information comprises bar code specifications (the number of modules in the horizontal direction and the vertical direction), 0 and 1 values of each module (for a dark-color bar code, the black module value is 1, and the white module value is 0), and the like, and finally a binary matrix is constructed according to the information extracted by the bar codes for decoding to obtain the code content. As an example of the DM code in fig. 1, (a) is a DM code with black polarity, and each small rectangle is a module; (b) the two-dimensional code mode side comprises positioning information, and the number of modules in each row and column can be obtained by analyzing the mode side; (c) the two-dimensional code data area is a black bar code, the position of a black module is extracted to be 1, and the position of a white module is extracted to be 0.
In a two-dimensional code practical application scene, because an imaging system, the printing quality of a two-dimensional code and the like cannot reach ideal states, information extracted from a two-dimensional code image is inaccurate, although two-dimensional code decoding provides certain error correction capability for the extracted information, if the extracted error value is too much and the error correction capability is exceeded, decoding failure can be caused.
In the prior art, an objective method for evaluating the accuracy of extracting the two-dimension code information is lacked, whether decoding can be successfully performed cannot be preliminarily estimated before decoding, and the accuracy of extracting information values by each module cannot be effectively judged, so that the two-dimension code identification accuracy and the decoding success rate in the prior art are low.
Disclosure of Invention
The application provides an evaluation method and device for extracting accuracy of two-dimensional code information, and aims to solve the problem that in the prior art, accuracy of information extraction values cannot be accurately and objectively judged before decoding of two-dimensional codes, so that recognition accuracy and decoding success rate of the two-dimensional codes are low.
The technical scheme adopted by the application is as follows:
a two-dimensional code information extraction accuracy assessment method comprises the following steps:
performing binary segmentation on the two-dimensional code image, and converting a gray scale image of the two-dimensional code image into a binary image;
respectively analyzing the gray-scale image before segmentation and the binary image after segmentation to obtain the gray-scale information of the whole image;
extracting gray distribution information of all modules in the two-dimensional code data area;
setting two-dimensional code information extraction accuracy evaluation criteria according to the full-image gray scale information and the gray scale distribution information, wherein the two-dimensional code information extraction accuracy evaluation criteria comprise: similarity between the gray information of the module to be evaluated and all modules, similarity between sampling information of the module to be evaluated and the gray information of the full image, and the number or proportion of pixels of the main gray peak corresponding to the gray distribution histogram of the full image of each module to be evaluated;
and adopting one or more of the two-dimension code information extraction accuracy evaluation criteria to comprehensively evaluate the accuracy of the sampling value of the module to be evaluated and the extraction accuracy of the whole two-dimension code information.
Preferably, the binary segmentation of the two-dimensional code image includes:
and preprocessing the two-dimensional code image with imaging degradation or uneven gray level.
Preferably, the preprocessing the two-dimensional code image with imaging degradation or gray scale unevenness includes:
and performing morphological operation, median filtering, frequency domain filtering or contrast consistency stretching treatment on the two-dimensional code image with imaging degradation or uneven gray level.
Preferably, the binary segmentation of the two-dimensional code image includes:
and carrying out self-adaptive binarization processing on the two-dimensional code image.
Preferably, the full-image grayscale information includes:
the gray level mean value, the variance, the number of black and white pixels and the ratio of each mode side module;
self-adaptive gray segmentation threshold;
the mean value, variance, maximum value, minimum value and grey distribution histogram of the whole image grey.
Preferably, the gray-scale distribution information includes:
the gray scale mean, variance, number of black and white pixels and the ratio of each module.
Preferably, the setting of the two-dimensional code information extraction accuracy evaluation criterion according to the full-image gray scale information and the gray scale distribution information includes:
classifying all modules in the two-dimensional code according to the segmentation threshold and the gray average value of each module to obtain a value of 0 and 1 of each module;
sampling 0 and 1 values of all modules in the two-dimensional code image, and calculating sampling values of all modules, wherein the sampling values are gray level average values of all pixels of all modules;
eliminating abnormal modules in all modules according to the sampling values;
calculating the gray mean and variance of the residual black module and white module after the abnormal module is eliminated;
and setting a two-dimension code information extraction accuracy evaluation criterion according to the two-dimension code segmentation threshold, the two-dimension code gray distribution histogram, the two-dimension code gray variance and mean, the gray mean and variance of the residual black modules and the gray mean and variance of the residual white modules.
Preferably, the excluding of abnormal modules from all modules according to the sampling value includes:
obtaining a sampling prediction value of each module according to the gray distribution information of each mode side module, wherein the sampling prediction value refers to a gray mean prediction value of each module;
and eliminating abnormal modules in all the modules, wherein the sampling values are inconsistent with the sampling predicted values.
Preferably, the comprehensively evaluating the accuracy of the sampling value of the module to be evaluated and the accuracy of extracting the whole two-dimensional code information by using one or more of the two-dimensional code information extraction accuracy evaluation criteria includes:
when a single criterion in the two-dimension code information extraction accuracy evaluation criteria is adopted, if the criterion does not reach the standard, the module is judged to be a 0 and 1 value error module;
when a plurality of criteria in the two-dimensional code information extraction accuracy evaluation criteria are comprehensively evaluated, each criterion score is calculated, if a certain index score does not reach the standard, the module is judged to be a module with a value of 0 and 1 being wrong, or all the criterion scores are weighted to calculate a comprehensive score, and if the comprehensive score does not reach the standard, the module is judged to be a module with a value of 0 and 1 being wrong.
An evaluation device for two-dimensional code information extraction accuracy comprises:
the binary segmentation module is used for performing binary segmentation on the two-dimensional code image and converting the gray image of the two-dimensional code image into a binary image;
the full-image gray scale information analysis module is used for respectively analyzing the gray scale image before segmentation and the binary image after segmentation to obtain full-image gray scale information;
the data area module gray distribution information extraction module is used for extracting gray distribution information of all modules of the two-dimensional code data area;
the information extraction accuracy evaluation criterion setting module is used for setting a two-dimensional code information extraction accuracy evaluation criterion according to the full-image gray scale information and the gray scale distribution information, and the two-dimensional code information extraction accuracy evaluation criterion comprises the following steps: similarity between the gray information of the module to be evaluated and all modules, similarity between sampling information of the module to be evaluated and the gray information of the full image, and the number or proportion of pixels of the main gray peak corresponding to the gray distribution histogram of the full image of each module to be evaluated;
and the information extraction accuracy evaluation module is used for comprehensively evaluating the accuracy of the sampling value of the module to be evaluated and the extraction accuracy of the whole two-dimensional code information by adopting one or more two-dimensional code information extraction accuracy evaluation criteria.
The technical scheme of the application has the following beneficial effects:
the method and the device for evaluating the information extraction accuracy of the two-dimensional code through the gray scale, the form and other information of the two-dimensional code are provided, whether decoding can be successfully carried out is preliminarily estimated before decoding, the accuracy of values extracted by each module is judged, the module values with errors are corrected, and finally the identification accuracy and the decoding success rate of the two-dimensional code are improved.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a DM code in the prior art;
fig. 2 is a flowchart of an evaluation method for extracting accuracy of two-dimensional code information according to the present application;
fig. 3 is an example of an image that needs to be preprocessed before evaluation in the present application.
Detailed Description
Reference will now be made in detail to embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following examples do not represent all embodiments consistent with the present application. But merely as exemplifications of systems and methods consistent with certain aspects of the application, as recited in the claims.
Referring to fig. 2, a flowchart of an evaluation method for two-dimensional code information extraction accuracy according to the present application is shown.
The application provides an evaluation method for extracting accuracy of two-dimensional code information, which comprises the following steps:
performing binary segmentation on the two-dimensional code image, and converting a gray scale image of the two-dimensional code image into a binary image;
respectively analyzing the gray-scale image before segmentation and the binary image after segmentation to obtain the gray-scale information of the whole image;
extracting gray distribution information of all modules in the two-dimensional code data area;
setting two-dimensional code information extraction accuracy evaluation criteria according to the full-image gray scale information and the gray scale distribution information, wherein the two-dimensional code information extraction accuracy evaluation criteria comprise: similarity between the gray information of the module to be evaluated and all modules, similarity between sampling information of the module to be evaluated and the gray information of the full image, and the number or proportion of pixels of the main gray peak corresponding to the gray distribution histogram of the full image of each module to be evaluated;
and adopting one or more of the two-dimension code information extraction accuracy evaluation criteria to comprehensively evaluate the accuracy of the sampling value of the module to be evaluated and the extraction accuracy of the whole two-dimension code information.
For the input image with better imaging, the self-adaptive binarization processing can be directly carried out on the image without carrying out preprocessing. For degraded images with uneven gray scale, noise interference, imaging blur and the like, preprocessing can be performed before subsequent operations are performed. And after pretreatment, carrying out binarization, and converting the gray-scale image into a binary image. After division, the gray information of the binary image and the gray information of the gray image before division are respectively analyzed as evaluation criteria. And then extracting the values of 0 and 1 according to the positions of the modules determined by the mode edges, and simultaneously extracting the gray distribution information of the modules. And finally, integrating the module distribution information and the image information to evaluate the accuracy of the sampling values of all the modules and the accuracy of the whole information extraction.
Preferably, the binary segmentation of the two-dimensional code image includes:
and preprocessing the two-dimensional code image with imaging degradation or uneven gray level.
For the two-dimensional code with imaging degradation, as shown in (a) and (b) in fig. 3, specific preprocessing such as morphological operation, median filtering, frequency domain filtering, contrast consistency stretching and the like can be selected to improve the image quality, so that a more accurate evaluation index can be obtained. In fig. 3(c), in the case where gray scale unevenness is caused by light irradiation, contrast-uniform stretching is important. Because the evaluation indexes of the modules are set through the gray information of the whole image, and all the modules of the whole image need to have uniform evaluation indexes, the two-dimensional code with serious contrast change needs to be preferentially stretched in contrast consistency.
Preferably, the preprocessing the two-dimensional code image with imaging degradation or gray scale unevenness includes:
and performing morphological operation, median filtering, frequency domain filtering or contrast consistency stretching treatment on the two-dimensional code image with imaging degradation or uneven gray level.
Preferably, the binary segmentation of the two-dimensional code image includes:
and carrying out self-adaptive binarization processing on the two-dimensional code image.
Preferably, the full-image grayscale information includes:
the gray level mean value, the variance, the number of black and white pixels and the ratio of each mode side module;
self-adaptive gray segmentation threshold;
the mean value, variance, maximum value, minimum value and grey distribution histogram of the whole image grey.
Preferably, the gray-scale distribution information includes:
the gray scale mean, variance, number of black and white pixels and the ratio of each module.
Preferably, the setting of the two-dimensional code information extraction accuracy evaluation criterion according to the full-image gray scale information and the gray scale distribution information includes:
classifying all modules in the two-dimensional code according to the segmentation threshold and the gray average value of each module to obtain a value of 0 and 1 of each module;
sampling 0 and 1 values of all modules in the two-dimensional code image, and calculating sampling values of all modules, wherein the sampling values are gray level average values of all pixels of all modules;
eliminating abnormal modules in all modules according to the sampling values;
calculating the gray mean and variance of the residual black module and white module after the abnormal module is eliminated;
and setting a two-dimension code information extraction accuracy evaluation criterion according to the two-dimension code segmentation threshold, the two-dimension code gray distribution histogram, the two-dimension code gray variance and mean, the gray mean and variance of the residual black modules and the gray mean and variance of the residual white modules.
Preferably, the excluding of abnormal modules from all modules according to the sampling value includes:
obtaining a sampling prediction value of each module according to the gray distribution information of each mode side module, wherein the sampling prediction value refers to a gray mean prediction value of each module;
and eliminating abnormal modules in all the modules, wherein the sampling values are inconsistent with the sampling predicted values.
Preferably, the comprehensively evaluating the accuracy of the sampling value of the module to be evaluated and the accuracy of extracting the whole two-dimensional code information by using one or more of the two-dimensional code information extraction accuracy evaluation criteria includes:
when a single criterion in the two-dimension code information extraction accuracy evaluation criteria is adopted, if the criterion does not reach the standard, the module is judged to be a 0 and 1 value error module;
when a plurality of criteria in the two-dimensional code information extraction accuracy evaluation criteria are comprehensively evaluated, each criterion score is calculated, if a certain index score does not reach the standard, the module is judged to be a module with a value of 0 and 1 being wrong, or all the criterion scores are weighted to calculate a comprehensive score, and if the comprehensive score does not reach the standard, the module is judged to be a module with a value of 0 and 1 being wrong.
An evaluation device for two-dimensional code information extraction accuracy comprises:
the binary segmentation module is used for performing binary segmentation on the two-dimensional code image and converting the gray image of the two-dimensional code image into a binary image;
the full-image gray scale information analysis module is used for respectively analyzing the gray scale image before segmentation and the binary image after segmentation to obtain full-image gray scale information;
the data area module gray distribution information extraction module is used for extracting gray distribution information of all modules of the two-dimensional code data area;
the information extraction accuracy evaluation criterion setting module is used for setting a two-dimensional code information extraction accuracy evaluation criterion according to the full-image gray scale information and the gray scale distribution information, and the two-dimensional code information extraction accuracy evaluation criterion comprises the following steps: similarity between the gray information of the module to be evaluated and all modules, similarity between sampling information of the module to be evaluated and the gray information of the full image, and the number or proportion of pixels of the main gray peak corresponding to the gray distribution histogram of the full image of each module to be evaluated;
and the information extraction accuracy evaluation module is used for comprehensively evaluating the accuracy of the sampling value of the module to be evaluated and the extraction accuracy of the whole two-dimensional code information by adopting one or more two-dimensional code information extraction accuracy evaluation criteria.
The key steps in the two-dimension code module information accuracy evaluation method in the embodiment of the application comprise the following three steps:
step 1, module classification:
and classifying all modules in the two-dimensional code according to the binary segmentation threshold and the gray average value of each module to obtain the '0' and '1' values of each module. For a two-dimensional code with white polarity, a white module with the gray average value larger than the segmentation threshold value is marked as '1'; those with a gray mean value less than the segmentation threshold are black blocks (background blocks), labeled "0". The two-dimensional code with black polarity is opposite, and the module (background module) with white gray mean value larger than the segmentation threshold is marked as '0'; those with a gray average value less than the segmentation threshold are black blocks, labeled "1".
Step 2, setting an evaluation standard:
firstly, estimating the number of correct sampling values of the black and white module according to the average value of the sampling gray scale of the black and white module determined by the mode edge, taking a black two-dimensional code image as an example, when the modules are distributed in a clock mode, namely in a black and white interval mode, the sampling result of the module at the appointed position can be determined according to the polarity, namely the '0' and '1' value of the module can be appointed without calculating the average value of the gray scale. Other positions can also know the values of the specific modules of '0' and '1' according to the two-dimensional code category. Such as the font of QR code, the L side of DM code, and the correction pattern.
Sampling all modules with known values of 0 and 1 in the two-dimensional code, calculating sampling values of all modules, wherein the sampling values are gray level average values of all pixels of all modules, eliminating abnormal modules in all modules according to the sampling values, then averaging all sampling results of the rest black modules, averaging all the rest white modules, and calculating to obtain the gray level average values and the variances of the rest black modules and the rest white modules.
The abnormal module refers to a module for sampling in a known sampling value area, wherein the sampling value is inconsistent with a sampling predicted value. Such as broken blocks, may result in inaccurate calculated values for the sampled mean Mb of the remaining black blocks and the sampled mean Mw of the remaining white blocks, so these blocks may not participate in the calculation. And obtaining a sampling prediction value of each module according to the gray distribution information of each mode side module, wherein the sampling prediction value refers to a gray mean prediction value of each module. Wherein sample the mode limit, including clock limit and L limit, the lower left side module is the L limit, and the module on the right side of top is the clock limit, and the grey scale distribution of these two positions is regular, can deduce the sampling range according to the law, exactly the sampling prediction value. For example, the black and white intervals of each module in the pattern edge are distributed, the first is smaller than the threshold, the second is larger than the threshold, and if the rule is not met, the sampling prediction value is not met.
The gray scale information required by the module for evaluating the index is completely determined, and the reference indexes comprise: the two-dimensional code segmentation threshold value, the two-dimensional code gray distribution histogram, the two-dimensional code gray variance and mean value, the gray mean value and variance of the residual black module, and the gray mean value and variance of the residual white module.
Step 3, module extraction information evaluation:
through the steps, all the gray information to be evaluated is extracted. Finally, by comparing the module information with the whole image gray information and the known module gray information, whether the module sampling value of 0 and 1 is accurate can be evaluated. The evaluation may refer to the following criteria: a. similarity between the gray information of the module to be evaluated and all modules: comparing the module to be evaluated with the same sampled gray information in the known module, wherein the higher the similarity of the gray information is, the more accurate the similarity of the gray information is; b. the similarity between the sampling information of the module to be evaluated and the full-image gray scale information is as follows: the gray scale information of the whole image uniformly comprises a black module and a white module, so that the more the sampling information of the modules is close to the whole image information, the more inaccurate the module sampling information is, namely the more inaccurate the similarity between the sampling information of the module to be evaluated and the gray scale information of the whole image is; c. the number or proportion of the pixels of each module to be evaluated, which are positioned in the corresponding main gray peak of the full-image gray distribution histogram: for the full-image gray scale information distribution histogram, due to the characteristics of the two-dimensional code image, the full-image gray scale information distribution histogram is distributed into double main peaks, and the sampling accuracy can be judged by calculating the number or the proportion of pixels of each module located at the corresponding gray scale main peak. If the sampling value of the black module is '1', judging whether the gray value of each pixel on the module is close to the position of the main peak or not for each module of '1', and if the number or the proportion of the pixel points at the position of the non-main peak is too small, judging that the module is a sampling error module.
For the evaluation criteria described above, each module may be evaluated in a single criterion or multiple criteria. But the criterion is that only one evaluation index is calculated, and if the evaluation index does not reach the standard, the module is judged to be an error module. The multi-criterion can calculate all index scores, and if one index score is too low, the module is judged to be an error module; or weighting all the indexes, calculating the comprehensive score, and judging according to the comprehensive score.
The score criterion may use an absolute score, i.e. below a certain score, as an error module. Or use relative scores. Firstly, considering that each black and white module has a certain proportion of module sampling errors, if 30%, judging the module which is thirty percent of the black and white module as an error module.
The method and the device for evaluating the accuracy of extracting the information of the two-dimensional code through the information of the gray scale, the form and the like of the two-dimensional code only evaluate the accuracy of a module 0 and 1, preliminarily estimate whether decoding can be successfully performed before decoding, and judge the accuracy of values extracted by each module, wherein the module which judges that sampling errors exist can directly adjust a sampling value of the module, or perform subsequent operations such as sampling again to achieve higher error correction capability, and finally improve the accuracy of identifying the two-dimensional code and the success rate of decoding.
The embodiments provided in the present application are only a few examples of the general concept of the present application, and do not limit the scope of the present application. Any other embodiments extended according to the scheme of the present application without inventive efforts will be within the scope of protection of the present application for a person skilled in the art.

Claims (10)

1. An evaluation method for two-dimension code information extraction accuracy is characterized by comprising the following steps:
performing binary segmentation on the two-dimensional code image, and converting a gray scale image of the two-dimensional code image into a binary image;
respectively analyzing the gray-scale image before segmentation and the binary image after segmentation to obtain the gray-scale information of the whole image;
extracting gray distribution information of all modules in the two-dimensional code data area;
setting two-dimensional code information extraction accuracy evaluation criteria according to the full-image gray scale information and the gray scale distribution information, wherein the two-dimensional code information extraction accuracy evaluation criteria comprise: similarity between the gray information of the module to be evaluated and all modules, similarity between sampling information of the module to be evaluated and the gray information of the full image, and the number or proportion of pixels of the main gray peak corresponding to the gray distribution histogram of the full image of each module to be evaluated;
and adopting one or more of the two-dimension code information extraction accuracy evaluation criteria to comprehensively evaluate the accuracy of the sampling value of the module to be evaluated and the extraction accuracy of the whole two-dimension code information.
2. The method for evaluating the accuracy of extracting two-dimensional code information according to claim 1, wherein the performing binary segmentation on the two-dimensional code image comprises:
and preprocessing the two-dimensional code image with imaging degradation or uneven gray level.
3. The method according to claim 2, wherein the preprocessing the two-dimensional code image with degraded imaging or uneven gray scale comprises:
and performing morphological operation, median filtering, frequency domain filtering or contrast consistency stretching treatment on the two-dimensional code image with imaging degradation or uneven gray level.
4. The method for evaluating the accuracy of extracting two-dimensional code information according to claim 1, wherein the performing binary segmentation on the two-dimensional code image comprises:
and carrying out self-adaptive binarization processing on the two-dimensional code image.
5. The method for evaluating the accuracy of extracting two-dimensional code information according to claim 1, wherein the full-image gray scale information comprises:
the gray level mean value, the variance, the number of black and white pixels and the ratio of each mode side module;
self-adaptive gray segmentation threshold;
the mean value, variance, maximum value, minimum value and grey distribution histogram of the whole image grey.
6. The method for evaluating the accuracy of extracting two-dimensional code information according to claim 1, wherein the gray scale distribution information comprises:
the gray scale mean, variance, number of black and white pixels and the ratio of each module.
7. The method for evaluating the accuracy of extracting two-dimensional code information according to claim 5 or 6, wherein the setting of the evaluation criterion of the accuracy of extracting two-dimensional code information according to the full-image gray scale information and the gray scale distribution information comprises:
classifying all modules in the two-dimensional code according to the segmentation threshold and the gray average value of each module to obtain a value of 0 and 1 of each module;
sampling 0 and 1 values of all modules in the two-dimensional code image, and calculating sampling values of all modules, wherein the sampling values are gray level average values of all pixels of all modules;
eliminating abnormal modules in all modules according to the sampling values;
calculating the gray mean and variance of the residual black module and white module after the abnormal module is eliminated;
and setting a two-dimension code information extraction accuracy evaluation criterion according to the two-dimension code segmentation threshold, the two-dimension code gray distribution histogram, the two-dimension code gray variance and mean, the gray mean and variance of the residual black modules and the gray mean and variance of the residual white modules.
8. The method according to claim 7, wherein the excluding of the abnormal modules from all the modules according to the sampling values comprises:
obtaining a sampling prediction value of each module according to the gray distribution information of each mode side module, wherein the sampling prediction value refers to a gray mean prediction value of each module;
and eliminating abnormal modules in all the modules, wherein the sampling values are inconsistent with the sampling predicted values.
9. The method for evaluating the extraction accuracy of two-dimensional code information according to claim 1 or 8, wherein the step of comprehensively evaluating the sampling value accuracy of the module to be evaluated and the extraction accuracy of the whole two-dimensional code information by using one or more of the two-dimensional code information extraction accuracy evaluation criteria comprises the steps of:
when a single criterion in the two-dimension code information extraction accuracy evaluation criteria is adopted, if the criterion does not reach the standard, the module is judged to be a 0 and 1 value error module;
when a plurality of criteria in the two-dimensional code information extraction accuracy evaluation criteria are comprehensively evaluated, each criterion score is calculated, if a certain index score does not reach the standard, the module is judged to be a module with a value of 0 and 1 being wrong, or all the criterion scores are weighted to calculate a comprehensive score, and if the comprehensive score does not reach the standard, the module is judged to be a module with a value of 0 and 1 being wrong.
10. The utility model provides an evaluation device of two-dimensional code information extraction accuracy which characterized in that includes:
the binary segmentation module is used for performing binary segmentation on the two-dimensional code image and converting the gray image of the two-dimensional code image into a binary image;
the full-image gray scale information analysis module is used for respectively analyzing the gray scale image before segmentation and the binary image after segmentation to obtain full-image gray scale information;
the data area module gray distribution information extraction module is used for extracting gray distribution information of all modules of the two-dimensional code data area;
the information extraction accuracy evaluation criterion setting module is used for setting a two-dimensional code information extraction accuracy evaluation criterion according to the full-image gray scale information and the gray scale distribution information, and the two-dimensional code information extraction accuracy evaluation criterion comprises the following steps: similarity between the gray information of the module to be evaluated and all modules, similarity between sampling information of the module to be evaluated and the gray information of the full image, and the number or proportion of pixels of the main gray peak corresponding to the gray distribution histogram of the full image of each module to be evaluated;
and the information extraction accuracy evaluation module is used for comprehensively evaluating the accuracy of the sampling value of the module to be evaluated and the extraction accuracy of the whole two-dimensional code information by adopting one or more two-dimensional code information extraction accuracy evaluation criteria.
CN202110978073.8A 2021-08-24 2021-08-24 Evaluation method and device for two-dimensional code information extraction accuracy Active CN113658164B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110978073.8A CN113658164B (en) 2021-08-24 2021-08-24 Evaluation method and device for two-dimensional code information extraction accuracy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110978073.8A CN113658164B (en) 2021-08-24 2021-08-24 Evaluation method and device for two-dimensional code information extraction accuracy

Publications (2)

Publication Number Publication Date
CN113658164A true CN113658164A (en) 2021-11-16
CN113658164B CN113658164B (en) 2024-05-24

Family

ID=78492788

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110978073.8A Active CN113658164B (en) 2021-08-24 2021-08-24 Evaluation method and device for two-dimensional code information extraction accuracy

Country Status (1)

Country Link
CN (1) CN113658164B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727594A (en) * 2009-11-26 2010-06-09 南京烽火星空通信发展有限公司 Method and system for identifying bar code of server-assisted mobile terminal
CN102254144A (en) * 2011-07-12 2011-11-23 四川大学 Robust method for extracting two-dimensional code area in image
US20150090791A1 (en) * 2013-09-29 2015-04-02 Founder Mobile Media Technology (Beijing) Co., Ltd. Method and system for binarization of two dimensional code image
CN105069389A (en) * 2015-07-27 2015-11-18 福建联迪商用设备有限公司 Two-dimensional code partitioning decoding method and system
CN106548111A (en) * 2016-10-26 2017-03-29 凌云光技术集团有限责任公司 A kind of Quick Response Code open defect detection method and device
WO2017121018A1 (en) * 2016-01-11 2017-07-20 中兴通讯股份有限公司 Method and apparatus for processing two-dimensional code image, and terminal and storage medium
CN109325491A (en) * 2018-08-16 2019-02-12 腾讯科技(深圳)有限公司 Identification code recognition methods, device, computer equipment and storage medium
US20190080130A1 (en) * 2017-09-08 2019-03-14 Qisda Corporation Barcode Identification Method for Improving Decoding Reliability by Correcting Image Distortion
CN110110829A (en) * 2018-02-01 2019-08-09 新奥科技发展有限公司 A kind of two dimensional code processing method and processing device
CN110874538A (en) * 2018-08-29 2020-03-10 杭州海康威视数字技术股份有限公司 Method and device for evaluating decoding result of bar code and electronic equipment
CN111476050A (en) * 2020-04-02 2020-07-31 北京致胜宏达科技有限公司 Bar code identification method and device, electronic equipment and storage medium
CN111598837A (en) * 2020-04-21 2020-08-28 中山大学 Full-reference image quality evaluation method and system suitable for visual two-dimensional code
CN111951329A (en) * 2020-08-14 2020-11-17 汉海信息技术(上海)有限公司 Two-dimensional code identification method, device, equipment and storage medium
US20200380227A1 (en) * 2019-05-31 2020-12-03 Alibaba Group Holding Limited Two-dimensional code identification and positioning
CN112364871A (en) * 2020-10-27 2021-02-12 重庆大学 Part code spraying character segmentation method based on improved projection algorithm

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727594A (en) * 2009-11-26 2010-06-09 南京烽火星空通信发展有限公司 Method and system for identifying bar code of server-assisted mobile terminal
CN102254144A (en) * 2011-07-12 2011-11-23 四川大学 Robust method for extracting two-dimensional code area in image
US20150090791A1 (en) * 2013-09-29 2015-04-02 Founder Mobile Media Technology (Beijing) Co., Ltd. Method and system for binarization of two dimensional code image
CN105069389A (en) * 2015-07-27 2015-11-18 福建联迪商用设备有限公司 Two-dimensional code partitioning decoding method and system
US20180137322A1 (en) * 2015-07-27 2018-05-17 Fujian Landi Commercial Equipment Co., Ltd. Block decoding method and system for two-dimensional code
WO2017121018A1 (en) * 2016-01-11 2017-07-20 中兴通讯股份有限公司 Method and apparatus for processing two-dimensional code image, and terminal and storage medium
CN106548111A (en) * 2016-10-26 2017-03-29 凌云光技术集团有限责任公司 A kind of Quick Response Code open defect detection method and device
US20190080130A1 (en) * 2017-09-08 2019-03-14 Qisda Corporation Barcode Identification Method for Improving Decoding Reliability by Correcting Image Distortion
CN110110829A (en) * 2018-02-01 2019-08-09 新奥科技发展有限公司 A kind of two dimensional code processing method and processing device
CN109325491A (en) * 2018-08-16 2019-02-12 腾讯科技(深圳)有限公司 Identification code recognition methods, device, computer equipment and storage medium
CN110874538A (en) * 2018-08-29 2020-03-10 杭州海康威视数字技术股份有限公司 Method and device for evaluating decoding result of bar code and electronic equipment
US20200380227A1 (en) * 2019-05-31 2020-12-03 Alibaba Group Holding Limited Two-dimensional code identification and positioning
CN111476050A (en) * 2020-04-02 2020-07-31 北京致胜宏达科技有限公司 Bar code identification method and device, electronic equipment and storage medium
CN111598837A (en) * 2020-04-21 2020-08-28 中山大学 Full-reference image quality evaluation method and system suitable for visual two-dimensional code
CN111951329A (en) * 2020-08-14 2020-11-17 汉海信息技术(上海)有限公司 Two-dimensional code identification method, device, equipment and storage medium
CN112364871A (en) * 2020-10-27 2021-02-12 重庆大学 Part code spraying character segmentation method based on improved projection algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
甘志坚;方俊彬;关贺元;唐洁媛;罗云瀚;余建辉;卢惠辉;张军;钟永春;陈哲;: "复杂光照下QR码图像二值化算法研究及应用", 应用光学, no. 05 *

Also Published As

Publication number Publication date
CN113658164B (en) 2024-05-24

Similar Documents

Publication Publication Date Title
CN110334706B (en) Image target identification method and device
Jia et al. Degraded document image binarization using structural symmetry of strokes
Yousif et al. Toward an optimized neutrosophic K-means with genetic algorithm for automatic vehicle license plate recognition (ONKM-AVLPR)
US10817741B2 (en) Word segmentation system, method and device
CN111382704A (en) Vehicle line-pressing violation judgment method and device based on deep learning and storage medium
CN112418150B (en) Palm vein image evaluation method, palm vein image evaluation device, computer equipment and storage medium
CN106875545B (en) Method and device for identifying paper money
CN112614109A (en) Image quality evaluation method, device and computer readable storage medium
CN110689003A (en) Low-illumination imaging license plate recognition method and system, computer equipment and storage medium
CN114240925A (en) Method and system for detecting document image definition
CN114820625A (en) Automobile top block defect detection method
CN1564600A (en) Detection method of moving object under dynamic scene
CN118279304B (en) Abnormal recognition method, device and medium for special-shaped metal piece based on image processing
CN112101058B (en) Automatic identification method and device for test paper bar code
CN116311543B (en) Handwriting analysis method and system based on image recognition technology
CN113658164B (en) Evaluation method and device for two-dimensional code information extraction accuracy
CN116385953B (en) Railway wagon door hinge breaking fault image identification method
CN111753842B (en) Method and device for detecting text region of bill
CN115862121A (en) Face rapid matching method based on multimedia resource library
CN110348386A (en) A kind of facial image recognition method based on fuzzy theory, device and equipment
Islam et al. A new image quality index and it’s application on MRI image
CN112801013B (en) Face recognition method, system and device based on key point recognition verification
CN115424253A (en) License plate recognition method and device, electronic equipment and storage medium
CN111242047A (en) Image processing method and apparatus, electronic device, and computer-readable storage medium
Balkys et al. Segmenting the eye fundus images for identification of blood vessels

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