Adaptive regulation system based on a scanning gun

By acquiring and comparing the light intensity incident on the barcode area, a signal is generated to adjust the light source intensity, solving the problem of low scanning success rate when the light source is insufficient, and realizing efficient scanning under different lighting conditions.

CN118862913BActive Publication Date: 2025-10-24SHENZHEN IDATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411159270.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2025-10-24
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

Existing technologies make it difficult to analyze and judge the situation based on the barcode area and the light source area, which makes it difficult for the scanner to effectively adjust the light source when the incident light intensity is insufficient, thus affecting the scanning success rate.

Method used

By acquiring the light intensity incident on the barcode area, a qualified scanning area is determined. The light source sufficiency and light stability values ​​are compared with the barcode area to generate corresponding signals to adjust the light source intensity, including the first and second light source intensity adjustment values ​​QT1 and QT2, thereby achieving automatic light compensation.

Benefits of technology

It improves the scanning accuracy of the barcode scanner under different light intensities and environments, and ensures that the barcode scanner can automatically adjust the light source intensity when the light source area is abnormal, so as to meet the barcode recognition requirements and achieve normal scanning operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118862913B_ABST
    Figure CN118862913B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of scanning gun, and particularly relates to a self-adaptive regulation and control system based on a scanning gun, comprising: a region determination module: acquiring light intensity of light incident to a bar code region, and determining a scanning qualified region; a sufficiency judgment module: based on the scanning qualified region, judging by comparison with the bar code region, outputting a light source sufficiency value, and generating a signal of whether the light source region is normal; a stability judgment module: based on the signal of the light source region being normal, acquiring a light stability value of light incident to the bar code region, judging whether to perform bar code scanning work; an adaptation judgment module: based on the signal of the light source region being abnormal, acquiring an adaptation capacity value, evaluating light applicability adjustment capacity, and generating an adaptability level signal; and an adaptation regulation and control module: based on a light source easy regulation and control signal, acquiring a light intensity regulation and control value, and performing regulation and control processing on the light incident to the bar code region.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present divisional application is a divisional application of the Chinese Patent Application with the application date of June 25, 2024, the application number of 2024108273123, and the invention name of "Adaptive regulation method, system and device based on scanning gun and storage medium". TECHNICAL FIELD

[0002] The present application relates to the technical field of scanning guns, in particular to an adaptive regulation system based on a scanning gun. BACKGROUND

[0003] A scanning gun can read the price, name, article number and other product information of a product by scanning the product code. When the scanning light source intensity of the scanning gun is weak or the light intensity in the environment is too weak, the amount of light entering the lens from the code to the scanning device is weak, thereby reducing the success rate of scanning the code.

[0004] In the prior art, if the light intensity of the light source incident to the barcode area does not meet the scanning requirements during the scanning process of the scanning gun, it will be difficult for the scanning gun to complete the scanning work more efficiently. Based on this situation, it is currently difficult to analyze and judge the situation of the barcode area and the light source area, complete the adaptive adjustment of the light source of the barcode area, and ensure the normal work of the scanning gun. SUMMARY

[0005] The present application aims to provide an adaptive regulation method, system, device and storage medium based on a scanning gun, which solves the technical problem that it is currently difficult to analyze and judge the situation of the barcode area and the light source area, complete the adaptive adjustment of the light source of the barcode area, and ensure the normal work of the scanning gun.

[0006] The purpose of the present application can be achieved by the following technical solutions:

[0007] An adaptive regulation method based on a scanning gun, comprising the following steps:

[0008] Step 1: Obtain the light intensity of the light source incident to the barcode area, and determine the scanning qualified area;

[0009] Step 2: Based on the scanning qualified area, compare and judge with the barcode area, output the light source sufficient value, and generate the light source area normal signal;

[0010] Wherein, the light source sufficient value is calculated by the ratio of the area of the overlapping area to the area of the barcode area;

[0011] Step 3: Based on the light source area normal signal, obtain the light stability value of the light source incident to the barcode area, and judge whether to perform barcode scanning work;

[0012] The light ray stability value is obtained by adding the abnormal number proportion value and the abnormal interval distribution minimum value.

[0013] As a further scheme of the present application, in step 1, the determination process of the scanning qualified area is as follows:

[0014] The qualified light ray intensity is extracted, and the position point corresponding to the qualified light ray intensity is marked as an edge point of the scanning area.

[0015] The edge points of the scanning area are connected to obtain the scanning qualified area.

[0016] As a further scheme of the present application, the determination process of the qualified light ray intensity is as follows:

[0017] If the light ray intensity is within the light ray intensity range required for bar code recognition, the light ray intensity is marked as a qualified light ray intensity.

[0018] As a further scheme of the present application, in step 2, if the light source sufficiency value is greater than or equal to the light source sufficiency threshold value, a light source area normal signal is generated.

[0019] If the light source sufficiency value is less than the light source sufficiency threshold value, a light source area abnormal signal is generated.

[0020] As a further scheme of the present application, the acquisition process of the overlapping area is as follows:

[0021] The scanning qualified area and the bar code area are compared to obtain the overlapping area.

[0022] As a further scheme of the present application, in step 3, if the light ray stability value is greater than or equal to the light ray stability threshold value, a scanning operation signal is generated.

[0023] If the light ray stability value is less than the light ray stability threshold value, a scanning adaptation signal is generated.

[0024] As a further scheme of the present application, the acquisition process of the abnormal number proportion value is as follows:

[0025] The scanning time is divided into n collection nodes, the light source area normal signal of each collection node is acquired, the number of light source area abnormal signals is counted, and the number of light source area abnormal signals is compared with the total number of collection nodes to obtain the abnormal number proportion value.

