Disclosure of Invention
In order to solve the problems of the prior art, at least one embodiment of the present invention provides a system and a method for evaluating performance of a code scanning device.
In a first aspect, an embodiment of the present invention proposes a system for evaluating performance of a code scanning device, including:
A bar code generating device for generating a standard bar code image by a bar code generating program according to a predetermined bar code type and predetermined bar code content, wherein the bar code generating device comprises a display module;
the image processing module simulates a corresponding bar code form under an actual use scene through an image processing program based on the standard bar code image and the test item generated by the bar code generating device, so as to obtain a corresponding simulated bar code image;
The test case generation module generates one or more test cases according to the selected bar code types, bar code forms and related parameters of test items, and invokes the image processing program according to the one or more test cases to correspondingly generate one or more case simulation bar code images, wherein each test case corresponds to one or more test items;
The identifying and reading test module is used for enabling the code scanning equipment to be in communication connection with the bar code generating equipment, enabling a scanning head of the code scanning equipment to be opposite to a display module of the bar code generating equipment in a mode of being away from a preset identifying and reading distance, starting the scanning head to scan each case simulation bar code image displayed on the display module, judging whether an identifying and reading result of the code scanning equipment in preset time is consistent with corresponding preset bar code content or not, judging that the code scanning is successful if the identifying and reading result is consistent with the preset bar code content, judging that the code scanning is failed if the identifying and reading result is inconsistent, and recording relevant attributes of the cases and results of the successful code scanning or the failed code scanning aiming at each test case; and
And the evaluation output module is used for carrying out statistical classification processing and outputting a report according to the related record aiming at each test case after completing code scanning of the bar code image simulated by all the test cases.
In some embodiments, the code scanning device and the code generating device can be in communication connection through a USB, serial port, WIFI or bluetooth mode.
In some embodiments, the predetermined reading distance is 10 centimeters.
In some embodiments, the predetermined time is 10 seconds.
In some embodiments, the barcode generating device is a smart phone, tablet computer, or personal computer.
In some embodiments, the barcode generating device further comprises a graphical user interface GUI for displaying on the display module a use case simulation barcode image, the GUI further displaying the following properties of the respective barcode: content length, error correction level, and unit module size.
In some embodiments, the barcode species includes at least one of the following barcodes: code128, code39, code93, UPC-A, UPC-E, EAN, EAN13, industrial 25 Code, databar, PDF417, QR, dataMatrix, AZTEC.
In some embodiments, the test item includes performing the following scan test on the standard barcode image: rotation test, contrast test, perspective distortion test, noise or interference increase test, reading accuracy test and translation process test.
In some embodiments, the image processing program includes a plurality of image processing subroutines corresponding to the test items, each for rotating a standard barcode image at a predetermined angle, adjusting at a predetermined contrast level, perspective distortion at a predetermined distortion coefficient, increasing noise or interference at a predetermined noise level, adjusting at a predetermined radius dot matrix cell module, adjusting at a predetermined size cell module corresponding to reading accuracy, translating at a predetermined speed, and various combinations thereof, to obtain a corresponding simulated barcode image.
In some embodiments, the predetermined angle includes a predetermined pitch angle of 0-60 degrees, a predetermined yaw angle of 0-60 degrees, and a predetermined roll angle of 0-360 degrees, and the test case generation module selects various predetermined pitch angles, predetermined yaw angles, and predetermined roll angles for the standard barcode image to adjust, and correspondingly generates a series of test cases; the preset contrast level is 0-10, and the test case generation module selects various preset contrast levels for adjustment aiming at the standard bar code image, and correspondingly generates a series of test cases; the adjustment range of the preset distortion coefficient is 0-X, and the test case generation module selects various preset distortion coefficients for perspective distortion according to preset step length aiming at a standard bar code image, and correspondingly generates a series of test cases; the predetermined noise level is 0-10, and the test case generation module selects various predetermined noise levels for the standard bar code image to carry out noise adding, and correspondingly generates a series of test cases; the predetermined radius of the dot matrix unit module is in the range of 1-10 pixels, and the test case generation module selects various dot matrix unit modules with predetermined radii for adjustment aiming at the standard bar code image, and correspondingly generates a series of test cases; the preset size of the unit module is in the range of 1-10 mm, and the test case generation module selects various unit modules with preset sizes for adjustment aiming at the standard bar code image, so as to correspondingly generate a series of test cases; the preset speed is within the range of 1-50cm/s, and the test case generation module selects various preset speeds for translation aiming at the standard bar code image, so as to correspondingly generate corresponding test cases; the test case generation module selects any combination of a plurality of the preset angles, preset contrast ratio, preset distortion coefficient, preset noise level, preset radius of the unit modules in the dot matrix, preset size of the unit modules and preset speed for adjustment according to the standard bar code image, and correspondingly generates a series of test cases.
In a second aspect, an embodiment of the present invention further provides a method for evaluating performance of a code scanning device, including the following steps:
(a) Generating a standard bar code image through a bar code generating program according to the type of the preset bar code and the content of the preset bar code;
(b) Simulating a corresponding bar code form under an actual use scene by an image processing program based on the generated standard bar code image and the test item, thereby obtaining a corresponding simulated bar code image;
(c) Generating one or more test cases according to the selected bar code types, bar code forms and related parameters of test items, and calling the image processing program according to the one or more test cases to correspondingly generate one or more case simulation bar code images, wherein each test case corresponds to one or more test items;
(d) Displaying an application simulation bar code image corresponding to each test case and enabling the application simulation bar code image to be opposite to a scanning head of the code scanning device in a mode of being separated by a preset recognition distance, starting the scanning head to scan codes of the application simulation bar code image, judging whether a recognition result of the code scanning device in preset time is consistent with corresponding preset bar code content, judging that the code scanning is successful if the recognition result is consistent with the preset bar code content, judging that the code scanning is failed if the recognition result is inconsistent with the preset bar code content, and recording a relevant attribute of the application and a result of the successful code scanning or the code scanning failure for each test case; and
(E) After the code scanning of the bar code image is completed for all the test cases, carrying out statistical classification processing according to the relevant records aiming at each test case and outputting a report.
In some embodiments, in step (d), the predetermined reading distance is 10 cm, the predetermined time is 10 seconds, and in step (d), the use case simulation bar code image is displayed through a GUI of a graphical user interface, and the GUI further displays the content length, the error correction level, and the unit module size of the corresponding bar code.
In some embodiments, the barcode species includes at least one of the following barcodes: code128, code39, code93, UPC-A, UPC-E, EAN, EAN13, industrial 25 Code, databar, PDF417, QR, dataMatrix, AZTEC.
In some embodiments, the test item in step (b) comprises performing the following scan test on the standard barcode image: rotation test, contrast test, perspective distortion test, noise or interference increase test, reading accuracy test and translation process test.
In some embodiments, the image processing program in step (b) includes a plurality of image processing subroutines corresponding to the test item, each for rotating a standard barcode image at a predetermined angle, adjusting at a predetermined contrast level, perspective distortion at a predetermined distortion coefficient, increasing noise or interference at a predetermined noise level, adjusting at a predetermined radius dot matrix unit module, adjusting at a predetermined size unit module corresponding to reading accuracy, translating at a predetermined speed, and combinations thereof to obtain a corresponding simulated barcode image.
In some embodiments, the predetermined angle includes a predetermined yaw angle of 0-60 degrees, a predetermined pitch angle of 0-60 degrees, and a predetermined roll angle of 0-360 degrees, and in step (c), various predetermined pitch angles, predetermined yaw angles, and predetermined roll angles are selected for the standard barcode image to be adjusted, so as to correspondingly generate a series of test cases; the preset contrast level is 0-10, and in the step (c), various preset contrast levels are selected for adjustment aiming at the standard bar code image, and a series of test cases are correspondingly generated; the adjustment range of the preset distortion coefficient is 0-X, and in the step (c), the preset distortion coefficient is selected for perspective distortion according to a preset step length aiming at a standard bar code image, and a series of test cases are correspondingly generated; the predetermined noise level is 0-10, and in the step (c), various predetermined noise levels are selected for the standard bar code image to be noisy, and a series of test cases are correspondingly generated; the preset radius of the dot matrix unit module is in the range of 1-10 pixels, and in the step (c), the dot matrix unit modules with various preset radii are respectively selected for standard bar code images to be adjusted, so that a series of test cases are correspondingly generated; the preset size of the unit module is in the range of 1-10 mm, and in the step (c), various unit modules with preset sizes are selected for adjustment aiming at the standard bar code image, so that a series of test cases are correspondingly generated; the preset speed is within the range of 1-50cm/s, and in the step (c), various preset speeds are respectively selected for translation aiming at the standard bar code image, so that corresponding test cases are correspondingly generated; in the step (c), any combination of a plurality of the preset angles, preset contrast ratio, preset distortion coefficient, preset noise level, preset radius of dots in the dot matrix, preset size of the unit module and preset speed is selected for adjustment aiming at the standard bar code image, and a series of test cases are correspondingly generated.
Compared with the ideal standard bar code image tested in the prior art, the method can not effectively and comprehensively measure various bar code forms with changes in actual use scenes, and the embodiment of the invention firstly generates the standard bar code image according to the preset bar code types and preset bar code contents by a bar code generation program; then based on the generated standard bar code image and test item, simulating the corresponding bar code form under the actual use scene by an image processing program, thereby obtaining the corresponding simulated bar code image; generating one or more test cases according to the selected bar code types, bar code forms and related parameters of test items, and calling the image processing program according to the one or more test cases to correspondingly generate one or more case simulation bar code images; displaying an application simulation bar code image corresponding to each test case, enabling the application simulation bar code image to be opposite to a scanning head of the code scanning device in a mode of being separated by a preset recognition distance, starting the scanning head to scan codes of the application simulation bar code image, judging whether a recognition result of the code scanning device in preset time is consistent with corresponding preset bar code content, judging that the code scanning is successful if the recognition result is consistent with the preset bar code content, judging that the code scanning is failed if the recognition result is inconsistent with the preset bar code content, and recording a related attribute of the application and a result of the code scanning success or the code scanning failure for each test case; and finally, after the code scanning of the bar code image is completed for all the use cases, carrying out statistical classification processing according to the relevant records aiming at each test case and outputting a report.
The embodiment of the invention can reduce the evaluation cost and improve the evaluation efficiency, the evaluation accuracy and the reliability.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
Fig. 1 is a schematic diagram of a composition structure of a system 1 for evaluating performance of a code scanning device according to an embodiment of the present invention. Referring to fig. 1, the system 1 includes a barcode generating device 10, an image processing module 12, a test case generating module 14, a reading test module 16, and an evaluation output module 18. The system 1 is used for evaluating performance of a code scanning device 2, the code scanning device 2 comprises a scanning head 20 and a decoding module 22, and the scanning head 20 comprises a light source 20A and a photoelectric conversion module 20B. The components of the system 1 are described in detail below.
The barcode generating device 10 includes a graphical user interface GUI 10A and a barcode generating program 10b, the GUI 10A including a display module 10C. The barcode generating device 10 generates a standard barcode image by its barcode generating program 10B according to a predetermined barcode kind and predetermined barcode content. The bar code type or system comprises at least one bar code of the following: code128, code39, code 93, UPC-A, UPC-E, EAN, EAN13, industrial 25 Code (Industrial 25), databar Code, PDF417 Code, QR Code, dataMatrix Code, AZTEC Code, and other industry conventional barcodes. The bar code type can be appropriately increased or decreased according to the requirement. The predetermined barcode content includes a combination of one or more of numbers, letters, and symbols. The barcode generating device 10 may be an intelligent electronic device such as a smart phone, a tablet computer or a personal computer, and the display module 10C is a corresponding display screen. In this embodiment, the barcode generating device 10 is a smart phone.
The GUI 10A may be used to display a case-based barcode image, a standard barcode image, a simulated barcode image, or the like on the display module 10C; the GUI 10A may further display attributes such as content length, error correction level, and unit module size of various corresponding barcodes, and the GUI 10A may further accept control information such as a selected barcode type input by a user.
The image processing module 12 includes an image processing program 120. The image processing module 12 simulates the corresponding barcode form in the actual use situation by the image processing program 120 based on the standard barcode image and the test item generated by the barcode generating device 10, so as to obtain the corresponding simulated barcode image. The test item comprises the following code scanning test on the standard bar code image: rotation testing, contrast testing, perspective distortion testing, noise or interference adding testing, reading accuracy testing, translation process testing, and other common testing for the reading performance of the code scanning device.
The image processing program 120 includes a plurality of image processing subroutines 12A, …, 12N corresponding to a plurality of test items, and the plurality of image processing subroutines 12A, …, 12N are respectively configured to rotate a standard barcode image at a predetermined angle, adjust at a predetermined contrast level, perspective distortion at a predetermined distortion coefficient, increase noise or interference at a predetermined noise level, adjust at a predetermined radius dot matrix unit module, adjust at a predetermined size unit module corresponding to recognition accuracy, translate at a predetermined speed, and a combination thereof to obtain a corresponding simulated barcode image.
It should be noted that, in the embodiment of the present invention, the analog barcode image includes a still image and a moving image, and one of the plurality of image processing subroutines 12A, …, 12N translates the standard barcode image at a predetermined speed to obtain the analog barcode image as a moving image, such as an animation or a video, which records the whole process of translating the standard barcode image into and out of the display module 10C at the predetermined speed; and the other image processing subprograms which do not relate to the translation of the standard bar code image are used for processing the standard bar code image, so that the obtained analog bar code image is a static image or a picture.
The predetermined angles include a predetermined PITCH angle (PITCH, i.e., an angle of rotation about the X-axis) of 0-60 degrees, a predetermined YAW angle (YAW, i.e., an angle of rotation about the Y-axis) of 0-60 degrees, and a predetermined ROLL angle (ROLL, i.e., an angle of rotation about the Z-axis) of 0-360 degrees. The predetermined contrast level is 0-10, the predetermined distortion coefficient is adjusted to 0-X, the predetermined noise level is 0-10, the predetermined radius of the dot matrix unit module is 1-10 pixels, the predetermined size of the unit module is 1-10 millimeters, the predetermined speed is 1-50cm/s, more specifically, 20cm/s, 30cm/s, and the like.
The test case generation module 14 generates one or more test cases according to the selected bar code types, bar code forms and related parameters of test items, and invokes the image processing program 120 according to the one or more test cases to correspondingly generate one or more case simulation bar code images, wherein each test case corresponds to one or more test items. In this embodiment, the selected bar Code type may be Code128, code39 or QR Code.
The test case generation module 14 selects various predetermined pitch angles of 0-60 degrees, predetermined yaw angles of 0-60 degrees and predetermined roll angles of 0-360 degrees for adjustment according to the standard bar code image, and correspondingly generates a series of test cases. The test case generation module 14 may also increase the predetermined pitch angle of 0-60, the predetermined yaw angle of 0-60 degrees, and the predetermined roll angle of 0-360 degrees by 5 degrees for each time of the standard barcode image, and correspondingly generate a series of test cases.
The test case generation module 14 may also select various predetermined contrast levels from the 0-10 level contrasts for the standard barcode image to adjust, and correspondingly generate a series of test cases. The test case generation module 14 may also select various predetermined distortion coefficients from 0-X with a predetermined step s for the standard barcode image to perform perspective distortion, and correspondingly generate a series of test cases. The test case generation module 14 may also select various predetermined noise levels from 0-10 levels for the standard barcode image to perform noise superposition, and correspondingly generate a series of test cases.
The test case generation module 14 may also select a predetermined radius of each dot matrix unit module for adjustment within a range of 1-10 pixels for the standard barcode image, so as to correspondingly generate a series of test cases. The test case generation module 14 may also select various predetermined speeds for translation within a range of 1-50cm/s for the standard barcode image, and correspondingly generate a corresponding test case. The test case generation module 14 may also select any combination of the predetermined angle, the predetermined contrast, the predetermined distortion coefficient, the predetermined noise level, the predetermined radius of the unit module in the dot matrix, the predetermined size of the unit module, and the predetermined speed for the standard barcode image, so as to correspondingly generate a series of test cases.
When the selected bar code type is a QR code, the test item further includes a two-dimensional code error correction capability test, the predetermined error correction level of the standard bar code image may be, for example, 15%, the setting of the bar code image to the corresponding bar code level is achieved by performing the offset in the corresponding error correction range on the bar code data area (the bar code module except for the locator and the functional graphic), and an effective method of the offset is to directly invert the corresponding module color, i.e., the black module is changed into the white module, and the white module is changed into the black module. The image processing program 120 includes an image processing subroutine (e.g. 12E) corresponding to the two-dimensional code error correction capability test, where the image processing subroutine 12E is configured to perform error correction processing on the standard barcode image at a predetermined error correction level (e.g. a corresponding error correction range of dirty), and the test case generating module 14 selects various predetermined error correction levels for the standard barcode image to perform corresponding dirty, so as to obtain a series of test cases, where the predetermined error correction levels may further include 7% and 25%, for example.
With continued reference to fig. 1 and with reference to fig. 2, the reading test module 16 connects the code scanning device 2 with the barcode generating device 1 in a communication manner, and makes the scanning head 20 of the code scanning device 2 face the display module 10C of the barcode generating device 10 in a manner of a predetermined reading distance, and displays an application analog barcode image corresponding to each test application on the display module 10C in a GUI 10A manner. In this embodiment, the predetermined reading distance may be 10 cm, and other common code scanning distances.
Fig. 2 shows a test state in which the barcode scanning device 2 is facing the barcode generating device 10. As shown in fig. 2, the code scanning device 2 and the bar code generating device 10 may be disposed together on a test platform 30, the bar code generating device 10 is disposed on a stand 32 with adjustable height and capable of fixing the same, the code scanning device 2 may also be selectively disposed on a similar stand, and the code scanning device 2 may scan static images as well as dynamic images such as videos or animations. The distance between the code scanning device 2 and the bar code generating device 10 can be 10 cm and other common code scanning distances. The code scanning of the scanning head 20 is started, which may specifically include that the light source 20A of the scanning head 20 irradiates the use case analog barcode image, then the photoelectric conversion module 20B, which may be a CCD, receives the light reflected from the image and converts the light signal into an electrical signal, and the decoding module 22 of the code scanning device 2 processes the electrical signal to obtain a reading result. The code scanning and reading principle and process of the code scanning device 2 are generally known to those skilled in the art, and will not be further described herein.
The recognition test module 16 determines whether the recognition result of the code scanning device 2 is consistent with the corresponding predetermined barcode content, if so, determines that the code scanning is successful, if not, determines that the code scanning is failed, and records the relevant attribute of the use case or the attribute of the use case simulation barcode image and the result of the code scanning success or the code scanning failure for each test case, wherein the attribute of the use case simulation barcode image is for example the module size and/or the rotation angle, etc. The predetermined time T is 5 seconds, 10 seconds, 20 seconds or other code scanning time commonly used in the industry.
According to the data transmission protocol supported by the code scanning device 2, the code scanning device and the bar code generating device 10 can be in communication connection through a USB, serial port, WIFI, bluetooth and other communication modes commonly used in the industry.
After the scanning of the bar code image is completed by the evaluation output module 18, statistical classification processing is performed and a report is output according to the relevant record result of each test case by the recognition test module 16. The evaluation output module 18 includes an evaluation unit 18A and an output unit 18B, where the evaluation unit 18A is configured to evaluate, analyze and process the relevant record result to form an evaluation report, the output unit 18B is configured to output the evaluation report, and the output unit 18B may output the evaluation report to the display module 10C or a printer, for example. The evaluation unit 18A may, for example, perform statistics on various test item parameters that are scanned successfully to form an evaluation report; the special evaluation report can be formed according to the identification capability of bar code type, identification precision, identification angle, identification distortion, identification noise, identification speed and the like; for example, in the evaluation report for the reading speed, it can record at which preset speeds the translation bar code can be scanned successfully, and at which preset speeds the translation bar code can be scanned successfully, so that the scanning speed or the reading speed which can be scanned successfully can be screened out.
In order to further illustrate the principle and efficacy of the present invention, the following description will take the selected barcode type as Code128 and the test item as contrast test as an example, the test case generation module 14 generates a plurality of test cases with the contrast levels of 0, 1,2,3, … and 10 according to the selected barcode type, barcode shape and the related parameters of the test item, and invokes the image processing program according to the plurality of test cases to correspondingly generate a plurality of case simulation barcode images, wherein the plurality of case simulation barcode images with the contrast levels of 0, 1,2,3, … and 10 are shown in fig. 3. The case simulation bar code images shown in fig. 3 are sequentially displayed on a display module 10C shown in fig. 1 in a GUI 10A form, the scanning head 20 of the code scanning device 2 is opposite to the GUI 10A, and scans the case simulation bar code images on the scanning head, the scanning device 2 reads the simulation bar code images with the level 0, the level 1 and the level 2 contrast as non-ABC 123, the simulation bar code images with the level 3 to the level 10 contrast as ABC123, and the recognition test module 16 can judge that the scanning of the scanning with the level 0, the level 1 and the level 2 contrast fails and the scanning with the level 3 to the level 10 contrast succeeds. After scanning the bar code image simulated by all the cases shown in fig. 3, the evaluation output module 18 performs statistical classification according to the relevant record result of each test case by the recognition test module 16, and outputs a report of successful code reading for the contrast between 0 level and 2 level and failure code reading for the contrast between 3 level and 10 level.
Fig. 4 shows an application simulation barcode image corresponding to an integrated test case embodiment, which is a combination of contrast test and rotation test, specifically, a 4-level contrast is selected for a standard barcode image of "ABC123" under Code128, and then rotated by the following predetermined angle: a predetermined pitch angle of 0 degrees, a yaw angle of 0 degrees and a predetermined roll angle of 30 degrees, the application simulation bar code image corresponding to the comprehensive test case is shown in fig. 4. The result of the code scanning device 2 for the case simulation barcode image of fig. 4 is ABC123, and the recognition test module 16 can determine that the code scanning for the case simulation barcode image of fig. 4 is successful.
Referring to fig. 5, referring to fig. 1 and fig. 2 in combination, fig. 5 shows a flowchart of a method for evaluating performance of a code scanning device according to an embodiment of the present invention.
As shown in fig. 5, the test method 50 first proceeds to step S500, and generates a standard barcode image according to a predetermined barcode type and a predetermined barcode content by a barcode generation program. The bar code species include at least one bar code of the following: code128, code39, code93, UPC-A, UPC-E, EAN8, EAN13, industry 25, databar, PDF417, QR, dataMatrix, AZTEC, and the like. The bar code type can be appropriately increased or decreased according to the requirement. The predetermined barcode content includes a combination of one or more of numbers, letters, and symbols.
The test method 50 proceeds to step S510, and based on the generated standard barcode image and test item, the corresponding barcode form in the actual use scenario is simulated by the image processing program, so as to obtain the corresponding simulated barcode image; wherein the test item comprises performing the following scan test on the standard barcode image: rotation test, contrast test, perspective distortion test, noise or interference increase test, reading accuracy test, translation process test and other common tests for reading performance of code scanning equipment.
The image processing program in step S510 includes a plurality of image processing subroutines corresponding to the test item, each of the plurality of image processing subroutines being configured to rotate a standard barcode image by a predetermined angle, adjust by a predetermined contrast level, perspective distortion by a predetermined distortion coefficient, increase noise or interference by a predetermined noise level, adjust by a dot matrix unit module of a predetermined radius, adjust by a unit module of a predetermined size corresponding to a recognition accuracy, translate at a predetermined speed, and combinations thereof to obtain a corresponding simulated barcode image; wherein the predetermined angle includes a predetermined pitch angle of 0-60 degrees, a predetermined yaw angle of 0-60 degrees, and a predetermined roll angle of 0-360 degrees, the predetermined contrast level is 0-10 levels, the adjustment range of the predetermined distortion coefficient is 0-X, the predetermined noise level is 0-10 levels, the predetermined radius of the dot matrix unit module is in the range of 1-10 pixels, the predetermined size of the unit module is in the range of 1-10 millimeters, and the predetermined speed is in the range of 1-50 cm/s.
The testing method 50 proceeds to step S520, and generates one or more test cases according to the selected barcode type, barcode shape and related parameters of the test items, where each test case corresponds to one or more test items. In this embodiment, the selected bar Code type may be Code128, code39 or QR Code.
The test method 50 proceeds to step S530, where the image processing program is invoked according to the one or more test cases to correspondingly generate a plurality of case simulation barcode images. Step S530 may call the image processing subroutine according to the test items corresponding to the one or more test cases to generate one or more case simulation barcode images.
Step S520 can select various predetermined pitch angles of 0-60 degrees, predetermined yaw angles of 0-60 degrees and predetermined rolling angles of 0-360 degrees for adjustment according to the standard bar code image, a series of test cases are correspondingly generated, and step S530 correspondingly generates a series of case simulation bar code images; step S520 may be performed to increase the predetermined pitch angle of 0-60, the predetermined yaw angle of 0-60, and the predetermined roll angle of 0-360 by 5 degrees for each time of the standard barcode image, so as to correspondingly generate a series of test cases, and step S530 correspondingly generates a series of case simulation barcode images.
In step S520, various preset contrast levels in 0-10 levels can be selected for adjustment according to the standard barcode image, a series of test cases can be correspondingly generated, and step S530 can correspondingly generate a series of case simulation barcode images; in step S520, a predetermined distortion coefficient within the range of 0-X may be selected for perspective distortion with respect to the standard barcode image in a predetermined step, and a series of test cases may be correspondingly generated, and step S530 may correspondingly generate a series of case simulation barcode images.
In step S520, various predetermined noise levels within 0-10 levels can be selected for adjustment for the standard barcode image, a series of test cases can be correspondingly generated, and step S530 can correspondingly generate a series of case simulation barcode images; in step S520, dot matrix unit modules with various predetermined radii within the range of 1-10 pixels can be selected for adjustment respectively for standard barcode images, so as to correspondingly generate a series of test cases, and step S530 can correspondingly generate a series of case simulation barcode images.
In step S520, unit modules with various predetermined sizes within the range of 1-10 mm can be selected for adjustment according to the standard barcode image, a series of test cases can be correspondingly generated, and step S530 can correspondingly generate a series of case simulation barcode images; in step S520, various predetermined speeds within the range of 1-50cm/S can be selected for translation for the standard barcode image, corresponding test cases can be generated correspondingly, and step S530 can generate corresponding case simulation barcode images correspondingly.
In step S520, any combination of a plurality of the predetermined angle, the predetermined contrast, the predetermined distortion coefficient, the predetermined noise level, the predetermined radius of the dots in the dot matrix, the predetermined size of the unit module, and the predetermined speed may be selected for the standard barcode image to be adjusted, so as to correspondingly generate a series of test cases, and step S530 may correspondingly generate a series of case simulation barcode images.
The test method 50 continues to step S540, in which the application simulation barcode image corresponding to each test case is displayed and is made to face the scanning head of the barcode scanning device in a manner of being separated by a predetermined reading distance. In step S540 of this embodiment, the predetermined reading distance may be 10cm, and other common code scanning distances, step S540 may display a use case analog barcode image through the GUI 10A, the GUI 10A may be presented on the display module 10C of the barcode generating apparatus 10 shown in fig. 1, the GUI 10A may further display attributes such as the content length, the error correction level, and the unit module size of the corresponding barcode, and the GUI 10A may further accept control information such as the selected barcode type input by the user.
The test method 50 continues to step S550, and starts the scanning head to scan the barcode image of the use case, and the barcode scanning device obtains the reading result. The principle and steps of the code scanning device for scanning the code and obtaining the reading result are common knowledge generally known to those skilled in the art, and are not described herein.
The test method 50 proceeds to step S560, where it is determined whether the reading result of the code scanning device in the predetermined time is consistent with the corresponding predetermined barcode content, if yes (i.e. consistent), it is determined that the code scanning is successful, and if not (i.e. inconsistent), it is determined that the code scanning is failed, and if not, it is determined that the code scanning is successful, and if not, it is determined that the code scanning is failed, and if not, it is determined that the code scanning is successful (step S580); the predetermined time may be 5 seconds, 10 seconds, 20 seconds, or other code scanning time commonly used in the industry.
The test method 50 continues with step S590, and after the scanning of the barcode image is completed for all the cases, statistical classification processing is performed according to the relevant records for each test case, and a report is output. In step S590, for example, statistics may be performed on various test item parameters that are successful in scanning the code, and a test item parameter statistics report that is successful in scanning the code is output; the special report can be formed according to the identification capability of bar code type, identification accuracy, identification angle, identification distortion, identification noise, identification speed and the like.
According to the embodiment of the invention, firstly, a standard bar code image is generated through a bar code generation program according to the type of the preset bar code and the content of the preset bar code; then based on the generated standard bar code image and test item, simulating the corresponding bar code form under the actual use scene by an image processing program, thereby obtaining the corresponding simulated bar code image; generating a plurality of test cases according to the selected bar code types, bar code forms and related parameters of test items, and calling the image processing program according to the plurality of test cases to correspondingly generate a plurality of case simulation bar code images; displaying an application simulation bar code image corresponding to each test case, enabling the application simulation bar code image to be opposite to a scanning head of the code scanning device in a mode of being separated by a preset recognition distance, starting the scanning head to scan codes of the application simulation bar code image, judging whether a recognition result of the code scanning device in preset time is consistent with corresponding preset bar code content, judging that the code scanning is successful if the recognition result is consistent with the preset bar code content, judging that the code scanning is failed if the recognition result is inconsistent with the preset bar code content, and recording a related attribute of the application and a result of the code scanning success or the code scanning failure for each test case; and finally, after the code scanning of the bar code image is completed for all the use cases, carrying out statistical classification processing according to the relevant records aiming at each test case and outputting a report.
The embodiment of the invention can reduce the evaluation cost and improve the evaluation efficiency, the evaluation accuracy and the reliability.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital signal processing devices (DSPDEVICE, DSPD), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units designed to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the embodiments provided in the present application, it should be understood that the order of execution may be arbitrarily adjusted, unless there is an explicit order of precedence between the steps of the method embodiments. The disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in essence or a part contributing to the prior art or a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.