A two-dimensional code decoding method and a terminal

A decoding method and a decoding terminal technology, which are applied in the direction of electromagnetic radiation induction, etc., can solve problems such as the success rate of inkjet uneven two-dimensional code decoding, and achieve the effect of improving the success rate

Active Publication Date: 2019-06-18
厦门商集网络科技有限责任公司
View PDF9 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The technical problem to be solved by the present invention is: how to improve the two-dimensional code decoding success rate of uneven inkjet

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A two-dimensional code decoding method and a terminal
  • A two-dimensional code decoding method and a terminal
  • A two-dimensional code decoding method and a terminal

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0056] Such as figure 1 As shown, this embodiment provides a two-dimensional code decoding method, including:

[0057] S1. Acquiring a grayscale image of a two-dimensional code.

[0058]For example, input an image with a QR code graphic and the location information of the QR code graphic, intercept the area of ​​the QR code graphic, and grayscale the area of ​​the QR code graphic to obtain a grayscale image of the QR code ,Such as figure 2 shown. figure 2 The gray-scale image of the two-dimensional code shown in the dark module area is too large, the area of ​​the light-color module is relatively small, and some light-color modules are completely covered. The ratio of the number of black and white pixels in the standard QR code is 1:1, while figure 2 In the grayscale image of the two-dimensional code shown, due to the large amount of inkjet during the printing process of the printing device, the area occupied by the black pixels increases, and the two-dimensional code i...

Embodiment 2

[0081] This embodiment provides a two-dimensional code decoding terminal, including one or more processors and a memory, the memory stores a program, and is configured to perform the following steps by the one or more processors:

[0082] S1. Acquiring a grayscale image of a two-dimensional code.

[0083] For example, input an image with a QR code graphic and the location information of the QR code graphic, intercept the area of ​​the QR code graphic, and grayscale the area of ​​the QR code graphic to obtain a grayscale image of the QR code ,Such as figure 2 shown. figure 2 The gray-scale image of the two-dimensional code shown in the dark module area is too large, the area of ​​the light-color module is relatively small, and some light-color modules are completely covered. The ratio of the number of black and white pixels in the standard QR code is 1:1, while figure 2 In the grayscale image of the two-dimensional code shown, due to the large amount of inkjet during the ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a two-dimensional code decoding method and a terminal, and belongs to the field of data processing. The method comprises the steps of by obtaining a grayscale image of a two-dimensional code, obtaining a gray histogram corresponding to the gray image; Counting a half of the total number of pixels of the grayscale image to obtain a target number; Obtaining a gray thresholdvalue according to a preset formula; Wherein the preset formula is specifically shown in the description; Wherein histGram [i] represents the number of pixels with the gray value of i in the gray histogram, S represents the target number, dif (t) represents the difference between the number of pixels with the gray value of not more than t and the target number, and T represents the gray threshold;Binarizing the gray level image according to the gray level threshold value to obtain a binarized image; And calling a bar code decoding algorithm, and trying to decode the binary image. The two-dimensional code decoding success rate of non-uniform ink jet is improved.

Description

technical field [0001] The invention relates to a two-dimensional code decoding method and a terminal, belonging to the field of data processing. Background technique [0002] The traditional QR two-dimensional code decoding technology is limited to solving barcodes with relatively uniform depth and light modules captured by barcode reading equipment. However, in some scenarios, such as the value-added tax invoice printed by an inkjet printer, due to printer quality problems, too much ink causes the ink to spread in the dark module of the printed barcode, and finally the area of ​​​​the light module decreases; The area of ​​the light-colored module is enlarged. Both of these situations will lead to wrong values ​​when the pixel value sequence of the barcode is extracted in blocks, and finally the decoding fails. [0003] The patent document with application number 201510780603.2 provides a method and system for binarizing a QR two-dimensional code, including: obtaining a gr...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06K7/14
Inventor 吴建杭陈文传方恒凯
Owner 厦门商集网络科技有限责任公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products