[0026] As a further scheme of the present application, the acquisition process of the abnormal interval distribution minimum value is as follows:

[0027] The time interval between adjacent light source area abnormal signals is obtained and marked as an adjacent abnormal signal interval, the minimum value of the adjacent abnormal signal interval is extracted, and the minimum value of the adjacent abnormal signal interval is compared with the scanning time to obtain the abnormal interval distribution minimum value.

[0028] As a further scheme of the present application, the method further comprises the following steps:

[0029] Step 4: When the light source area abnormal signal is obtained, the size offset value, the midpoint offset value and the light intensity reserved value are obtained, the size offset value and the midpoint offset value are summed to obtain a total offset value, and the light intensity reserved value and the total offset value are ratio calculated to obtain an adaptability value;

[0030] If the adaptability value is greater than or equal to the adaptability threshold value, a light source easy-to-control signal is generated;

[0031] If the adaptability value is less than the adaptability threshold value, a light source not-easy-to-control signal is generated.

[0032] As a further scheme of the present application, the size offset value is obtained by the following process:

[0033] The length difference value of the scanning qualified area is obtained by difference calculation of the diameter length of the scanning qualified area and the diagonal length of the barcode area;

[0034] The size offset value is obtained by ratio calculation of the length difference value of the scanning qualified area and the diagonal length of the barcode area.

[0035] As a further scheme of the present application, the midpoint offset value is obtained by the following process:

[0036] The region midpoint distance difference value is obtained by measuring the distance between the center point of the scanning qualified area and the center point of the barcode area;

[0037] The length offset value is obtained by ratio calculation of the region midpoint distance difference value and the diagonal length of the barcode area;

[0038] The angle offset value is obtained by measuring the offset angle between the center point of the scanning qualified area and the reference point with the center point of the barcode area as the reference point, and calculating the sine value of the offset angle;

[0039] The midpoint offset value is obtained by product calculation of the length offset value and the angle offset value.

[0040] As a further scheme of the present application, the light intensity reserved value is obtained by the following process:

[0041] The light intensity control difference value is obtained by difference calculation of the maximum light intensity value and the maximum value of the light intensity range required for barcode recognition;

[0042] The light intensity reserved value is obtained by ratio calculation of the light intensity control difference value and the maximum value of the light intensity range.

[0043] As a further scheme of the present application, the method further comprises the following steps:

[0044] Step 5: based on the light source easy regulation signal, obtaining a light source intensity regulation value, and regulating and processing the light source incident to the barcode region;

[0045] The light source intensity regulation value includes a first light source intensity regulation value QT1 and a second light source intensity regulation value QT2.

[0046] As a further scheme of the present application, the process of obtaining the first light source intensity regulation value QT1 is as follows:

[0047] Obtaining the center point of the scanning qualified region, measuring the maximum value of the distance between the boundary point of the barcode region and the center point of the scanning qualified region, and marking it as the maximum value of the center boundary point distance;

[0048] Calculating the difference value between the maximum value of the center boundary point distance and the radius of the scanning qualified region to obtain the first scanning qualified region expansion value, which is marked as RK1;

[0049] Obtaining the light intensity of the light source corresponding to the current scanning qualified region and the radius of the scanning qualified region, which are marked as QY and RQ respectively;

[0050] The first light source intensity regulation value QT1 is calculated through the formula

[0051] As a further scheme of the present application, the process of regulation and processing is as follows:

[0052] Summing the first light source intensity regulation value QT1 and the current light intensity QY to obtain the light source intensity of the light source actually working after regulation and processing;

[0053] Comparing the light source intensity of the light source actually working after regulation and processing with the light intensity range required for barcode recognition;

[0054] If the light source intensity of the light source actually working after regulation and processing is within the light intensity range required for barcode recognition, the light of the barcode is automatically compensated according to the light source intensity of the light source actually working after regulation and processing.

[0055] As a further scheme of the present application, the process of obtaining the second light source intensity regulation value QT2 is as follows:

[0056] If the light source intensity of the light source actually working after regulation and processing is not within the light intensity range required for barcode recognition, obtaining the radius of the scanning qualified region and the length of half of the diagonal line of the barcode region, and calculating the difference value to obtain the expansion value of the second scanning qualified region, which is marked as RK2;

[0057] Obtaining the light intensity of the light source corresponding to the current scanning qualified region and the radius of the scanning qualified region, which are marked as QY and RQ respectively;

[0058] ​The second light source intensity regulation value QT2 is calculated by the formula .

[0059] As a further scheme of the present application: the second light source intensity regulation value QT2 is summed with the current illumination intensity QY to obtain the light source intensity at which the light source actually works after regulation.

[0060] The light source intensity at which the light source actually works after regulation is compared with the light intensity range required for bar code recognition.

[0061] If the light source intensity at which the light source actually works after regulation is within the light intensity range required for bar code recognition, the center point of the scanning qualified area is aligned with the center point of the bar code area, and the light of the bar code is automatically compensated according to the light source intensity at which the light source actually works after regulation.

[0062] A self-adaptive regulation system based on a scanning gun, comprising:

[0063] A region determination module: obtaining the light intensity of the light source incident to the bar code region and determining a scanning qualified region.

[0064] A sufficiency judgment module: based on the scanning qualified region, judging by comparison with the bar code region, outputting a light source sufficiency value, and generating a light source region normal signal.

[0065] The light source sufficiency value is calculated by the ratio of the area of the overlapping region to the area of the bar code region.

[0066] A stability judgment module: based on the light source region normal signal, obtaining a light stability value of the light source incident to the bar code region, and judging whether to perform bar code scanning work.

[0067] The light stability value is obtained by adding the abnormal number ratio value and the minimum value of abnormal interval distribution.

[0068] As a further scheme of the present application: further comprising:

