Auxiliary reading method and system
By using the image processing unit to select the barcode area and adjust the camera angle, three error code states can be set, which solves the problem of manual position adjustment of the barcode reading device and realizes automatic adjustment and efficient recognition.
Patent Information
- Application Number
- CN202311793353.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2043-12-25
AI Technical Summary
Existing barcode reading equipment requires manual adjustment of the scanning position, and multiple adjustments are required to align the barcode, resulting in cumbersome operation and low efficiency.
By setting the image processing unit to select the barcode area, adjusting the camera angle and position, setting three error code states, using indicator lights to remind users of problems, simplifying the image processing logic, and automatically adjusting the shooting area.
It improves the efficiency of code scanning, simplifies the image processing process, and improves the accuracy and efficiency of barcode recognition.
Smart Images

Figure CN117875344B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of barcode auxiliary recognition methods, and in particular to an auxiliary reading method and system. Background Art
[0002] With the significant increase in product output in the international mid- and high-end industrial manufacturing sectors in recent years, production efficiency and costs have become increasingly important to manufacturers, who are constantly pursuing higher efficiency and lower costs. This is evident in the aircraft, automobile, mobile phone, computer, and home appliance manufacturing sectors, among others. Regarding production costs, manufacturers hope to control costs by reducing waste in key product components. Regarding production efficiency, manufacturers hope to quickly record key components during the production process to facilitate subsequent problem tracing and analysis. These demands have driven the deeper development of barcode technology applications in mid- and high-end industrial manufacturing. When using traditional commercial barcode reading devices, the user presses the reading button, and the barcode reading device's aimer, fill light, and camera are activated. However, each time the user uses it, the user needs to align the barcode reading device with the barcode to ensure the recognition effect. However, existing barcode reading devices can only be manually adjusted by the user to the scanning position. Each time the position is adjusted, the user only roughly confirms the barcode position by sight, and then moves the barcode reading device to the position aligned with the barcode area. Although this method can achieve the purpose of aligning the barcode area, it often cannot be aligned after one adjustment, and multiple adjustments are required to align it, which is more troublesome. Summary of the Invention
[0003] The purpose of the present invention is to provide an auxiliary reading method and system to solve the problems raised in the above background technology.
[0004] In order to solve the above technical problems, the present invention provides the following technical solutions: an auxiliary reading method, comprising the following steps:
[0005] S1. Call the background control system to enter the error code set in the database;
[0006] S2. Press the switch to power on and the sight will enter the working state;
[0007] S3, the camera takes a picture of the barcode;
[0008] S4, calling the image selection unit and the barcode recognition unit to recognize the image obtained in S3;
[0009] S5. If the image is not recognized by the image selection unit and the barcode recognition unit in step S4, the feedback unit sends an error code call request to the main control unit;
[0010] S6. The main control unit calls the error code unit to send identification error information through the indicator light;
[0011] S7. If the image in step S4 is recognized by the image selection unit, the camera control unit is called to adjust the angle and position of the camera;
[0012] S8, the adjusted camera takes a second photo of the camera area, and the above steps S4, S5, and S6 are repeated for the photo taken;
[0013] S9, after the barcode recognition unit recognizes the captured image, it stops capturing the capture area;
[0014] S10, the parsing unit parses the identified barcode;
[0015] S11. If the analysis fails, the feedback unit sends an error code call request to the main control unit;
[0016] S12, the main control unit calls the error code unit to send a barcode information error message through the indicator light;
[0017] S13, after successful parsing, the parsing unit uploads the parsed information and caches the parsed information, and the feedback unit sends an error code call request to the main control unit;
[0018] S14. The main control unit calls the error code unit to send a barcode recognition completion message through the indicator light.
[0019] According to the above technical solution, the error code set in step S1 includes error code one, error code two, and error code three. Error code one indicates an unrecognized error, and the corresponding indicator light is a yellow light. Error code two indicates an unresolved error, and the corresponding indicator light is a red light. Error code three indicates successful recognition, and the corresponding indicator light is a green light.
[0020] According to the above technical solution, the image selection unit in step S4 selects the captured image and identifies the area where the barcode appears. The selection frame is a rectangular frame, and the length of the rectangular frame is twice the width.
[0021] According to the above technical solution, the sixteen small areas within the rectangular frame are sequentially numbered 1A, 2A, 3A, 4A, 1B, 2B, 3B, 4B, 1C, 2C, 3C, 4C, 1D, 2D, 3D, and 4D. The four small areas selected in step S4 are adjacent to each other in pairs, and the area position information is judged. When the four small areas are near the upper left corner of the rectangular frame, the camera control unit controls the camera shooting angle to move to the upper left. Similarly, when the four small areas are located in the lower left corner, upper right corner, lower right corner, top, bottom, left, and right of the rectangular frame, the camera control unit controls the camera shooting angle to move in the corresponding direction. When the four small areas are in the middle area of the rectangular frame, the camera control unit controls the camera to move away from the shooting area.
[0022] According to the above technical solution, the interval between the two shots in step S3 and step S8 is set at 2ms.
[0023] According to the above technical solution, the recognition of the picture in steps S3 and S9 is performed synchronously with the selection of the image. If the recognition of the picture is completed before the image selection is completed, the image selection is automatically completed.
[0024] According to the above technical solution, the judgment criteria for the image not being recognized by the image selection unit and the barcode recognition unit in step S5 are that the vertical pixel set and the horizontal pixel set in the four selected areas are less than the set threshold, and the barcode recognition unit fails to recognize the barcode in the image.
[0025] An auxiliary reading system includes a main control unit, the output end electrical signal of the main control hollow core is connected to a hardware device control unit, the output end electrical signal of the main control hollow core is connected to a storage unit, the output end electrical signal of the main control hollow core is connected to an indicator light control unit, the output end electrical signal of the main control hollow core is connected to an error code unit, the output end electrical signal of the main control hollow core is connected to a software calling unit, and the output end electrical signal of the main control hollow core is connected to a feedback unit.
[0026] According to the above technical solution, the hardware device control unit includes a camera control unit, an aimer control unit, and a fill light control unit. The camera control unit includes a shooting module and an adjustment module. The adjustment module includes an angle adjustment module and a position adjustment module. The software scheduling unit includes an image selection unit and a barcode recognition unit. The output end electrical signal of the barcode recognition unit is connected to the parsing unit, the output end electrical signal of the parsing unit is connected to the cache module, and the output end electrical signal of the parsing unit is connected to the upload module.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] 1. The present invention uses an image processing unit to frame a captured image, identify the area where the barcode appears, select a rectangular frame of fixed length and width with the center of the captured image as the center point, determine the position of the barcode within the rectangular frame, and then adjust the camera shooting angle and position before taking a second shot so that the center of the second shot is mainly the barcode. This achieves automatic adjustment of the shooting area and solves the problem of existing barcode reading devices that can only manually adjust the scanning position by the user. Each adjustment requires only a rough visual confirmation of the barcode position, and then the barcode reading device is moved to align with the barcode area, requiring multiple adjustments to achieve alignment.
[0029] 2. This invention sets three error code states for three common problems during barcode scanning. Among them, the successful barcode scanning state is also set as an error state, eliminating the need to set an additional correct code set, reducing system judgment time. The failed scanning state is set as an unrecognized state and an unresolved state. The unrecognized state prompts the user to rescan the barcode, and the unresolved state prompts the user that the barcode does not meet the resolution requirements and requires other methods to resolve it. Different indicator lights prompt the user to solve scanning problems. Compared with a single prompt method, it allows users to solve problems and improves scanning efficiency.
[0030] 3. The present invention divides the area within the rectangular frame into sixteen small areas by dividing it into three area lines along the X-axis and three area lines along the Y-axis. The sixteen small areas are scanned vertically and horizontally to obtain vertical and horizontal pixel sets. The four areas with the largest number of vertical and horizontal pixel sets among the sixteen small areas are then selected and their positions are calibrated. The range within the rectangular frame is further refined. The main purpose of this is to confirm the main location of the barcode within the rectangular frame. The position of the barcode within the rectangular frame is then confirmed based on the vertical and horizontal pixel sets within the sixteen small areas. Because the barcode is coherent, as long as the barcode appears within the rectangular frame, the small areas it occupies are continuous. This is to use the continuous nature of the barcode to simplify the selection rules for the image within the picture.
[0031] 4. In the present invention, the recognition of the image is carried out synchronously with the selection of the image. Before the image selection is completed, if the recognition of the image is completed, the image selection is automatically terminated. Here, the processing of the image by the barcode recognition unit replaces the judgment logic of the image selection unit, that is, the work interruption of the image selection unit includes two modes. One is that the vertical pixel set and the horizontal pixel set in the four small areas are less than the set threshold and the barcode recognition unit is identifying the barcode in the image, that is, the barcode in the rectangular frame is too small to be used for judging the position of the barcode. The other is that the barcode recognition unit successfully recognizes the barcode in the image. These two modes correspond to one scanning failure and the other to one scanning success, which simplifies the judgment logic of the image processing unit and further simplifies the workflow of the image processing unit. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0033] Figure 1 It is a system block diagram of the present invention;
[0034] Figure 2 It is a block diagram of the hardware device control unit of the present invention;
[0035] Figure 3 It is a block diagram of the software calling unit of the present invention. DETAILED DESCRIPTION
[0036] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0037] A preferred embodiment of the auxiliary reading method and system provided by the present invention is as follows: Figures 1 to 3 As shown: An auxiliary reading method, comprising the following steps:
[0038] S1. Call the background control system to input the error code set in the database. The error code set includes error code 1, error code 2, and error code 3. Error code 1 indicates an unrecognized error, and the corresponding indicator light is a yellow light. Error code 2 indicates an unresolved error, and the corresponding indicator light is a red light. Error code 3 indicates a successful recognition, and the corresponding indicator light is a green light. Three error code states are set for three common problems in the code scanning process, among which the successful code scanning state is also set as an error state. There is no need to set the correct code set additionally, which reduces the system judgment time. The scanning failure state is set to an unrecognized state and an unresolved state. The unrecognized state prompts the user to rescan the barcode, and the unresolved state prompts the user that the barcode does not meet the resolution requirements. Please resolve it through other methods. Different indicator lights prompt the user to solve the scanning problem. Compared with a single prompt method, it is more conducive to the user solving the problem, thereby improving the scanning efficiency.
[0039] S2. Press the switch to power on and the sight will enter the working state;
[0040] S3, the camera takes a picture of the barcode;
[0041] S4. Call the image selection unit and the barcode recognition unit to recognize the picture obtained in S3. The image selection unit selects the captured picture and identifies the area where the barcode appears. The selection box is a rectangular box. The length of the rectangular box is twice the width. The size of the selection rectangular box is set according to the general shape of the barcode. The barcode is subsequently recognized in the rectangular box to further refine the range within the rectangular box. The main purpose is to confirm the main existence position of the barcode in the rectangular box, and then confirm the position of the barcode in the rectangular box according to the vertical pixel set and horizontal pixel set in the sixteen small areas. Because the barcode is coherent, as long as the barcode appears in the rectangular box, the small areas it occupies are continuous. Here, the continuous characteristics of the barcode are used to simplify the selection rules for the image in the picture. The sixteen small areas in the rectangular box are sequentially marked with numbers 1A, 2A, 3A, 4A, 1B, 2B, 3B, 4B, 1C, 2C, 3C, 4C, 1D, 2D, 3D, 4D, and each area is marked. The row number is a judgment of the position of the small area in the rectangular frame by using the image selection unit. Because the four selected small areas are adjacent to each other in pairs, the area position information is judged. When the four small areas are near the upper left corner of the rectangular frame, the camera control unit controls the camera shooting angle to move to the upper left. Similarly, when the four small areas are located in the lower left corner, upper right corner, lower right corner, top, bottom, left and right of the rectangular frame, the camera control unit controls the camera shooting angle to move in the corresponding direction. When the four small areas are in the middle area of the rectangular frame, the camera control unit controls the camera to move away from the shooting area. Multiple arrangement methods are set in the sixteen small areas. According to which arrangement method the four selected small areas belong to, that is, the position of the four small areas in the rectangular frame, the position of the barcode not in the rectangular frame is judged, and then the camera shooting angle and position are adjusted, and then a second shot is performed, so that the center of the second shot picture is mainly the barcode, thereby realizing automatic adjustment of the shooting area.
[0042] S5. If the image is not recognized by the image selection unit and the barcode recognition unit in step S4, the feedback unit sends an error code call request to the main control unit;
[0043] S6. The main control unit calls the error code unit to send recognition error information through the indicator light. The judgment standard for the image not being recognized by the image selection unit and the barcode recognition unit is that the vertical pixel set and the horizontal pixel set in the four selected areas are less than the set threshold value. The judgment principle here is that there are too few barcodes in the rectangular frame in the image, which is insufficient for determining the position of the barcode. At this time, the user is prompted by sending an error code and displaying an indicator light that the barcode is not aligned. Manual adjustment of the shooting area at a large angle and a large range is simpler and faster, avoiding the user pointing the scanning device at a non-barcode area, causing the camera to take multiple shots, and the barcode recognition unit failing to recognize the barcode in the image, that is, the barcode in the image does not meet the barcode requirements or the barcode display in the image is missing too much and cannot be recognized. The same is true for the above-mentioned image where there are fewer barcodes displayed, but the requirement for the barcode position here is within the image, while the requirement for the barcode position by the image processing unit is within the rectangular frame. The different judgment ranges for the barcode avoid the problem that the barcode is in the image but not in the rectangular frame, thereby improving the accuracy of barcode recognition;
[0044] S7. If the image in step S4 is recognized by the image selection unit, the camera control unit is called to adjust the angle and position of the camera;
[0045] S8, the adjusted camera takes a second shot of the camera area, and the above steps S4, S5, and S6 are repeated for the captured picture. The interval between the two shots in steps S3 and S8 is set to 2ms. The interval between the two shots is set to reserve processing time for the barcode recognition unit to recognize the picture, thereby avoiding starting the second shot while the barcode recognition unit is still recognizing the picture. On the other hand, it reduces the number of shots and shortens the working time of the camera.
[0046] S9. After the barcode recognition unit recognizes the captured image, it stops capturing the captured area. Image recognition is performed synchronously with image selection. Before image selection is completed, if image recognition is completed, image selection is automatically terminated. Here, the processing of the image by the barcode recognition unit replaces the judgment logic of the image selection unit, that is, the work interruption of the image selection unit includes two modes. One is that the vertical pixel set and the horizontal pixel set in the four small areas in step S6 are less than the set threshold and the barcode recognition unit recognizes the barcode in the image, that is, there are too few barcodes in the rectangular frame to be used for judging the position of the barcode. The other is that the barcode recognition unit successfully recognizes the barcode in the image. These two modes correspond to one scanning failure and the other to one scanning success, which simplifies the judgment logic of the image processing unit and further simplifies the workflow of the image processing unit.
[0047] S10, the parsing unit parses the identified barcode;
[0048] S11. If the analysis fails, the feedback unit sends an error code call request to the main control unit;
[0049] S12, the main control unit calls the error code unit to send a barcode information error message through the indicator light;
[0050] S13. After successful parsing, the parsing unit uploads the parsed information and caches the parsed information. The identified information is temporarily cached for the user to check. This prevents the parsed information from being different from the actual product information, i.e., different from the information in the database. The feedback unit sends an error code call request to the main control unit.
[0051] S14. The main control unit calls the error code unit to send a barcode recognition completion message through the indicator light.
[0052] An auxiliary reading system includes a main control unit, which controls the entire system and equipment. The output terminal electrical signal of the main control hollow is connected to a hardware device control unit for controlling the hardware device. The output terminal electrical signal of the main control hollow is connected to a storage unit, which is connected to a database for storing product information and barcode information, and is also used by the main control unit to call and query relevant information. The output terminal electrical signal of the main control hollow is connected to an indicator light control unit, the output terminal electrical signal of the main control hollow is connected to an error code unit, the output terminal electrical signal of the main control hollow is connected to a software calling unit, and the output terminal electrical signal of the main control hollow is connected to a feedback unit. The hardware device control unit includes a camera control unit, a sight control unit, and a fill light control unit. The camera control unit includes a camera The camera module and the adjustment module include an angle adjustment module and a position adjustment module. The angle adjustment module is used to adjust the shooting angle of the camera, and the position adjustment module is used to adjust the position of the camera. The software scheduling unit includes an image selection unit and a barcode recognition unit. The barcode recognition unit is used to recognize barcodes in pictures (this is achieved by using existing structures such as a sight). The output end electrical signal of the barcode recognition unit is connected to the parsing unit, and the output end electrical signal of the parsing unit is connected to the cache module. The cache module is used to temporarily cache the parsed information in the main body. The cache duration is between the power on and power off of the code scanning device. The output end electrical signal of the parsing unit is connected to the upload module to upload the parsed information to the server (computer, mobile device, etc.).
[0053] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.
[0054] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. An auxiliary reading method, characterized in that: The following steps are involved: S1. Call the background control system to enter the error code set in the database; S2. Press the switch to power on and the sight will enter the working state; S3, the camera takes a picture of the barcode; S4, calling the image selection unit and the barcode recognition unit to recognize the image obtained in S3 or S8; S5. If the image is not recognized by the image selection unit and the barcode recognition unit in step S4, the feedback unit sends an error code call request to the main control unit; S6. The main control unit calls the error code unit to send identification error information through the indicator light; S7. If the image in step S4 is recognized by the image selection unit, the camera control unit is called to adjust the angle and position of the camera; S8, the adjusted camera takes a second photo of the camera area, and the above steps S4, S5, and S6 are repeated for the photo taken; S9, after the barcode recognition unit recognizes the captured image, it stops capturing the capture area; S10, the parsing unit parses the identified barcode; S11. If the analysis fails, the feedback unit sends an error code call request to the main control unit; S12, the main control unit calls the error code unit to send a barcode information error message through the indicator light; S13, after successful parsing, the parsing unit uploads the parsed information and caches the parsed information, and the feedback unit sends an error code call request to the main control unit; S14, the main control unit calls the error code unit to send a barcode recognition completion message through the indicator light; The error code set in step S1 includes error code 1, error code 2, and error code 3. Error code 1 indicates an unrecognized error, and the corresponding indicator light is a yellow light. Error code 2 indicates an unresolved error, and the corresponding indicator light is a red light. Error code 3 indicates successful recognition, and the corresponding indicator light is a green light. The image selection unit in step S4 selects the captured image and identifies the area where the barcode appears. The selection frame is a rectangular frame, and the length of the rectangular frame is twice the width. The selection standard of the rectangular frame is to select a rectangular frame with a fixed length and width with the center of the captured image as the center point, and then divide the area within the rectangular frame into three area lines along the X-axis and Y-axis directions, and divide the area within the rectangular frame into sixteen small areas. The sixteen small areas are scanned vertically and horizontally respectively to obtain vertical pixel sets and horizontal pixel sets, and then select the four areas with the most pixel sets in the vertical pixel sets and horizontal pixel sets among the sixteen small areas, and then select these four areas and calibrate the area positions; The sixteen small areas within the rectangular frame are sequentially numbered 1A, 2A, 3A, 4A, 1B, 2B, 3B, 4B, 1C, 2C, 3C, 4C, 1D, 2D, 3D, and 4D. The four small areas selected in step S4 are adjacent to each other. The area position information is judged. When the four small areas are near the upper left corner of the rectangular frame, the camera control unit controls the camera shooting angle to move to the upper left. Similarly, when the four small areas are located in the lower left corner, upper right corner, lower right corner, top, bottom, left, and right of the rectangular frame, the camera control unit controls the camera shooting angle to move in the corresponding directions. When the four small areas are in the middle area of the rectangular frame, the camera control unit controls the camera to move away from the shooting area. The interval between the two shots in step S3 and step S8 is set to 2ms; The judgment criteria for the image not being recognized by the image selection unit and the barcode recognition unit in step S5 are that the vertical pixel set and the horizontal pixel set in the four selected areas are smaller than the set threshold, and the barcode recognition unit fails to recognize the barcode in the image.
2. The auxiliary reading method according to claim 1, characterized in that: The recognition of the picture in steps S3 and S9 is performed synchronously with the selection of the image. If the recognition of the picture is completed before the image selection is completed, the image selection is automatically completed.
Citation Information
Patent Citations
Vending system and operating method thereof
CN108922021A
Sighting device auxiliary reading method and system of bar code reading equipment
CN112949332A
Bar code scanning intelligent adjusting device of biochemical analyzer
CN117147896A