CN109753838A - Two-dimensional code identification method, device, computer equipment and storage medium - Google Patents
Two-dimensional code identification method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN109753838A CN109753838A CN201910227328.XA CN201910227328A CN109753838A CN 109753838 A CN109753838 A CN 109753838A CN 201910227328 A CN201910227328 A CN 201910227328A CN 109753838 A CN109753838 A CN 109753838A
- Authority
- CN
- China
- Prior art keywords
- dimensional code
- image
- code
- identified
- dimensional
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 238000003860 storage Methods 0.000 title claims abstract description 18
- 230000008569 process Effects 0.000 claims abstract description 11
- 238000004590 computer program Methods 0.000 claims description 15
- 238000012545 processing Methods 0.000 claims description 10
- 238000001914 filtration Methods 0.000 claims description 9
- 238000006243 chemical reaction Methods 0.000 claims description 7
- 238000012937 correction Methods 0.000 claims description 6
- 239000000284 extract Substances 0.000 claims description 6
- 239000011159 matrix material Substances 0.000 claims description 4
- 230000008901 benefit Effects 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 6
- 238000007781 pre-processing Methods 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 241000544076 Whipplea modesta Species 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000005452 bending Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000011946 reduction process Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
Abstract
The present invention relates to field of image recognition more particularly to two-dimensional code identification method, device, computer equipment and storage mediums, which comprises obtains the image for containing two dimensional code to be identified, pre-processes to described image;Obtain the area image for containing the two dimensional code;The deviation angle for adjusting the area image obtains the region for containing only the two dimensional code;The region projection for containing only two dimensional code is identified into coordinate system, obtains the information of the two dimensional code.The present invention is by two positioning frames, the image can be judged with the presence or absence of two dimensional code by judging whether there is two positioning frames, the deviation angle of two dimensional code is acquired according to the mass center of two positioning frames, according to the deviation angle being calculated, image in 2 D code is transformed into the coordinate system based on two dimensional code from the coordinate system based on image, so as to realize the real time high-speed identification of two dimensional code, can be applied in high-speed mobile equipment.
Description
Technical field
The present invention relates to field of image recognition more particularly to two-dimensional code identification method, device, computer equipment and storages
Medium.
Background technique
Two dimensional code is a kind of information code for opposite one-dimensional bar code, it takes full advantage of the two-dimensional space in plane,
Information density is substantially increased, to encode big data in small area, suffers from optimistic answer in major industry
With scene and potentiality.
The prior art examines the pretreatment of two dimensional code dependent on the edge based on Laplacian when identifying two dimensional code
It surveys, Gaussian convolution filtering is carried out to image first and carries out noise reduction process, then edge detection is carried out using Laplace operator;This
Outside, there are also the straight-line detections based on Hough transform, the gradient direction of straight line are inversely applied, the endpoint of available straightway
Information, while the gradient direction of straight line being fused in Hough transform, but when image has more serious geometric distortion
When, the direct side of two of addressable image L will will appear radian, to be difficult to detect and influence final discrimination;Based on Hough
The straight-line detection of transformation is computationally intensive, is difficult quickly to calculate as a result, can only generally be handled using industrial computer,
It has no idea to realize real-time two dimensional code identification, be used for AGV (Automatic Guided Vehicle, self-navigation transport vehicle)
Location navigation when due to frame per second it is inadequate, influence the travel speed of AGV.
It can be seen that the two dimensional code recognition efficiency that the prior art has missing to image is not high, it substantially can not be to quick
Mobile two dimensional code is identified that there is also identification inaccuracy or unrecognized problems, needs to improve.
Summary of the invention
Based on this, it is necessary to for above-mentioned problem, provide a kind of two-dimensional code identification method, device, computer equipment and
Storage medium.
The present invention provides two-dimensional code identification method a kind of in one of the embodiments, which comprises
Image in 2 D code to be identified is obtained, the image in 2 D code is pre-processed;
Obtain the area image for containing the two dimensional code;
The deviation angle for adjusting the area image obtains the region for containing only the two dimensional code;
The region projection for containing only two dimensional code is identified into coordinate system, obtains the information of the two dimensional code.
In one of the embodiments, the present invention provides a kind of two-dimension code recognition device, described device includes:
Image acquisition unit, described image acquiring unit is for obtaining image in 2 D code to be identified;
Image processing unit, described image processing unit obtain two dimensional code for handling the image in 2 D code to be identified
Information;
Information output unit, the information output unit is for exporting the two-dimensional barcode information.
It is described in one of the embodiments, the present invention provides a kind of computer equipment, including memory and processor
Computer program is stored in memory, when the computer program is executed by the processor, so that the processor executes
The step of above-mentioned two-dimensional code identification method.
The present invention also provides a kind of computer readable storage mediums in one of the embodiments, which is characterized in that institute
It states and is stored with computer program on computer readable storage medium, when the computer program is executed by processor, so that described
Processor executes the step of above-mentioned two-dimensional code identification method.
Above-mentioned two-dimensional code identification method, device, computer equipment and storage medium, by two positioning frames, Ke Yitong
It crosses and judges whether there is two positioning frames to judge that the image with the presence or absence of two dimensional code, is asked according to the mass center of two positioning frames
The deviation angle for obtaining two dimensional code, according to the deviation angle being calculated, by image in 2 D code from the coordinate system conversion based on image
It can be applied to high-speed mobile equipment to the coordinate system based on two dimensional code so as to realize the real time high-speed identification of two dimensional code
In.
Detailed description of the invention
Fig. 1 is the applied environment figure of the two-dimensional code identification method provided in one embodiment;
Fig. 2 is the two-dimensional code identification method block diagram that one embodiment provides;
Fig. 3 is the two dimensional code coordinate schematic diagram that one embodiment provides;
Fig. 4 is the structural block diagram of the two-dimension code recognition device provided in one embodiment;
Fig. 5 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
It is appreciated that term " first " used in this application, " second " etc. can be used to describe various elements herein,
But unless stated otherwise, these elements should not be limited by these terms.These terms are only used to by first element and another yuan
Part is distinguished.For example, in the case where not departing from scope of the present application, the first xx script can be known as the 2nd xx script,
And similarly, the 2nd xx script can be known as the first xx script.
Fig. 1 is the applied environment figure of the two-dimensional code identification method provided in one embodiment, as shown in Figure 1, in the application
In environment, including computer equipment 110 and terminal 120.
In embodiments of the present invention, computer equipment can be independent physical server or terminal, be also possible to multiple
The server cluster that physical server is constituted can be to provide the basic cloud meter such as Cloud Server, cloud database, cloud storage and CDN
Calculate the Cloud Server of service.
Terminal 110 can be camera, smart phone, tablet computer, laptop etc., and however, it is not limited to this.Eventually
End 110 and computer equipment 120 can be attached by network, and the present invention is herein with no restrictions.
As shown in Fig. 2, in one embodiment it is proposed that a kind of two-dimensional code identification method, the present embodiment is mainly with the party
Method is applied to the computer equipment 120 in above-mentioned Fig. 1 to illustrate.It can specifically include following steps:
In step s 201, image in 2 D code to be identified is obtained, the image in 2 D code is pre-processed.
In embodiments of the present invention, image in 2 D code to be identified refers to that, comprising the image to a two dimensional code, computer is set
After standby 120 obtain this image, more images are pre-processed, to reduce the disturbance degree of interference noise.
As an embodiment of the present invention, the method for obtaining two dimensional code to be identified be can be by receiving camera acquisition
Image in 2 D code to be identified is also possible to by reading the image in 2 D code to be identified stored in storage medium, when computer is set
After getting image in 2 D code to be identified, image is pre-processed, to reduce the disturbance degree of interference noise.Specifically,
Preprocessing process to image in 2 D code to be identified includes being filtered to image, then carry out binary conversion treatment.
The embodiment of the present invention pre-processes image by obtaining image in 2 D code to be identified, can be effective
The disturbance degree of interference noise is reduced, the accuracy of two dimensional code identification is increased.
In step S202, the area image for containing the two dimensional code is obtained.
In embodiments of the present invention, contain two dimensional code in pretreated image in 2 D code to be identified in obtaining step S201
Area image, the area image containing two dimensional code refer to by identify two dimensional code positioning frame, identify image in
Two dimensional code, and intercept out by the area image of two dimensional code in image according to frame, wherein the positioning frame of two dimensional code is two dimension
The included frame of code.Specifically, carrying out connected domain scanning to image, the positioning frame of two dimensional code is obtained according to scanning result, and
Obtain the area image of two dimensional code.
As an embodiment of the present invention, by pretreated image in 2 D code other than containing two dimensional code, also
It is not the region of two dimensional code, connected domain scanning first is carried out to image, the positioning frame of two dimensional code is then determined according to scanning result,
The region where two dimensional code is determined according to the positioning frame of two dimensional code, then intercepts out by the region where the two dimensional code,
Other regions are given up, and property contains the area image of two dimensional code.
The embodiment of the present invention is identified by the positioning frame to two dimensional code, obtains the area image containing two dimensional code,
The content for reducing image recognition, increases the accuracy of identification.
In step S203, the deviation angle of the area image is adjusted, obtains the region for containing only the two dimensional code.
In embodiments of the present invention, after getting the area image containing the two dimensional code, need to adjust the administrative division map
The deviation angle of picture obtains the region for containing only two dimensional code.Wherein, the region for containing only two dimensional code refers to that final image contains only
The black square region of two dimensional code obtains an image in 2 D code.
As an embodiment of the present invention, after obtaining the area image containing the two dimensional code, in the area image, two
Tieing up code may need according to the positioning frame of two dimensional code for a tilt angle is in for this image by the angle of two dimensional code
Degree is adjusted, and positioning frame is adjusted, so that the angle of two dimensional code is corrected.
The embodiment of the present invention carries out the adjustment of angle offset to two dimensional code according to the identification frame of two dimensional code, it is ensured that two dimension
Code is easily identified, and increases the accuracy of two dimensional code identification.
In step S204, the region projection for containing only two dimensional code is identified into coordinate system, is obtained described
The information of two dimensional code.
In embodiments of the present invention, behind the region for obtaining containing only two dimensional code, two dimensional code is projected into a new coordinate
In system, two dimensional code is identified, identifies the information of two dimensional code.Wherein, it should two dimensional code is subjected to orthographic projection into coordinate system,
Two dimensional code is identified again.
As an embodiment of the present invention, by two dimensional code orthographic projection into coordinate system after, the black square of two dimensional code is still
For black, other regions are white in coordinate system, to highlight the concrete shape of two dimensional code, and according to the coordinate and gray scale of two dimensional code
Value identifies two dimensional code, extracts the information in two dimensional code.
The embodiment of the present invention is by projecting two dimensional code in coordinate system, according to the coordinate value of two dimensional code and gray value to two
Dimension code is identified, and then extracts the information of two dimensional code, and accuracy is high.
In embodiments of the present invention, carrying out pretreatment to the image in 2 D code includes carrying out to the image in 2 D code
Filtering processing carries out binary conversion treatment to the two dimensional code.
As an embodiment of the present invention, the entire image of acquisition is filtered, it is therefore an objective to reduce interference noise
The method of disturbance degree, filtering processing can be the noise reduction algorithms such as median filtering method or gaussian filtering.Such as use median filtering
It is both the intermediate value of all pixels point gray value set the gray value of each pixel in the point field window, this side
Method effectively can filter out processing to noise;The camera shooting equipment refers to camera or the equipment with camera function, is used for
Acquire image information to be detected.Binary conversion treatment is the pixel gray value that image is arranged, i.e., the gray value on image is set
It is set to 0 or 255, to obtain binary image, binary processing method can be threshold method scheduling algorithm, specifically can be complete
Image, is considered as the two class regions with different grey-scale, i.e. background and target, the pixel of image by the method for the same threshold value of office
Point, which is compared, distinguishes two class region of target and background, and pixel is indicated with black and white respectively.
The embodiment of the present invention is by pre-processing entire image, by filtering processing and binary conversion treatment, so that figure
As being more clear, the accuracy of identification two dimensional code is improved.
Fig. 3 shows a kind of two dimensional code border structure schematic diagram suitable for the embodiment of the present invention, and details are as follows:
In embodiments of the present invention, obtain contain the two dimensional code area image, comprising: to the image in 2 D code into
Connected domain scanning;Obtain two positioning frames of the two dimensional code.
Connected area disposal$ is done to black pixel point using white pixel point as background as an embodiment of the present invention.It is so-called
Connected area disposal$ refers to through the label to black picture element in bianry image (target), and each individual connected region is allowed to form one
A identified block, further, we can obtain the profile, boundary rectangle, mass center, the not geometric parameters such as bending moment of these blocks
Number.All connected domains are filtered, connected domain is the composition of black pixel point, as shown in figure 3, the secondary graphics are square brackets
Type positioning frame, according to diagram two dimensional code, the positioning frame quantity of screening is 2, acquires two according to the mass center of two positioning frames
Image in 2 D code is transformed into base from the coordinate system based on image according to the deviation angle being calculated by the deviation angle of dimension code
In the coordinate system of two dimensional code.Coordinate XOY based on image obtains the center-of-mass coordinate point of two positioning frames according to connection field result
It Wei not (x0,y0)、(x1,y1), corresponding two dimensional code positioning frame coordinate is (max_x0, min_x0, max_y0, min_y0)、
(max_x1, min_x1, max_y0, min_y1).So regional center coordinate of two dimensional code are as follows:Deviation angle
ForThe positioning frame coordinate of two-dimension code area is (max_x, min_x, max_y, min_
y);Wherein max_x is max_x0And max_x1The maximum value of the two, min_x min_x0And min_x1The minimum value of the two,
Max_y is max_y0And max_y1The maximum value of the two, min_y min_y0And min_y1The minimum value of the two.
The embodiment of the present invention can not only be identified in figure by carrying out connected domain scanning to two dimensional code with the presence or absence of two dimension
Code, may filter out the posting of two dimensional code, is identified with obtaining the area image containing two dimensional code, further increase two
Tie up the accuracy of identification of code.
In embodiments of the present invention, the deviation angle of the adjustment area image, obtains containing only the two dimensional code
Region, comprising: obtain area coordinate and deviation angle of the two dimensional code in the image in 2 D code;To the area of the two dimensional code
Domain carries out rotation process according to the deviation angle;Connected area disposal$ is done to the postrotational two-dimension code area, according to connection
Field result filters two dimensional code positioning frame, to obtain the region of the only described two dimensional code.
As an embodiment of the present invention, deviation angle is carried out to two-dimension code area (max_x, min_x, max_y, min_y)
Degree is the rotation of angle, to obtain the image in 2 D code with the not misalignment angle of the coordinate XOY of image.
The embodiment of the present invention is cheaply adjusted by carrying out angle to two dimensional code, it is ensured that the Founder of two dimensional code angle, further
Improve the accuracy of identification of two dimensional code.
In embodiments of the present invention, the region projection for containing only two dimensional code is identified into coordinate system, is obtained
The information of the two dimensional code, comprising: project to the two dimensional code adjusted in new coordinate system;It obtains in the two dimensional code
The gray value of black, white square, obtains the information matrix of the two dimensional code;Obtain decoded information.
As an embodiment of the present invention, above-mentioned two-dimension code area is carried out under new coordinate system respectively along X-axis and Y-axis
Projection obtains the directionality of two dimensional code and obtains the length and coordinate of two dimensional code real edge.Obtain all black, Bai Fang of two dimensional code
The barycentric coodinates of block;Decoded information is carried out in two-dimensional barcode information matrix substitution two dimensional code decoder module, is encoded according to two dimensional code
Rule analysis two-dimensional barcode information matrix obtains.The two dimensional code coding rule, wherein as shown in figure 3, the structure of two dimensional code by
Border area and data district's groups are sought at seeking the solid boundary L-type modesty boundary opposite with solid boundary that border area includes L-type.
The embodiment of the present invention by by two dimensional code orthographic projection into a new coordinate system, and according to the coordinate value of two dimensional code
It is decoded the information for obtaining two dimensional code and carrying to two dimensional code, accurately identifies two dimensional code.
In embodiments of the present invention, the region projection for containing only two dimensional code is identified into coordinate system, is obtained described
The information of two dimensional code, further includes: RS error correction is carried out to the decoded information, extracts final two-dimensional barcode information.
As an embodiment of the present invention, due to interchannel noise condition in network transmission, storing process, hardware is set data
The problems such as standby, data produced mistake, can be two dimensional code damage, situations such as code word is blocked by picture, the substantially stream of error correcting code
Journey is to be grouped to numeric data code, according to the code word of error-correction level and piecemeal, generates error correction code word.
The embodiment of the present invention carries out error correction to the two-dimensional barcode information after identification by RS error correction, further ensures that two dimensional code is known
Other accuracy.
The embodiment of the present invention can judge this by judging whether there is two positioning frames by two positioning frames
Image whether there is two dimensional code, the deviation angle of two dimensional code be acquired according to the mass center of two positioning frames, according to what is be calculated
Image in 2 D code is transformed into the coordinate system based on two dimensional code from the coordinate system based on image, so as to realize by deviation angle
The real time high-speed of two dimensional code identifies, can be applied in high-speed mobile equipment.
As shown in figure 4, in one embodiment, providing a kind of two-dimension code recognition device, which can
To be integrated in above-mentioned computer equipment 110, can specifically include:
Image acquisition unit 410, described image acquiring unit 410 is for obtaining image in 2 D code to be identified.
In embodiments of the present invention, image in 2 D code to be identified refers to that, comprising the image to a two dimensional code, computer is set
After standby 120 obtain this image, more images are pre-processed, to reduce the disturbance degree of interference noise.
As an embodiment of the present invention, the method for obtaining two dimensional code to be identified be can be by receiving camera acquisition
Image in 2 D code to be identified is also possible to by reading the image in 2 D code to be identified stored in storage medium, when computer is set
After getting image in 2 D code to be identified, image is pre-processed, to reduce the disturbance degree of interference noise.Specifically,
Preprocessing process to image in 2 D code to be identified includes being filtered to image, then carry out binary conversion treatment.
The embodiment of the present invention pre-processes image by obtaining image in 2 D code to be identified, can be effective
The disturbance degree of interference noise is reduced, the accuracy of two dimensional code identification is increased.
Image processing unit 420, described image processing unit 420 are obtained for handling the image in 2 D code to be identified
Two-dimensional barcode information.
In embodiments of the present invention, the area image containing two dimensional code in above-mentioned image in 2 D code to be identified is obtained, it is described
Area image containing two dimensional code refers to the positioning frame by identifying two dimensional code, identifies the two dimensional code in image, and according to side
The area image of two dimensional code in image is intercepted out by frame, wherein the positioning frame of two dimensional code is the included frame of two dimensional code.Tool
Body, connected domain scanning is carried out to image, the positioning frame of two dimensional code is obtained according to scanning result, and obtains the region of two dimensional code
Image.
As an embodiment of the present invention, by pretreated image in 2 D code other than containing two dimensional code, also
It is not the region of two dimensional code, connected domain scanning first is carried out to image, the positioning frame of two dimensional code is then determined according to scanning result,
The region where two dimensional code is determined according to the positioning frame of two dimensional code, then intercepts out by the region where the two dimensional code,
Other regions are given up, and the area image containing two dimensional code is left.
The embodiment of the present invention is identified by the positioning frame to two dimensional code, obtains the area image containing two dimensional code,
The content for reducing image recognition, increases the accuracy of identification.
In embodiments of the present invention, after getting the area image containing the two dimensional code, need to adjust the administrative division map
The deviation angle of picture obtains the region for containing only two dimensional code.Wherein, the region for containing only two dimensional code refers to that final image contains only
The black square region of two dimensional code obtains an image in 2 D code.
As an embodiment of the present invention, after obtaining the area image containing the two dimensional code, in the area image, two
Tieing up code may need according to the positioning frame of two dimensional code for a tilt angle is in for this image by the angle of two dimensional code
Degree is adjusted, and positioning frame is adjusted, so that the angle of two dimensional code is corrected.
The embodiment of the present invention carries out the adjustment of angle offset to two dimensional code according to the identification frame of two dimensional code, it is ensured that two dimension
Code is easily identified, and increases the accuracy of two dimensional code identification.
In embodiments of the present invention, behind the region for obtaining containing only two dimensional code, two dimensional code is projected into a new coordinate
In system, two dimensional code is identified, identifies the information of two dimensional code.Wherein, it should two dimensional code is subjected to orthographic projection into coordinate system,
Two dimensional code is identified again.
As an embodiment of the present invention, by two dimensional code orthographic projection into coordinate system after, the black square of two dimensional code is still
For black, other regions are white in coordinate system, to highlight the concrete shape of two dimensional code, and according to the coordinate and gray scale of two dimensional code
Value identifies two dimensional code, extracts the information in two dimensional code.
The embodiment of the present invention is by projecting two dimensional code in coordinate system, according to the coordinate value of two dimensional code and gray value to two
Dimension code is identified, and then extracts the information of two dimensional code, and accuracy is high.
Information output unit 430, the information output unit 430 is for exporting the two-dimensional barcode information.
In embodiments of the present invention, information output unit 430 can be display, image etc. to the knot of extraneous output information
Structure, the two-dimensional barcode information output for will identify that.
The embodiment of the present invention can judge this by judging whether there is two positioning frames by two positioning frames
Image whether there is two dimensional code, the deviation angle of two dimensional code be acquired according to the mass center of two positioning frames, according to what is be calculated
Image in 2 D code is transformed into the coordinate system based on two dimensional code from the coordinate system based on image, so as to realize by deviation angle
The real time high-speed of two dimensional code identifies, can be applied in high-speed mobile equipment.
Fig. 5 shows the internal structure chart of computer equipment in one embodiment.The computer equipment specifically can be Fig. 1
In computer equipment 110.As shown in figure 5, it includes being connected by system bus that the computer equipment, which includes the computer equipment,
Processor, memory, network interface, input unit and display screen.Wherein, memory includes non-volatile memory medium and interior
Memory.The non-volatile memory medium of the computer equipment is stored with operating system, can also be stored with computer program, the meter
When calculation machine program is executed by processor, processor may make to realize two-dimensional code identification method.It can also be stored in the built-in storage
Computer program when the computer program is executed by processor, may make processor to execute two-dimensional code identification method.Computer is set
Standby display screen can be liquid crystal display or electric ink display screen, and the input unit of computer equipment can be display screen
The touch layer of upper covering is also possible to the key being arranged on computer equipment shell, trace ball or Trackpad, can also be external
Keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Fig. 5, only part relevant to application scheme is tied
The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment
It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, two-dimension code recognition device provided by the present application can be implemented as a kind of shape of computer program
Formula, computer program can be run in computer equipment as shown in Figure 5.Composition can be stored in the memory of computer equipment should
Each program module of two-dimension code recognition device.
In one embodiment it is proposed that a kind of computer equipment, the computer equipment include memory, processor and
It is stored in the computer program that can be run on the memory and on the processor, the processor executes the computer
It is performed the steps of when program
The image for containing two dimensional code to be identified is obtained, described image is pre-processed;
Obtain the area image for containing the two dimensional code;
The deviation angle for adjusting the area image obtains the region for containing only the two dimensional code;
The region projection for containing only two dimensional code is identified into coordinate system, obtains the information of the two dimensional code.
In one embodiment, a kind of computer readable storage medium is provided, is stored on computer readable storage medium
Computer program, when computer program is executed by processor, so that processor executes following steps:
The image for containing two dimensional code to be identified is obtained, described image is pre-processed;
Obtain the area image for containing the two dimensional code;
The deviation angle for adjusting the area image obtains the region for containing only the two dimensional code;
The region projection for containing only two dimensional code is identified into coordinate system, obtains the information of the two dimensional code.
Although should be understood that various embodiments of the present invention flow chart in each step according to arrow instruction successively
It has been shown that, but these steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly state otherwise herein,
There is no stringent sequences to limit for the execution of these steps, these steps can execute in other order.Moreover, each embodiment
In at least part step may include that perhaps these sub-steps of multiple stages or stage are not necessarily multiple sub-steps
Completion is executed in synchronization, but can be executed at different times, the execution in these sub-steps or stage sequence is not yet
Necessarily successively carry out, but can be at least part of the sub-step or stage of other steps or other steps in turn
Or it alternately executes.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read
In storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, provided herein
Each embodiment used in any reference to memory, storage, database or other media, may each comprise non-volatile
And/or volatile memory.Nonvolatile memory may include that read-only memory (ROM), programming ROM (PROM), electricity can be compiled
Journey ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include random access memory
(RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, such as static state RAM
(SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhanced SDRAM
(ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) directly RAM (RDRAM), straight
Connect memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality
It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, all should be considered as described in this specification.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously
Limitations on the scope of the patent of the present invention therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention
Protect range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.
Claims (10)
1. a kind of two-dimensional code identification method, which is characterized in that the described method includes:
The image for containing two dimensional code to be identified is obtained, described image is pre-processed;
Obtain the area image for containing the two dimensional code;
The deviation angle for adjusting the area image obtains the region for containing only the two dimensional code;
The region projection for containing only two dimensional code is identified into coordinate system, obtains the information of the two dimensional code.
2. the method according to claim 1, wherein described pre-process the image in 2 D code, comprising:
The image in 2 D code is filtered;
Binary conversion treatment is carried out to the image in 2 D code.
3. according to the method described in claim 2, it is characterized in that, described be filtered the image in 2 D code, packet
It includes but is not limited to:
The image in 2 D code is filtered using median filtering method;Or
The image in 2 D code is filtered using gaussian filtering method.
4. the method according to claim 1, wherein described obtain the area image for containing the two dimensional code, packet
It includes:
The image in 2 D code is scanned into connected domain;
Obtain two positioning frames of the two dimensional code.
5. the method according to claim 1, wherein the deviation angle of the adjustment area image, obtains
Contain only the region of the two dimensional code, comprising:
Obtain area coordinate and deviation angle of the two dimensional code in the image in 2 D code;
Rotation process is carried out according to the deviation angle to the region of the two dimensional code;
Connected area disposal$ is done to the postrotational two-dimension code area, two dimensional code positioning frame is filtered according to connection field result, from
And obtain the region of the only described two dimensional code.
6. the method according to claim 1, wherein described by the region projection for containing only two dimensional code to seat
It is identified in mark system, obtains the information of the two dimensional code, comprising:
The two dimensional code adjusted is projected in new coordinate system;
The gray value for obtaining black, white square in the two dimensional code, obtains the information matrix of the two dimensional code;
Obtain decoded information.
7. according to the method described in claim 6, it is characterized in that, described by the region projection for containing only two dimensional code to seat
It is identified in mark system, obtains the information of the two dimensional code, further includes:
RS error correction is carried out to the decoded information, extracts final two-dimensional barcode information.
8. a kind of two-dimension code recognition device, which is characterized in that described device includes:
Image acquisition unit, described image acquiring unit is for obtaining image in 2 D code to be identified;
Image processing unit, described image processing unit obtain two-dimensional barcode information for handling the image in 2 D code to be identified;
Information output unit, the information output unit is for exporting the two-dimensional barcode information.
9. a kind of computer equipment, which is characterized in that including memory and processor, computer journey is stored in the memory
Sequence, when the computer program is executed by the processor, so that the processor perform claim requires any one of 1 to 7 power
Benefit requires a kind of the step of two-dimensional code identification method.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program, when the computer program is executed by processor, so that the processor perform claim requires any one of 1 to 7 right
It is required that a kind of the step of two-dimensional code identification method.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2018115207366 | 2018-12-12 | ||
CN201811520736 | 2018-12-12 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109753838A true CN109753838A (en) | 2019-05-14 |
Family
ID=66409398
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910227328.XA Pending CN109753838A (en) | 2018-12-12 | 2019-03-25 | Two-dimensional code identification method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109753838A (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110307934A (en) * | 2019-06-18 | 2019-10-08 | 合肥安杰特光电科技有限公司 | A kind of non-uniform object mass center real-time detection method based on pattern analysis |
CN110490020A (en) * | 2019-07-31 | 2019-11-22 | 珠海市杰理科技股份有限公司 | Bar code recognition, device, computer equipment and storage medium |
CN110879593A (en) * | 2019-11-11 | 2020-03-13 | 江苏理工学院 | Positioning method, reading method, positioning system and positioning device |
CN110969612A (en) * | 2019-12-04 | 2020-04-07 | 常州大学 | Two-dimensional code printing defect detection method |
CN111161328A (en) * | 2019-12-31 | 2020-05-15 | 西安科技大学 | Screen image acquisition method based on two-dimensional code |
CN111337011A (en) * | 2019-12-10 | 2020-06-26 | 亿嘉和科技股份有限公司 | Indoor positioning method based on laser and two-dimensional code fusion |
CN111368761A (en) * | 2020-03-09 | 2020-07-03 | 腾讯科技(深圳)有限公司 | Shop business state recognition method and device, readable storage medium and equipment |
CN111652013A (en) * | 2020-05-29 | 2020-09-11 | 天津维创微智能科技有限公司 | Character filtering method, device, equipment and storage medium |
CN112036205A (en) * | 2020-08-03 | 2020-12-04 | 浙江大华技术股份有限公司 | Two-dimensional code identification method, electronic device and storage medium |
CN112052702A (en) * | 2020-08-10 | 2020-12-08 | 北京智通云联科技有限公司 | Method and device for identifying two-dimensional code |
CN112241640A (en) * | 2019-07-18 | 2021-01-19 | 杭州海康威视数字技术股份有限公司 | Graphic code determination method and device and industrial camera |
CN113158975A (en) * | 2021-05-13 | 2021-07-23 | 青岛海尔工业智能研究院有限公司 | Information writing method and device of intelligent equipment, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104933387A (en) * | 2015-06-24 | 2015-09-23 | 上海快仓智能科技有限公司 | Rapid positioning and identifying method based on two-dimensional code decoding |
CN108959998A (en) * | 2018-06-25 | 2018-12-07 | 天津英创汇智汽车技术有限公司 | Two-dimensional code identification method, apparatus and system |
-
2019
- 2019-03-25 CN CN201910227328.XA patent/CN109753838A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104933387A (en) * | 2015-06-24 | 2015-09-23 | 上海快仓智能科技有限公司 | Rapid positioning and identifying method based on two-dimensional code decoding |
CN108959998A (en) * | 2018-06-25 | 2018-12-07 | 天津英创汇智汽车技术有限公司 | Two-dimensional code identification method, apparatus and system |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110307934A (en) * | 2019-06-18 | 2019-10-08 | 合肥安杰特光电科技有限公司 | A kind of non-uniform object mass center real-time detection method based on pattern analysis |
CN112241640A (en) * | 2019-07-18 | 2021-01-19 | 杭州海康威视数字技术股份有限公司 | Graphic code determination method and device and industrial camera |
CN112241640B (en) * | 2019-07-18 | 2023-06-30 | 杭州海康威视数字技术股份有限公司 | Graphic code determining method and device and industrial camera |
CN110490020A (en) * | 2019-07-31 | 2019-11-22 | 珠海市杰理科技股份有限公司 | Bar code recognition, device, computer equipment and storage medium |
CN110490020B (en) * | 2019-07-31 | 2023-01-13 | 珠海市杰理科技股份有限公司 | Bar code identification method and device, computer equipment and storage medium |
CN110879593A (en) * | 2019-11-11 | 2020-03-13 | 江苏理工学院 | Positioning method, reading method, positioning system and positioning device |
CN110969612A (en) * | 2019-12-04 | 2020-04-07 | 常州大学 | Two-dimensional code printing defect detection method |
CN111337011A (en) * | 2019-12-10 | 2020-06-26 | 亿嘉和科技股份有限公司 | Indoor positioning method based on laser and two-dimensional code fusion |
CN111161328A (en) * | 2019-12-31 | 2020-05-15 | 西安科技大学 | Screen image acquisition method based on two-dimensional code |
CN111161328B (en) * | 2019-12-31 | 2023-02-24 | 西安科技大学 | Screen image acquisition method based on two-dimensional code |
CN111368761B (en) * | 2020-03-09 | 2022-12-16 | 腾讯科技(深圳)有限公司 | Shop business state recognition method and device, readable storage medium and equipment |
CN111368761A (en) * | 2020-03-09 | 2020-07-03 | 腾讯科技(深圳)有限公司 | Shop business state recognition method and device, readable storage medium and equipment |
CN111652013A (en) * | 2020-05-29 | 2020-09-11 | 天津维创微智能科技有限公司 | Character filtering method, device, equipment and storage medium |
CN111652013B (en) * | 2020-05-29 | 2023-06-02 | 天津维创微智能科技有限公司 | Text filtering method, text filtering device, text filtering equipment and storage medium |
CN112036205A (en) * | 2020-08-03 | 2020-12-04 | 浙江大华技术股份有限公司 | Two-dimensional code identification method, electronic device and storage medium |
CN112052702A (en) * | 2020-08-10 | 2020-12-08 | 北京智通云联科技有限公司 | Method and device for identifying two-dimensional code |
CN112052702B (en) * | 2020-08-10 | 2023-12-19 | 北京智通云联科技有限公司 | Method and device for identifying two-dimensional code |
CN113158975A (en) * | 2021-05-13 | 2021-07-23 | 青岛海尔工业智能研究院有限公司 | Information writing method and device of intelligent equipment, equipment and storage medium |
CN113158975B (en) * | 2021-05-13 | 2023-09-12 | 卡奥斯工业智能研究院(青岛)有限公司 | Information writing method, device, equipment and storage medium of intelligent equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109753838A (en) | Two-dimensional code identification method, device, computer equipment and storage medium | |
US10885644B2 (en) | Detecting specified image identifiers on objects | |
US11481878B2 (en) | Content-based detection and three dimensional geometric reconstruction of objects in image and video data | |
CN110738602B (en) | Image processing method and device, electronic equipment and readable storage medium | |
WO2019201035A1 (en) | Method and device for identifying object node in image, terminal and computer readable storage medium | |
CN112101195B (en) | Crowd density estimation method, crowd density estimation device, computer equipment and storage medium | |
US11704925B2 (en) | Systems and methods for digitized document image data spillage recovery | |
CN111310758A (en) | Text detection method and device, computer equipment and storage medium | |
CN112163995A (en) | Splicing generation method and device for oversized aerial photographing strip images | |
CN111899270A (en) | Card frame detection method, device and equipment and readable storage medium | |
CN112712014A (en) | Table picture structure analysis method, system, equipment and readable storage medium | |
CN112435223A (en) | Target detection method, device and storage medium | |
CN112699867A (en) | Fixed format target image element information extraction method and system | |
CN112052702A (en) | Method and device for identifying two-dimensional code | |
CN109360205B (en) | Double-recording video quality inspection method, device, medium and electronic equipment | |
EP3436865A1 (en) | Content-based detection and three dimensional geometric reconstruction of objects in image and video data | |
CN111767752B (en) | Two-dimensional code identification method and device | |
CN113221897A (en) | Image correction method, image text recognition method, identity verification method and device | |
CN113947529B (en) | Image enhancement method, model training method, component identification method and related equipment | |
CN115953744A (en) | Vehicle identification tracking method based on deep learning | |
CN114004839A (en) | Image segmentation method and device of panoramic image, computer equipment and storage medium | |
CN112188283B (en) | Method, device and equipment for cutting video and storage medium | |
CN112529943A (en) | Object detection method, object detection device and intelligent equipment | |
CN112149463A (en) | Image processing method and device | |
Shao et al. | Digital Image Aesthetic Composition Optimization Based on Perspective Tilt Correction |
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 |