[0069] An adaptive judgment module: when the light source region abnormal signal is obtained, obtaining a size offset value, a midpoint offset value and a light intensity reserved value, summing the size offset value, the midpoint offset value and the light intensity reserved value, and calculating an adaptive capacity value.

[0070] If the adaptive capacity value is greater than or equal to the adaptive capacity threshold value, a light source easy regulation signal is generated.

[0071] If the adaptive capacity value is less than the adaptive capacity threshold value, a light source not easy regulation signal is generated.

[0072] An adaptive regulation module: based on the light source easy regulation signal, obtaining a light source intensity regulation value, and regulating the light source incident to the bar code region.

[0073] The light source intensity regulation value comprises a first light source intensity regulation value QT1 and a second light source intensity regulation value QT2.

[0074] A storage medium, in which a computer software program is stored, the computer software program is executed by a processor to realize the adaptive regulation method as described above.

[0075] An apparatus, comprising:

[0076] A memory for storing a computer software program;

[0077] A processor for reading and executing the computer software program, thereby realizing the adaptive regulation method as described above.

[0078] The beneficial effects of the present application are:

[0079] 1. The present application obtains the light intensity of the light source incident to the barcode area and determines the scanning qualified area; based on the scanning qualified area, the light source sufficient value is output by comparison with the barcode area, and the normal signal of the light source area is generated; based on the light source area abnormal signal, the light stability value of the light source incident to the barcode area is obtained, and whether to perform barcode scanning work is judged; the present application analyzes the region of the light source data of the scanning gun to be identified, and then analyzes the light stability, so that the scanning gun operation work is completed under the conditions of light intensity, region and fluctuation, and the accuracy of the scanning work of the scanning gun is improved;

[0080] 2. The present application obtains the adaptability value based on the light source area abnormal signal, evaluates the light applicability adjustment ability, and generates the adaptability level signal; the present application judges the offset degree of the scanning qualified area from the size and position, judges the difficulty of subsequent light regulation of the barcode according to the size of the offset degree; the corresponding regulation work can be completed according to the adaptability level signal generated by the present application to ensure the normal operation of the subsequent scanning gun;

[0081] 3. The present application obtains the light source intensity regulation value based on the light source easy regulation signal, and regulates the light source incident to the barcode area; the present application can regulate the light source intensity without moving the light source, meet the demand of the barcode for light, complete the automatic compensation of the light of the barcode, realize the normal scanning work of the scanner, or move the light source to regulate the light source intensity, meet the demand of the barcode for light, complete the automatic compensation of the light of the barcode, realize the normal scanning work of the scanner, and adaptively adjust the light source of the barcode area. BRIEF DESCRIPTION OF DRAWINGS

[0082] The application will be further described below with reference to the drawings.

[0083] Figure 1 is a flow chart of a scanning gun-based adaptive regulation method provided by Embodiment 1 of the application;

[0084] Figure 2 is a flow chart of a scanning gun-based adaptive regulation method provided by Embodiment 2 of the application;

[0085] Figure 3 is a flow chart of a scanning gun-based adaptive regulation method provided by Embodiment 3 of the application;

[0086] Figure 4 is a system block diagram of a scanning gun-based adaptive regulation system provided by Embodiment 4 of the application;

[0087] Figure 5 is a system block diagram of a scanning gun-based adaptive regulation device provided by Embodiment 5 of the application;

[0088] Figure 6 is a system block diagram of a scanning gun-based adaptive regulation method storage medium provided by Embodiment 6 of the application. DETAILED DESCRIPTION

[0089] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only some of the embodiments of the application, but not all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the application. Embodiment 1

[0090] Please refer to Figure 1 The application is a scanning gun-based adaptive regulation method, which is suitable for a scenario where a ring light source irradiates a barcode and a scanning gun reads barcode information, and includes the following steps:

[0091] Step 1: Obtain the light intensity of light incident on the barcode area, and determine a scanning qualified area;

[0092] In some embodiments, the light intensity at the barcode area is obtained, the maximum light intensity is extracted, and the position point corresponding to the maximum light intensity is marked as the center point of the scanning qualified area;

[0093] The qualified light intensity is extracted, and the position point corresponding to the qualified light intensity is marked as the edge point of the scanning area;

[0094] The edge points of the scanning area are connected to obtain a closed scanning qualified area;

[0095] Specifically, the determination process of the qualified light intensity is as follows:

[0096] The acquired light intensity is compared with a light intensity range required for barcode recognition;

[0097] If the light intensity is within the light intensity range required for barcode recognition, it indicates that the light intensity meets the requirement for scanning and recognizing the barcode, and the light intensity is marked as a qualified light intensity.

[0098] If the light intensity is not within the light intensity range required for barcode recognition, it indicates that the light intensity does not meet the requirement for scanning and recognizing the barcode, and the light intensity is marked as an unqualified light intensity.

[0099] The light intensity can be detected by a photosensitive sensor.

[0100] Step 2: Based on the scanning qualified area, a light source sufficiency value is output by comparison with the barcode area, and a light source area normal signal is generated.

[0101] The light source area normal signal includes a light source area normal signal or a light source area abnormal signal.

[0102] In some embodiments, the scanning qualified area is compared with the barcode area to obtain an overlapping area.

[0103] The area of the overlapping area and the area of the barcode area are acquired, and the area of the overlapping area is compared with the area of the barcode area to obtain a light source sufficiency value.

[0104] The light source sufficiency value is compared with a light source sufficiency threshold value.

[0105] If the light source sufficiency value is greater than or equal to the light source sufficiency threshold value, it indicates that the light source of the scanning qualified area can fully cover the barcode, so that the barcode can be normally scanned under the light source range condition, and a light source area normal signal is generated.

