A kind of Quick Response Code decoding algorithm contrast verification method
Technical field
The present invention relates to Quick Response Code decoding algorithm field, it is related specifically to a kind of based on Quick Response Code algorithm contrast verification system
Verification method.
Background technology
For Quick Response Code decoding algorithm newly developed, to verify the decoding capability of the Quick Response Code decoding algorithm, and and other
The decoding capability contrast of Quick Response Code decoding algorithm.First developed the existing barcode scanning of Quick Response Code decoding algorithm decoding capability and market
Rifle decoding capability be it is strong, it is secondary or identical.
Existing contrast verification is generally carried out after each self-demarking code using manual type using two decoding algorithms, and decoding is tied
Fruit is contrasted.It is present because decoding condition and the inconsistent caused comparing result accuracy rate of environment are low, and method complexity is cumbersome
Technical problem.Therefore it provides a kind of comparing result accuracy rate is high, the high Quick Response Code decoding algorithm contrast verification of automaticity
System is just necessary.
The content of the invention
The technical problems to be solved by the invention are that comparing result accuracy rate present in prior art is low, and complex operation is numerous
Trivial technical problem.A kind of new Quick Response Code decoding algorithm contrast verification system is provided, the system has automaticity high, right
The characteristics of higher than result accuracy rate.
In order to solve the above technical problems, the technical scheme used is as follows:
A kind of Quick Response Code algorithm contrast verification system, the system includes barcode scanning gun, the switch being connected with the barcode scanning gun
Circuit switch device, arm processor and host computer, the on-off circuit switching device also with MIPI decoding apparatus and fpga chip
Connection;The arm processor is also connected with MIPI decoding apparatus, host computer and fpga chip;The MIPI decoding apparatus also with
The fpga chip is connected;The fpga chip is used to control the on-off circuit to walk around connection device, and fpga chip includes FLASH
Module;The barcode scanning gun includes cmos sensor, and the cmos sensor passes through the on-off circuit switching device and barcode scanning gun
Central processing unit is connected;The barcode scanning gun button being connected with barcode scanning gun central processing unit;The barcode scanning gun button also with the ARM
Manage device connection;The barcode scanning gun central processing unit is also connected with the host computer;The on-off circuit switching device includes two choosings
One switch, the connection for control selections cmos sensor and MIPI decoding apparatus and barcode scanning gun central processing unit;The MIPI
Decoding apparatus is changed for bi-directional data, and the bi-directional data is converted to parallel port-MIPI and MIPI- parallel ports;The host computer is used
In comparison chart is as quality comparison calculation and controls the arm processor and barcode scanning gun central processing unit.
In such scheme, for optimization, further, the cmos sensor passes through on-off circuit switching device to barcode scanning gun
The line length of central processing unit is equal to and the circuit by on-off circuit switching device and MIPI decoding apparatus to arm processor
Length.
Further, the either-or switch includes first switch unit, second switch unit and the 3rd switch element;Institute
It is connected after stating second switch unit and the parallel connection of the 3rd switch element with first switch unit;The first switch, second switch list
Member is used to control the cmos sensor with MIPI decoding apparatus to be connected;3rd switch element is used to control cmos sensor
It is connected with the barcode scanning gun central processing unit.
Further, the Quick Response Code algorithm contrast verification system also includes three axle motors being connected with host computer, with three
The support of axle motor connection, the support is used for accelerated scan rifle, the LCD1 being connected with the FLASH;The LCD1 is used to show
Show storage and the two-dimension code image in FLASH;The three axles motor is used to adjust the relative of scanner cmos sensor and LCD1
Position, including X-axis motor, Y-axis motor and Z axis motor;The Z axis motor is used to adjust horizontal stand from shooting grease head highness;The X
Axle motor is used to adjust deflection angle of the Z axis horizontal stand in X-axis;The Y-axis motor is used to adjust Y-axis horizontal stand in Y-axis
Deflection angle.
The present invention also provides a kind of application method based on Quick Response Code algorithm contrast verification system, and methods described includes:
(1) using period parameters before oscillograph detection, the preceding period parameters include the scanner and receive picture size, CMOS
Sensor output signal form, the cmos sensor output signal form is MIPI or parallel port;
(2) hardware circuit is connected, Quick Response Code algorithm contrast verification system is constituted;
(3) it is directed at cmos sensor collection two-dimension code image in outside two-dimension code image, the scanner using scanner
Data, scanner central processing unit and arm processor distinguish decoding process gathered data, and the cmos sensor output data is
MIPI, then the MIPI conversion equipments progress MIPI- parallel port conversions;
(4) consequential signal decoded is printed into host computer, picture quality comparison is carried out to print result, according to image
Quality versus draws contrast verification result.
In such scheme, for optimization, further, the step (3) also includes:
(A) storage two-dimension code image is used as internal two-dimension code image in FLASH in advance;
(B) press barcode scanning gun button and transfer the inside two-dimension code image deposited in FLASH manually and be shown on LCD1, hand
Control two-dimension code image in scanner alignment LCD1, cmos sensor collection two-dimension code image data;
(C) scanner central processing unit and arm processor difference decoding process gathered data, barcode scanning gun center processing
It is MIPI that device, which receives data, then the MIPI conversion equipments carry out parallel port-MIPI conversions.
Further, the step (B) also includes:
(a) PC control automatic mode starts, and a two-dimension code image is sequentially transferred from FLASH as internal two dimension
Code pictorial information is shown on LCD1;
(b) three axle motors are set, the scanner cmos sensor are controlled with LCD1 position and apart from corresponding;
(c) cmos sensor collection two-dimension code image data in the arm processor control scanner.
Further, three axle motors of the setting include:Z axis motor is set, and adjustment horizontal stand is from shooting grease head highness;Set
X-axis motor horizontal stand is contrasted, gravity accelerates in X-axis upper deflecting angle using acceleration of gravity detection angles and with given threshold
Spend detection angles and then enter next step not less than given threshold XS, the acceleration of gravity detection angles are not less than given threshold
XS then repeats this step;Y-axis motor horizontal stand is set in Y-axis upper deflecting angle, using acceleration of gravity detection angles and with setting
Determine threshold comparison, acceleration of gravity detection angles then enter next step, the acceleration of gravity inspection not less than given threshold YS
Measuring angle then repeats this step not less than given threshold YS.
Further, the scanner receives picture size detection including the use of two signals of oscilloscope measurement HS and VS,
Calculate scanner and receive picture size.
Further, the detection cmos sensor output signal form includes, and is passed using oscilloscope measurement measurement CMOS
Sensor output signal, output signal is that D0~D7/HS/VS/PLCK signals are then parallel port output signal;Output signal is CLK_N/
CLKP, D0_N/D0_P differential pair form are then MIPI signals.
The present invention is by using can be by on-off circuit pinboard, and the cmos sensor output signal carried to barcode scanning gun is entered
Row monitoring, the signal of cmos sensor output has not only been connected in barcode scanning gun on central processing unit, while being also coupled to arm processor
On, arm processor deposits Quick Response Code decoding algorithm to be contrasted.After barcode scanning gun is directed at Quick Response Code, by the button in barcode scanning gun,
The system that scanner is carried can start gathered data and be decoded, and be carried out while the hardware system of oneself also gathers current data
Decoding.
In order to improve comparing result precision, the line length of two-way can be controlled appropriate and equal, it is possible to increase environment and data
Homogeneity.
Beneficial effects of the present invention:
Effect one, improves the comparing result degree of accuracy;
Effect two, improves test automation degree, improves convenient degree;
Effect three, due to improving automatic test degree, therefore reduces human cost.
Brief description of the drawings
The present invention is further described with reference to the accompanying drawings and examples.
Fig. 1, Quick Response Code decoding algorithm contrast verification system schematic.
Fig. 2, the data flow schematic diagram of contrast verification experiment is carried out according to outside two-dimension code image.
Fig. 3, the schematic flow sheet of contrast verification experiment is carried out according to outside two-dimension code image.
Fig. 4, the data flow schematic diagram of contrast verification experiment is carried out according to the two-dimension code image deposited in advance.
Fig. 5, the schematic flow sheet for according to the two-dimension code image deposited in advance transfer manually in contrast verification experiment.
Fig. 6, the schematic flow sheet for according to the two-dimension code image deposited in advance transfer automatically in contrast verification experiment.
In accompanying drawing, 1- first switch units, 2- second switch units, the switch elements of 3- the 3rd.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to embodiments, to the present invention
It is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not used to
Limit the present invention.
Embodiment 1.
The present embodiment provides a kind of Quick Response Code algorithm contrast verification system and its application method.The Quick Response Code algorithm contrast
Checking system is as shown in figure 1, including barcode scanning gun, the on-off circuit switching device being connected with the barcode scanning gun, arm processor and on
Position machine, the on-off circuit switching device is also connected with MIPI decoding apparatus and fpga chip;The arm processor also with MIPI
Decoding apparatus, host computer and fpga chip connection;The MIPI decoding apparatus is also connected with the fpga chip;The FPGA cores
Piece is used to control the on-off circuit to walk around connection device, and fpga chip includes FLASH modules;The barcode scanning gun is sensed including CMOS
Device, the cmos sensor is connected by the on-off circuit switching device with barcode scanning gun central processing unit;With barcode scanning gun center
The barcode scanning gun button of processor connection;The barcode scanning gun button is also connected with the arm processor;Barcode scanning gun center processing
Device is also connected with the host computer;The on-off circuit switching device includes either-or switch, for control selections CMOS sensings
The connection of device and MIPI decoding apparatus and barcode scanning gun central processing unit;The MIPI decoding apparatus is changed for bi-directional data, institute
State bi-directional data and be converted to parallel port-MIPI and MIPI- parallel ports;The host computer is used for comparison chart as quality comparison calculation and control
The arm processor and barcode scanning gun central processing unit.Host computer can use PC.Ensure that under identical environment, same frame
Image, two systems carry out decoding contrast verification simultaneously
Preferably, cmos sensor passes through on-off circuit switching device to the line length of barcode scanning gun central processing unit etc.
In with the line length by on-off circuit switching device and MIPI decoding apparatus to arm processor.Environment and two can be improved
The accuracy and homogeneity of code decoding data are tieed up, reduces the error of contrast verification result.Improve environment and image in 2 D code
Uniformity.
Preferably, either-or switch can use first switch unit, second switch unit and the 3rd switch element;It is described
It is connected after second switch unit and the 3rd switch element are in parallel with first switch unit;The first switch, second switch unit
For controlling the cmos sensor to be connected with MIPI decoding apparatus;3rd switch element be used for control cmos sensor with
The barcode scanning gun central processing unit is connected.Switching function can be realized in more detail by 3 switch elements.
Preferably, Quick Response Code algorithm contrast verification system also includes the LCD1 being connected with the FLASH, for according to interior
Portion is stored in the test of two-dimension code image in FLASH, three axle motors being connected with host computer, is internally stored in for basis
The automatic test of two-dimension code image in FLASH, the support being connected with three axle motors, the support is used for accelerated scan rifle;LCD1
For showing storage and the two-dimension code image in FLASH;The three axles motor is used to adjust scanner cmos sensor and LCD1
Relative position, including X-axis motor, Y-axis motor and Z axis motor;The Z axis motor is used to adjust horizontal stand from shooting head height
Degree;The X-axis motor is used to adjust deflection angle of the Z axis horizontal stand in X-axis;The Y-axis motor is used to adjust Y-axis horizontal stand
Deflection angle in Y-axis.Cumbersome degree, reduction human cost are tested in the automaticity of energy Gu Tigao tests, further reduction.
Such as Fig. 2 and Fig. 3, Fig. 2 are signal flow graph, and Fig. 3 is flow chart.
The present embodiment also provides a kind of application method based on foregoing Quick Response Code algorithm contrast verification system, including:
(1) using period parameters before oscillograph detection, the preceding period parameters include the scanner and receive picture size, CMOS
Sensor output signal form, the cmos sensor output signal form is MIPI or parallel port;Specially:Scanner receives figure
As size detection is including the use of two signals of oscilloscope measurement HS and VS, calculates scanner and receive picture size;CMOS is sensed
Device output signal format detection measures cmos sensor output signal including the use of oscilloscope measurement, and output signal is D0~D7/
HS/VS/PLCK signals are then parallel port output signal;Output signal is that CLK_N/CLKP, D0_N/D0_P differential pair form are then
MIPI signals;
(2) hardware circuit is connected, Quick Response Code algorithm contrast verification system is constituted;
(3) it is directed at cmos sensor collection two-dimension code image in outside two-dimension code image, the scanner using scanner
Data, scanner central processing unit and arm processor distinguish decoding process gathered data, and the cmos sensor output data is
MIPI, then the MIPI conversion equipments progress MIPI- parallel port conversions;
(4) consequential signal decoded is printed into host computer, picture quality comparison is carried out to print result, according to image
Quality versus draws contrast verification result.
The step (3) is also included according to the test for being internally stored in two-dimension code image in FLASH:
(A) storage two-dimension code image is used as internal two-dimension code image in FLASH in advance;
(B) it is to press barcode scanning gun button to transfer the inside two-dimension code image deposited in FLASH manually to transfer mode manually
It is shown on LCD1, two-dimension code image, cmos sensor collection two-dimension code image data in hand control scanner alignment LCD1;
(C) scanner central processing unit and arm processor difference decoding process gathered data, barcode scanning gun center processing
It is MIPI that device, which receives data, then the MIPI conversion equipments carry out parallel port-MIPI conversions.
Step (B) also includes transferring mode automatically, including:
(a) PC control automatic mode starts, and a two-dimension code image is sequentially transferred from FLASH as internal two dimension
Code pictorial information is shown on LCD1;
(b) three axle motors are set, the scanner cmos sensor are controlled with LCD1 position and apart from corresponding;
(c) cmos sensor collection two-dimension code image data in the arm processor control scanner.
The automatic method for transferring setting cmos sensor and LCD1 relative positions in mode is specially to set Z axis motor, is adjusted
Whole horizontal stand is from shooting grease head highness;Set X-axis motor horizontal stand in X-axis upper deflecting angle, use acceleration of gravity detection angles
And contrasted with given threshold, acceleration of gravity detection angles then enter next step not less than given threshold XS, and the gravity adds
Velocity measuring angle then repeats this step not less than given threshold XS;Set Y-axis motor horizontal stand in Y-axis upper deflecting angle, make
Contrasted with acceleration of gravity detection angles and with given threshold, acceleration of gravity detection angles then enter not less than given threshold YS
Next step, the acceleration of gravity detection angles then repeat this step not less than given threshold YS.
Although illustrative embodiment of the invention is described above, in order to the technology of the art
Personnel are it will be appreciated that the present invention, but the present invention is not limited only to the scope of embodiment, to the common skill of the art
For art personnel, as long as long as various change is in the spirit and scope of the invention that appended claim is limited and is determined, one
The innovation and creation using present inventive concept are cut in the row of protection.