[0106] If the light source sufficiency value is less than the light source sufficiency threshold value, it indicates that the light source of the scanning qualified area cannot fully cover the barcode, so that the barcode cannot be normally scanned under the light source range condition, and a light source area abnormal signal is generated.

[0107] The light source sufficiency threshold value is greater than or equal to 1, which can be 1, 1.2, etc.

[0108] Step 3: Based on the light source area normal signal, a light line stability value of the light source incident to the barcode area is acquired, and whether to perform barcode scanning is determined.

[0109] In some embodiments, when the light source area normal signal is obtained, the light stability value is acquired;

[0110] The light stability value is compared with the light stability threshold value;

[0111] If the light stability value is greater than or equal to the light stability threshold value, it indicates that the light incident to the bar code area has a greater stability performance in the range of the area and under the time fluctuation within the scanning time, which meets the condition of being recognized by the scanning gun, and a scanning work signal is generated;

[0112] If the light stability value is less than the light stability threshold value, it indicates that the light incident to the bar code area has a smaller stability performance in the range of the area and under the time fluctuation within the scanning time, which does not meet the condition of being recognized by the scanning gun, and a scanning adaptation signal is generated;

[0113] Further, the acquisition process of the light stability value is as follows:

[0114] The light stability value is obtained by adding and summing the abnormal number proportion value and the minimum value of abnormal interval distribution;

[0115] Further, the scanning time is divided into n acquisition nodes, the light source area normal signal of each acquisition node is acquired, and the number of light source area abnormal signals is counted. The number of light source area abnormal signals is compared with the total number of acquisition nodes to obtain the abnormal number proportion value;

[0116] The time interval between adjacent light source area abnormal signals is obtained, which is marked as adjacent abnormal signal interval. The minimum value of the adjacent abnormal signal interval is extracted, and the minimum value of the adjacent abnormal signal interval is compared with the scanning time to obtain the minimum value of the abnormal interval distribution;

[0117] It needs to be explained that the light stability value is calculated by the number ratio and interval ratio of the light source area abnormal signals within the entire scanning time. The greater the light stability value, the greater the probability of abnormal conditions in the scanning qualified area within the scanning time, and the smaller the light stability value, the smaller the probability of abnormal conditions in the scanning qualified area within the scanning time. The greater the light stability value will reduce the accuracy of the scanning work of the scanning gun;

[0118] In addition, since the light source area abnormal signal is obtained based on the light source intensity contrast judgment, the light stability value will also indicate the fluctuation of the light source intensity between qualified and unqualified within the scanning time. The smaller the light stability value, the smaller the fluctuation of the light source intensity within the scanning time, and the greater the light stability value, the greater the fluctuation of the light source intensity within the scanning time;

[0119] The technical scheme of the embodiment of the present application is: acquiring light intensity of light source incident to a barcode area, and determining a scanning qualified area; based on the scanning qualified area, outputting a light source sufficiency value and generating a light source area normal signal through comparison and judgment with the barcode area; based on the light source area abnormal signal, acquiring a light stability value of light source incident to the barcode area, and judging whether to perform barcode scanning work; the present application performs area judgment analysis on light source data when a scanning gun is to be identified, and then performs light stability analysis, so that the scanning gun can run normally under three states of light intensity, area and fluctuation, thereby improving the accuracy of scanning work of the scanning gun. Embodiment 2

[0120] Referring to Figure 2 The present application is a kind of adaptive control method based on scanning gun, which is suitable for annular light source to irradiate barcode, and is used in the scene of reading barcode information by scanning gun, and further includes the following steps:

[0121] Step 4: based on the light source area abnormal signal, acquiring an adaptability value, evaluating the light adaptability adjustment capability, and generating an adaptability level signal;

[0122] The adaptability level signal includes a light source easy-to-control signal and a light source not-easy-to-control signal.

[0123] In some embodiments, when the light source area abnormal signal is obtained, a size offset value, a midpoint offset value and a light intensity reserved value are acquired, the size offset value and the midpoint offset value are summed to obtain a total offset value, and the light intensity reserved value is compared with the total offset value to obtain the adaptability value.

[0124] The adaptability value is compared with an adaptability threshold value.

[0125] If the adaptability value is greater than or equal to the adaptability threshold value, a light source easy-to-control signal is generated.

[0126] If the adaptability value is less than the adaptability threshold value, a light source not-easy-to-control signal is generated.

[0127] It should be explained that: the adaptability value represents that there is an offset between the scanning qualified area and the barcode area in size and position, the greater the adaptability value, the greater the offset between the scanning qualified area and the barcode area, the smaller the adaptability value, the smaller the offset between the scanning qualified area and the barcode area, and the greater the offset between the scanning qualified area and the barcode area, which will affect the subsequent light source control difficulty; when the light source not-easy-to-control signal is obtained, a different model of light source can be directly replaced.

[0128] And the adaptability value also represents the gap between the current light intensity maximum value and the light intensity range required for barcode recognition, that is, for the light source regulation space corresponding to the current scanning qualified area, the greater the light intensity reserved value, the greater the regulation ability through the light source, the smaller the light intensity reserved value, the smaller the regulation ability through the light source;

[0129] Further, the size offset value acquisition process is:

[0130] The diameter length of the scanning qualified area and the diagonal length of the barcode area are obtained, and the diameter length of the scanning qualified area and the diagonal length of the barcode area are difference calculated to obtain the length difference value of the scanning qualified area;

[0131] The length difference value of the scanning qualified area and the diagonal length of the barcode area are ratio calculated to obtain the size offset value;

[0132] The midpoint offset value acquisition process is:

[0133] The center point of the scanning qualified area and the center point of the barcode area are obtained, and the distance between the center point of the scanning qualified area and the center point of the barcode area is measured to obtain the region midpoint distance difference value;

[0134] The region midpoint distance difference value and the diagonal length of the barcode area are ratio calculated to obtain the length offset value;

[0135] The center point of the barcode area is taken as a reference point, the deviation angle between the center point of the scanning qualified area and the reference point is measured, the sine value of the deviation angle is calculated, and the angle offset value is marked;

[0136] The length offset value and the angle offset value are multiplied to obtain the midpoint offset value;

[0137] It is explained that: the value range of the deviation angle is 0-45°;

[0138] The measurement standard of the deviation angle is:

[0139] The center point of the barcode area is taken as the origin, a two-dimensional coordinate line is constructed with the origin, the center point of the scanning qualified area and the origin are connected to obtain an angle measurement line, the included angles between the angle measurement line and the nearest X-axis and Y-axis are obtained to obtain X-axis included angle and Y-axis included angle, and the X-axis included angle and the Y-axis included angle are compared in size. The smallest included angle is marked as the deviation angle;

[0140] The light intensity reserved value acquisition process is:

[0141] The current light intensity maximum value and the light intensity range required for barcode recognition are obtained, and the light intensity maximum value and the maximum value of the light intensity range required for barcode recognition are difference calculated to obtain the light intensity regulation difference value;

[0142] The light intensity control difference value is divided by the maximum value of the light intensity range to obtain a light intensity reserved value.

[0143] The technical scheme of the embodiment of the application is: based on the light source area abnormal signal, an adaptability value is obtained, the light applicability adjustment capability is evaluated, and an adaptability level signal is generated; the application judges the offset degree of the scanning qualified area from the size and position aspects, judges the difficulty of subsequent re-control of the light on the bar code according to the size of the offset degree; the corresponding control work can be completed according to the adaptability level signal generated thereby, to ensure the normal operation of the subsequent scanning gun. Embodiment 3

[0144] Please refer to Figure 3 The application is a kind of self-adaptive control method based on a scanning gun, which is suitable for the scene of irradiating a bar code with a ring-shaped light source and reading the bar code information by using a scanning gun, and further comprises the following steps:

[0145] Step 5: based on the light source easy control signal, a light source intensity control value is obtained, and the light source incident to the bar code area is controlled and processed;

[0146] In some embodiments, when the light source easy control signal is obtained, the center point of the scanning qualified area is obtained, the maximum value of the boundary point distance of the bar code area from the center point of the scanning qualified area is measured, and is marked as the maximum value of the center boundary point distance;

[0147] The maximum value of the center boundary point distance is subtracted from the radius of the scanning qualified area to obtain a first scanning qualified area expansion value, which is marked as RK1;

[0148] The light intensity of the light source corresponding to the current scanning qualified area is obtained, and the radius of the scanning qualified area is obtained, which are respectively marked as QY and RQ;

[0149] The first light source intensity control value QT1 is calculated by the formula

[0150] Based on the first light source intensity control value QT1 obtained by the above-mentioned embodiment, the first light source intensity control value QT1 is summed with the current light intensity QY to obtain the light source intensity of the light source actually working after control.

[0151] The light source intensity of the light source actually working after control is compared with the light intensity range required for bar code recognition.

[0152] ​If the light source intensity of the light source actually working after the regulation is in the light intensity range required by the barcode identification, it indicates that the light intensity after the regulation meets the requirement of the barcode being scanned and identified without moving the light source position, and the light of the barcode is automatically compensated according to the light source intensity of the light source actually working after the regulation;

[0153] In some other embodiments, if the light source intensity of the light source actually working after the regulation is not in the light intensity range required by the barcode identification, the radius of the scanning qualified area and the length of half of the diagonal line of the barcode area are obtained, and a difference calculation is performed to obtain the expansion value of the second scanning qualified area, which is marked as RK2;

[0154] The light intensity of the light source corresponding to the current scanning qualified area and the radius of the scanning qualified area are obtained again, and are marked as QY and RQ, respectively;

[0155] The second light source intensity regulation value QT2 is calculated by the formula

[0156] The second light source intensity regulation value QT2 obtained based on the above-mentioned embodiments is summed with the current light intensity QY to obtain the light source intensity of the light source actually working after the regulation;

[0157] The light source intensity of the light source actually working after the regulation is compared with the light intensity range required by the barcode identification;

[0158] If the light source intensity of the light source actually working after the regulation is in the light intensity range required by the barcode identification, it indicates that the light intensity after the regulation meets the requirement of the barcode being scanned and identified without moving the light source position, and the light of the barcode is automatically compensated according to the light source intensity of the light source actually working after the regulation;

[0159] If the light source intensity of the light source actually working after the regulation is not in the light intensity range required by the barcode identification, it indicates that the light intensity does not meet the requirement of the barcode being scanned and identified, and the light source can be directly replaced with a different model;

[0160] The technical scheme of the embodiment of the present application is that the light source intensity regulation value is obtained based on the light source easy regulation signal, and the light source incident to the barcode area is regulated and processed; the present application can regulate the light source intensity without moving the light source, meet the requirement of the barcode to the light, complete the automatic compensation of the light of the barcode, realize the normal scanning work of the scanner, and also can regulate the light source intensity with the light source being moved, meet the requirement of the barcode to the light, complete the automatic compensation of the light of the barcode, realize the normal scanning work of the scanner, and adaptively adjust the light source of the barcode area.​ Embodiment 4

[0161] Referring to Figure 4 As shown in the drawings, the application is a scanning gun-based adaptive control system, which is suitable for the scene of using a scanning gun to read bar code information, and includes:

[0162] The area determination module acquires the light intensity of the light source incident on the bar code area and determines a scanning qualified area.

[0163] Specifically, the light intensity at the bar code area is acquired, the maximum light intensity is extracted, and the position point corresponding to the maximum light intensity is marked as the center point of the scanning qualified area.

[0164] The qualified light intensity is extracted, and the position point corresponding to the qualified light intensity is marked as the edge point of the scanning area.

[0165] The edge points of the scanning area are connected to obtain a closed scanning qualified area.

[0166] Specifically, the determination process of the qualified light intensity is as follows:

[0167] The acquired light intensity is compared with the light intensity range required for bar code recognition.

[0168] If the light intensity is within the light intensity range required for bar code recognition, it indicates that the light intensity meets the requirements for bar code scanning and recognition, and the light intensity is marked as a qualified light intensity.

[0169] If the light intensity is not within the light intensity range required for bar code recognition, it indicates that the light intensity does not meet the requirements for bar code scanning and recognition, and the light intensity is marked as an unqualified light intensity.

[0170] The sufficiency judgment module judges, based on the scanning qualified area, whether the light source is sufficient by comparing with the bar code area, outputs a light source sufficiency value, and generates a signal indicating whether the light source area is normal.

[0171] The light source sufficiency value is calculated by comparing the area of the overlapping area with the area of the bar code area.

[0172] Specifically, the scanning qualified area and the bar code area are compared to obtain an overlapping area.

[0173] The area of the overlapping area and the area of the bar code area are acquired, and the area of the overlapping area is compared with the area of the bar code area to obtain a light source sufficiency value.

[0174] The light source sufficiency value is compared with a light source sufficiency threshold value.

[0175] If the light source sufficiency value is greater than or equal to the light source sufficiency threshold value, it indicates that the light source in the scanning qualified area can fully cover the barcode, so that the barcode can be normally scanned within the light source range, and a light source area normal signal is generated;

[0176] If the light source sufficiency value is less than the light source sufficiency threshold value, it indicates that the light source in the scanning qualified area cannot fully cover the barcode, so that the barcode cannot be normally scanned within the light source range, and a light source area abnormal signal is generated;

[0177] The stable judgment module: based on the light source area normal signal, the light line stability value of the light source incident to the barcode area is obtained, and whether to perform barcode scanning work is judged;

[0178] The light line stability value is obtained by adding the abnormal number ratio value and the abnormal interval distribution minimum value;

[0179] Specifically, when the light source area normal signal is obtained, the light line stability value is obtained;

[0180] The light line stability value is compared with the light line stability threshold value;

[0181] If the light line stability value is greater than or equal to the light line stability threshold value, it indicates that within the scanning time, the light line incident to the barcode area has greater stability within the range and time fluctuation, which meets the condition of being recognized by the scanning gun, and a scanning work signal is generated;

[0182] If the light line stability value is less than the light line stability threshold value, it indicates that within the scanning time, the light line incident to the barcode area has smaller stability within the range and time fluctuation, which does not meet the condition of being recognized by the scanning gun, and a scanning adaptation signal is generated;

[0183] The adaptation judgment module: when the light source area abnormal signal is obtained, the size offset value, the midpoint offset value and the light intensity reserved value are obtained, the size offset value and the midpoint offset value are summed to obtain the total deviation value, and the light intensity reserved value is compared with the total deviation value to obtain the adaptation capacity value;

[0184] The adaptation capacity value is compared with the adaptation capacity threshold value;

[0185] If the adaptation capacity value is greater than or equal to the adaptation capacity threshold value, a light source easy to control signal is generated;

[0186] If the adaptation capacity value is less than the adaptation capacity threshold value, a light source not easy to control signal is generated.

[0187] The adaptation control module: based on the light source easy to control signal, the light source intensity control value is obtained, and the light source incident to the barcode area is controlled and processed;

[0188] The light source intensity regulation value includes a first light source intensity regulation value QT1 and a second light source intensity regulation value QT2;

[0189] Specifically, when the light source easy regulation signal is obtained, the center point of the scanning qualified area is acquired, the maximum value of the boundary point distance of the barcode area from the center point of the scanning qualified area is measured, and is marked as the maximum value of the center boundary point distance;

[0190] The maximum value of the center boundary point distance is subtracted from the radius of the scanning qualified area to obtain a first scanning qualified area expansion value, which is marked as RK1;

[0191] The light intensity of the light source corresponding to the current scanning qualified area is acquired, and the radius of the scanning qualified area is acquired, which are respectively marked as QY and RQ;

[0192] The first light source intensity regulation value QT1 is calculated through the formula

[0193] The first light source intensity regulation value QT1 obtained based on the above-mentioned implementation solution is summed with the current light intensity QY to obtain the light source intensity of the light source actually working after regulation;

[0194] The light source intensity of the light source actually working after regulation is compared with the light intensity range required for barcode recognition;

[0195] If the light source intensity of the light source actually working after regulation is within the light intensity range required for barcode recognition, it indicates that the light intensity after regulation meets the requirement of barcode scanning recognition without moving the light source position, and the light of the barcode is automatically compensated according to the light source intensity of the light source actually working after regulation;

[0196] More specifically, if the light source intensity of the light source actually working after regulation is not within the light intensity range required for barcode recognition, the radius of the scanning qualified area and the length of half of the diagonal line of the barcode area are acquired, and the difference is calculated to obtain a second scanning qualified area expansion value, which is marked as RK2;

[0197] The light intensity of the light source corresponding to the current scanning qualified area is acquired, and the radius of the scanning qualified area is acquired, which are respectively marked as QY and RQ;

[0198] The second light source intensity regulation value QT2 is calculated through the formula

[0199] The second light source intensity regulation value QT2 obtained based on the above-mentioned implementation solution is summed with the current light intensity QY to obtain the light source intensity of the light source actually working after regulation;

[0200] ​​Compare the actual working intensity of the light source after adjustment with the light intensity range required for barcode recognition;

[0201] If the actual working light intensity of the light source after adjustment is within the light intensity range required for barcode recognition, it means that under the condition of moving the light source position, the light intensity after adjustment meets the requirements for barcode scanning and recognition. That is, by moving the light source, the center point of the scan-qualified area can be aligned with the center point of the barcode area, and then the light of the barcode can be automatically compensated according to the actual working light intensity of the light source after adjustment.

[0202] If the actual working intensity of the light source after adjustment is not within the light intensity range required for barcode recognition, it means that the light intensity does not meet the requirements for barcode scanning and recognition, and a different type of light source can be directly replaced. Example 5

[0203] See also Figure 5 , Figure 5 Schematic diagram of an embodiment of the device provided by the embodiment of the present invention. Figure 5 As shown, an embodiment of the present invention provides an apparatus 500, including a memory 510, a processor 520, and a computer program 511 stored in the memory 510 and executable on the processor 520. When the processor 520 executes the computer program 511, the following steps are implemented:

[0204] Step 1: Obtain the intensity of light incident on the barcode area and determine the qualified scanning area;

[0205] Step 2: Based on the scanned qualified area, the system compares the scanned qualified area with the barcode area, outputs the light source sufficiency value, and generates a signal indicating whether the light source area is normal.

[0206] The light source sufficiency value is calculated by the ratio of the area of ​​the overlapped area to the area of ​​the barcode area;

[0207] Step 3: Based on the normal signal of the light source area, obtain the stable value of the light incident on the barcode area and determine whether to perform barcode scanning;

[0208] The light stability value is obtained by adding the percentage of abnormal numbers and the minimum value of abnormal interval distribution;

[0209] Step 4: When an abnormal signal is obtained in the light source area, the size offset value, the midpoint offset value, and the light intensity reserve value are obtained, and the size offset value, the midpoint offset value, and the light intensity reserve value are summed to calculate the adaptability value;

[0210] If the adaptability value is greater than or equal to the adaptability threshold, a light source easy-to-control signal is generated;

[0211] If the adaptability value is less than the adaptability threshold value, a light source not easy to control signal is generated;

[0212] Step 5: Based on the light source easy to control signal, a light source intensity control value is obtained, and the light source incident to the barcode area is controlled and processed;

[0213] The light source intensity control value includes a first light source intensity control value QT1 and a second light source intensity control value QT2. Embodiment 6

[0214] Please refer to Figure 6 , Figure 6 An embodiment of a computer readable storage medium provided for the embodiment of the application is shown. As shown in the figure, Figure 6 The embodiment provides a computer readable storage medium 600, and a computer program 611 is stored on the computer readable storage medium 600, and the computer program 611 is executed by a processor to realize the following steps:

[0215] Step 1: The light intensity of the light source incident to the barcode area is obtained, and a scanning qualified area is determined;

[0216] Step 2: Based on the scanning qualified area, the light source sufficient value is output by comparison with the barcode area, and a light source area normal signal is generated;

[0217] The light source sufficient value is obtained by ratio calculation of the area of the overlapping area and the area of the barcode area;

[0218] Step 3: Based on the light source area normal signal, the light line stability value of the light source incident to the barcode area is obtained, and whether to perform barcode scanning work is judged;

[0219] The light line stability value is obtained by adding the abnormal number ratio value and the minimum value of abnormal interval distribution;

[0220] Step 4: When the light source area abnormal signal is obtained, the size offset value, the midpoint offset value and the light intensity reserved value are obtained, the size offset value, the midpoint offset value and the light intensity reserved value are summed, and the adaptability value is calculated;

[0221] If the adaptability value is greater than or equal to the adaptability threshold value, a light source easy to control signal is generated;

[0222] If the adaptability value is less than the adaptability threshold value, a light source not easy to control signal is generated;

[0223] Step 5: Based on the light source easy to control signal, a light source intensity control value is obtained, and the light source incident to the barcode area is controlled and processed;

[0224] The light source intensity control value includes a first light source intensity control value QT1 and a second light source intensity control value QT2.

[0225] It should be noted that the description of the various embodiments has been presented for purposes of clarity and that it is not necessary to describe each and every embodiment separately or enumerate all its possible variations. It will be apparent to those skilled in the art that additional embodiments can be practiced which depart from the specific details of the described embodiments.

[0226] Those skilled in the art will appreciate that embodiments of the present application can be readily used as a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.

[0227] The present application is described in reference to the flow diagrams and / or block diagrams of the methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flow diagram and / or block diagram block or blocks. Figure 1 means for performing each of the functions specified in the flow diagram and / or block diagram block or blocks.

[0228] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the flow diagram and / or block diagram block or blocks. Figure 1 one or more functions specified in the flow diagram and / or block diagram block or blocks. Figure 1 means for performing each of the functions specified in the flow diagram and / or block diagram block or blocks.

[0229] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flow diagram and / or block diagram block or blocks. Figure 1 one or more functions specified in the flow diagram and / or block diagram block or blocks. Figure 1 means for performing each of the functions specified in the flow diagram and / or block diagram block or blocks.

[0230] While the preferred embodiments of the application have been described, additional variations and modifications can be made to these embodiments by those skilled in the art once they have the benefit of the present disclosure without departing from the spirit and scope of the application. Accordingly, it is intended that the appended claims include all such modifications and variations as fall within the scope of the present application.

[0231] It is apparent that those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. It is therefore intended that the present application cover all such changes and modifications that are within its scope.

Claims

1. A scanning gun based adaptive regulation system, characterized in that, The method comprises the following steps: The region determination module acquires the light intensity of the light source incident to the barcode region and determines a scanning qualified region; The sufficiency judgment module judges, based on the scanning qualified region, whether the light source is sufficient by comparing the scanning qualified region with the barcode region, outputs a light source sufficiency value, and generates a signal indicating whether the light source region is normal; The signal indicating whether the light source region is normal comprises a light source region normal signal or a light source region abnormal signal; The stability judgment module acquires, based on the light source region normal signal, a light stability value of the light source incident to the barcode region, judges whether to perform barcode scanning work; The adaptability judgment module acquires, based on the light source region abnormal signal, an adaptability value, evaluates the light adaptability adjustment capability, and generates an adaptability level signal; The adaptability level signal comprises a light source easy-to-control signal or a light source not-easy-to-control signal; The adaptability value indicates that there is a deviation between the scanning qualified region and the barcode region in size and position, the greater the adaptability value, the greater the deviation between the scanning qualified region and the barcode region, the smaller the adaptability value, the smaller the deviation between the scanning qualified region and the barcode region, and the greater the deviation between the scanning qualified region and the barcode region, which will affect the subsequent light source control difficulty; In addition, the adaptability value also indicates the gap between the current light intensity maximum value and the light intensity range required for barcode recognition, that is, for the light source control space corresponding to the current scanning qualified region, the greater the light intensity reserved value, the greater the control capability of the light source, and the smaller the light intensity reserved value, the smaller the control capability of the light source; The adaptability control module acquires, based on the light source easy-to-control signal, a light source intensity control value, and controls the light source incident to the barcode region; The light source intensity control value comprises a first light source intensity control value QT1 and a second light source intensity control value QT2; The first light source intensity control value QT1 is acquired by: Acquiring the center point of the scanning qualified region, measuring the maximum value of the boundary point distance of the barcode region from the center point of the scanning qualified region, and marking it as the maximum center boundary point distance; Subtracting the maximum center boundary point distance from the radius of the scanning qualified region to obtain a first scanning qualified region expansion value, which is marked as RK1; Then, the light intensity of the light source corresponding to the current scanning qualified region and the radius of the scanning qualified region are acquired, which are marked as QY and RQ, respectively. The first light source intensity regulation value QT1 is calculated by the formula ​ The second light source intensity control value QT2 is acquired by: If the actual working light intensity of the light source after control is not within the light intensity range required for barcode recognition, the radius of the scanning qualified region and the length of half of the diagonal line of the barcode region are acquired, and the difference is calculated to obtain a second scanning qualified region expansion value, which is marked as RK2; Then, the light intensity of the light source corresponding to the current scanning qualified region and the radius of the scanning qualified region are acquired, which are marked as QY and RQ, respectively. The second light source intensity regulation value QT2 is calculated by the formula .

2. The self-adapting regulation system based on scanning gun according to claim 1, characterized in that, The size deviation value, the midpoint deviation value, and the light intensity reserved value are acquired, the size deviation value and the midpoint deviation value are summed to obtain a total deviation value, and the light intensity reserved value and the total deviation value are compared to obtain the adaptability value.

3. The self-adapting regulation system based on scanning gun according to claim 2, characterized in that, The size deviation value is acquired by: The length difference value of the scanning qualified area is obtained by subtracting the diameter length of the scanning qualified area from the diagonal length of the barcode area; The size offset value is obtained by dividing the length difference value of the scanning qualified area by the diagonal length of the barcode area.

4. The self-adapting regulation system based on scanning gun according to claim 3, characterized in that, The midpoint offset value is obtained by: The region midpoint distance difference value is obtained by measuring the distance between the center point of the scanning qualified area and the center point of the barcode area; The length offset value is obtained by dividing the region midpoint distance difference value by the diagonal length of the barcode area; The angle offset value is obtained by measuring the deviation angle between the center point of the scanning qualified area and the reference point, calculating the sine value of the deviation angle, and marking it as the angle offset value; The midpoint offset value is obtained by multiplying the length offset value and the angle offset value.

5. The self-adapting regulation system based on scanning gun according to claim 4, characterized in that, The measurement standard of the deviation angle is: The angle measurement line is obtained by connecting the center point of the scanning qualified area and the origin, obtaining the included angle between the angle measurement line and the nearest X-axis and Y-axis, and obtaining the X-axis included angle and the Y-axis included angle. The minimum included angle is marked as the deviation angle.

6. The self-adapting regulation system based on scanning gun according to claim 5, characterized in that, The light intensity reservation value is obtained by: The light intensity control difference value is obtained by subtracting the maximum value of the light intensity range required for barcode recognition from the maximum value of the light intensity; The light intensity reservation value is obtained by dividing the light intensity control difference value by the maximum value of the light intensity range.

7. The self-adapting regulation system based on a scanning gun according to claim 6, characterized in that, The control process is: The light source intensity after control is obtained by summing the first light source intensity control value QT1 and the current light intensity QY; The light source intensity after control is compared with the light intensity range required for barcode recognition; If the light source intensity after control is within the light intensity range required for barcode recognition, the light of the barcode is automatically compensated according to the light source intensity after control.

8. The self-adapting regulation system based on a scanning gun according to claim 7, characterized in that, The light source intensity after control is obtained by summing the second light source intensity control value QT2 and the current light intensity QY; The light source intensity after control is compared with the light intensity range required for barcode recognition; If the light source intensity after control is within the light intensity range required for barcode recognition, the center point of the scanning qualified area is aligned with the center point of the barcode area, and the light of the barcode is automatically compensated according to the light source intensity after control.

Citation Information

Patent Citations

  • Photoelectric encoder real-time light intensity detection device

    CN110160644A

  • Plane local area illumination control method and device

    CN114517908A