Self-adaptive regulation and control system based on scanning gun
Patent Information
- Application Number
- CN202411159270.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-06-25
Smart Images

Figure CN118862913A_ABST
Abstract
Description
[0001] This divisional application is a divisional application of the Chinese patent application with application date of June 25, 2024, application number 2024108273123, and invention name “Adaptive control method, system, device and storage medium based on scanning gun”. Technical Field
[0002] The present invention relates to the technical field of scanning guns, and in particular to an adaptive control system based on scanning guns. Background Art
[0003] The scanner can read the product information such as price, name, and item number by scanning the product graphic code. When the scanning light intensity of the scanner is weak, or the light intensity in the environment is too weak, the amount of light transmitted from the graphic code to the lens of the scanning device is weak, thereby reducing the success rate of scanning the graphic code.
[0004] In the prior art, when a scanner is scanning a barcode, if the intensity of light from the light source incident on the barcode area does not meet the scanning requirements, it will be difficult for the scanner to complete the scanning work more efficiently. Based on this situation, it is currently difficult to analyze and judge the conditions of the barcode area and the light source area, complete the adaptive adjustment of the light source in the barcode area, and ensure the normal operation of the scanner. Summary of the invention
[0005] The purpose of the present invention is to provide an adaptive control method, system, device and storage medium based on a scanner. The technical problem solved by the present invention is: it is currently difficult to analyze and judge the conditions of the barcode area and the light source area, complete the adaptive adjustment of the light source in the barcode area, and ensure the normal operation of the scanner.
[0006] The purpose of the present invention can be achieved through the following technical solutions: An adaptive control method based on a scanner gun comprises the following steps: Step 1: Obtain the light intensity of the light source incident on the barcode area and determine the qualified scanning area; Step 2: Based on the scanned qualified area, the light source sufficiency value is output by comparing it with the barcode area, and a signal is generated to determine whether the light source area is normal; The light source sufficiency value is calculated by the ratio of the area of the overlapped area to the area of the barcode area; 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; The light stability value is obtained by adding the abnormal number ratio and the minimum value of the abnormal interval distribution.
[0007] As a further solution of the present invention: in step 1, the process of determining the scan qualified area is: Extract qualified light intensity, and mark the position point corresponding to the qualified light intensity as the edge point of the scanning area; Draw lines to connect the edge points of the scan area to obtain the scanned qualified area.
[0008] As a further solution of the present invention: the process of determining the qualified light intensity is: If the light intensity is within the light intensity range required for barcode recognition, the light intensity is marked as qualified light intensity.
[0009] As a further solution of the present invention: in step 2, if the light source sufficiency value is greater than or equal to the light source sufficiency threshold, a light source area normal signal is generated; If the light source sufficiency value is less than the light source sufficiency threshold, a light source area abnormality signal is generated.
[0010] As a further solution of the present invention: the process of obtaining the overlapping area is: The scanned qualified area is overlapped and compared with the barcode area to obtain the overlap area.
[0011] As a further solution of the present invention: in step 3, if the light stability value is greater than or equal to the light stability threshold, a scanning working signal is generated; If the light stability value is less than the light stability threshold, a scan adaptation signal is generated.
[0012] As a further solution of the present invention: the process of obtaining the abnormal number ratio value is: The scanning time is divided into n collection nodes, and the signal of whether the light source area of each collection node is normal is obtained. The number of abnormal signals in the light source area is counted, and the ratio of the number of abnormal signals in the light source area to the total number of collection nodes is calculated to obtain the ratio of the number of abnormalities.
[0013] As a further solution of the present invention: the process of obtaining the minimum value of the abnormal interval distribution is: The time interval between abnormal signals in adjacent light source areas is obtained, marked as adjacent abnormal signal interval, the minimum value of adjacent abnormal signal interval is extracted, and the minimum value of adjacent abnormal signal interval is calculated by ratio between the minimum value of adjacent abnormal signal interval and the scanning time to obtain the minimum value of abnormal interval distribution.
[0014] As a further solution of the present invention: the following steps are also included: 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, the size offset value and the midpoint offset value are summed up to obtain the total deviation value, and then the light intensity reserve value is ratio-calculated to the total deviation value to obtain the adaptability value; If the adaptability value is greater than or equal to the adaptability threshold, a light source easy-to-regulate signal is generated; If the adaptability value is less than the adaptability threshold, a light source difficult to control signal is generated.
[0015] As a further solution of the present invention: the process of obtaining the size offset value is: The difference between the diameter length of the scanned qualified area and the diagonal length of the barcode area is calculated to obtain the length difference of the scanned qualified area; The length difference of the scanned qualified area is calculated by ratio with the diagonal length of the barcode area to obtain the size offset value.
[0016] As a further solution of the present invention: the process of obtaining the midpoint offset value is: Measure the distance between the center point of the scanned qualified area and the center point of the barcode area to obtain the difference in the distance between the center points of the areas; Calculate the ratio of the midpoint distance difference in the area to the diagonal length of the barcode area to obtain the length offset value; Taking the center point of the barcode area as the reference point, measure the deviation angle between the center point of the scanned qualified area and the reference point, calculate the sine value of the deviation angle, and mark it as the angle offset value; The length offset value is multiplied by the angle offset value to obtain the midpoint offset value.
[0017] As a further solution of the present invention: the process of obtaining the light intensity reserved value is: The maximum light intensity is calculated as a difference between the maximum light intensity and the maximum light intensity range required for barcode recognition to obtain the light intensity control difference; The light intensity reserve value is obtained by calculating the ratio of the light intensity control difference to the maximum value of the light intensity range.
[0018] As a further solution of the present invention: the following steps are also included: Step 5: Based on the light source easy-to-regulate signal, obtain the light source intensity control value, and regulate the light source incident on the barcode area; The light source intensity control value includes a first light source intensity control value QT1 and a second light source intensity control value QT2.
[0019] As a further solution of the present invention: the process of obtaining the first light source intensity control value QT1 is: Get the center point of the scanned qualified area, measure the maximum value of the distance between the boundary points of the barcode area and the center point of the scanned qualified area, and mark it as the maximum value of the center-boundary point distance; The difference between the maximum value of the distance between the center boundary point and the radius of the scanned qualified area is calculated to obtain the first scanned qualified area expansion value, which is marked as RK1; Then obtain the illumination intensity of the light source corresponding to the current scanned qualified area and the radius of the scanned qualified area, marked as QY and RQ respectively; By formula , calculate and obtain the first light source intensity control value QT1.
[0020] As a further solution of the present invention: the process of regulating and treating is: The first light source intensity control value QT1 is added to the current light intensity QY to obtain the actual light source intensity of the light source after control; Compare the actual working light intensity of the light source after adjustment with the light intensity range required for barcode recognition; If the actual working light intensity of the adjusted light source is within the light intensity range required for barcode recognition, the light of the barcode is automatically compensated according to the actual working light intensity of the adjusted light source.
[0021] As a further solution of the present invention: the process of obtaining the second light source intensity control value QT2 is: If the actual working light intensity of the light source after adjustment is not within the light intensity range required for barcode recognition, obtain the radius of the scanned qualified area and the length of half the diagonal of the barcode area, and perform difference calculation to obtain the diameter expansion value of the second scanned qualified area, marked as RK2; Then obtain the illumination intensity of the light source corresponding to the current scanned qualified area and the radius of the scanned qualified area, marked as QY and RQ respectively; By formula , calculate and obtain the second light source intensity control value QT2.
[0022] As a further solution of the present invention: the second light source intensity control value QT2 is summed with the current light intensity QY to obtain the actual working light source intensity of the light source after control; Compare the actual working light intensity of the light source after adjustment with the light intensity range required for barcode recognition; If the actual working intensity of the light source after adjustment is within the light intensity range required for barcode recognition, align the center point of the qualified scanning area with the center point of the barcode area, and then automatically compensate the light of the barcode according to the actual working intensity of the light source after adjustment.
[0023] An adaptive control system based on a scanner, the system comprising: Area determination module: obtains the light intensity of the light source incident on the barcode area and determines the qualified scanning area; Sufficient judgment module: Based on the scanned qualified area, it compares and judges with the barcode area, outputs the light source sufficiency value, and generates a signal whether the light source area is normal; The light source sufficiency value is calculated by the ratio of the area of the overlapped area to the area of the barcode area; Stability judgment module: Based on the normal signal of the light source area, obtain the stability value of the light incident on the barcode area, and judge whether to perform barcode scanning; The light stability value is obtained by adding the abnormal number ratio and the minimum value of the abnormal interval distribution.
[0024] As a further solution of the present invention: also include: Adaptability judgment module: when an abnormal signal of the light source area is obtained, the size offset value, the midpoint offset value and the light intensity reserved value are obtained, and the size offset value, the midpoint offset value and the light intensity reserved value are summed to calculate the adaptability value; If the adaptability value is greater than or equal to the adaptability threshold, a light source easy-to-regulate signal is generated; If the adaptability value is less than the adaptability threshold, a light source difficult to control signal is generated.
[0025] Adaptive control module: Based on the light source easy-to-control signal, obtain the light source intensity control value and control the light source incident to the barcode area; The light source intensity control value includes a first light source intensity control value QT1 and a second light source intensity control value QT2.
[0026] A storage medium stores a computer software program, which implements the above-mentioned adaptive control method when executed by a processor.
[0027] A device comprising: Memory for storing computer software programs; The processor is used to read and execute the computer software program to implement the above-mentioned adaptive control method.
[0028] Beneficial effects of the present invention: 1. The present invention obtains the light intensity of the light source incident on the barcode area and determines the qualified scanning area; based on the qualified scanning area, by comparing and judging with the barcode area, outputs the light source sufficiency value and generates a signal whether the light source area is normal; based on the abnormal signal of the light source area, obtains the light stability value of the light source incident on the barcode area to judge whether to perform the barcode scanning work; the present invention performs regional judgment analysis and then light stability analysis on the light source data when the scanner is to be identified and scanned, so that the scanner can complete the operation work in accordance with the scanning requirements under the three conditions of light intensity, area and fluctuation, thereby improving the accuracy of the scanner scanning work; 2. Based on the abnormal signal of the light source area, the present invention obtains the adaptability value, evaluates the light adaptability adjustment ability, and generates an adaptability level signal; the present invention judges the degree of deviation of the scanned qualified area from the aspects of size and position, and judges the difficulty of subsequent re-adjustment of the light conditions of the barcode according to the magnitude of the deviation; the corresponding adjustment work can be completed according to the adaptability level signal generated by it to ensure the normal operation of the subsequent scanner; 3. The present invention obtains the light source intensity control value based on the light source easy-to-control signal, and controls the light source incident on the barcode area; the present invention can adjust the light source intensity without moving the light source by analyzing the current light source, so as to meet the barcode's demand for light, complete the automatic compensation of the barcode light, and realize the normal scanning of the scanner; the present invention can also adjust the light source intensity while moving the light source, so as to meet the barcode's demand for light, complete the automatic compensation of the barcode light, and realize the normal scanning of the scanner, and adaptively adjust the light source in the barcode area. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The present invention will be further described below in conjunction with the accompanying drawings.
[0030] Figure 1 is a flowchart of an adaptive control method based on a scanner provided in Example 1 of the present invention; Figure 2 is a flowchart of an adaptive control method based on a scanner provided in Embodiment 2 of the present invention; Figure 3 is a flowchart of an adaptive control method based on a scanner provided in Embodiment 3 of the present invention; Figure 4 is a system block diagram of an adaptive control system based on a scanner provided in Embodiment 4 of the present invention; Figure 5 is a system block diagram of an adaptive control device based on a scanner provided in Embodiment 5 of the present invention; Figure 6 It is a system block diagram of a storage medium of an adaptive control method based on a scanning gun provided in Example 6 of the present invention. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention. Example 1
[0032] See also Figure 1 As shown, the present invention is an adaptive control method based on a scanner, which is suitable for a scenario where a ring light source is used to illuminate a barcode and a scanner is used to read barcode information, and includes the following steps: Step 1: Obtain the light intensity of the light source incident on the barcode area and determine the qualified scanning area; 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 scanned qualified area; Then, 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; Draw lines to connect the edge points of the scan area to obtain a closed scan qualified area; Specifically, the process of determining the qualified light intensity is as follows: Compare the acquired light intensity with the light intensity range required for barcode recognition; If the light intensity is within the light intensity range required for barcode recognition, it means that the light intensity meets the requirements for barcode scanning and recognition, and the light intensity is marked as qualified light intensity; If the light intensity 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 the light intensity is marked as unqualified light intensity; Among them, the light intensity can be detected by a photosensor; Step 2: Based on the scanned qualified area, the light source sufficiency value is output by comparing it with the barcode area, and a signal is generated to determine whether the light source area is normal; Wherein, whether the light source area is normal signal includes a light source area normal signal or a light source area abnormal signal; In some embodiments, the scanned qualified area is overlapped and compared with the barcode area to obtain an overlap area; Obtain the area of the overlapped area and the area of the barcode area, calculate the ratio of the area of the overlapped area to the area of the barcode area, and obtain the light source sufficiency value; comparing the light sufficiency value with a light sufficiency threshold; If the light source sufficiency value is greater than or equal to the light source sufficiency threshold, it means that the light source in the scanning qualified area can fully cover the barcode, so that the barcode can be scanned normally within the light source range conditions, and a light source area normal signal is generated; If the light source sufficiency value is less than the light source sufficiency threshold, it means that the light source in the scanning qualified area cannot fully cover the barcode, so that the barcode cannot be scanned normally within the light source range conditions, and a light source area abnormality signal is generated; For example, the light source sufficient threshold value is greater than or equal to 1, and can be 1, 1.2, etc.; 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; In some embodiments, when a normal signal of the light source area is obtained, a light stability value is obtained; comparing the light stability value to a light stability threshold; If the light stability value is greater than or equal to the light stability threshold, it means that during the scanning time, the light incident on the barcode area has greater stability within the area and under time fluctuations, and meets the conditions for the barcode to be recognized by the scanner, then a scanning work signal is generated; If the light stability value is less than the light stability threshold, it means that during the scanning time, the light incident on the barcode area has a small stability performance within the area and under time fluctuations, which does not meet the conditions for the barcode to be recognized by the scanner, and a scanning adaptation signal is generated; Furthermore, the process of obtaining the light stability value is as follows: The light stability value is obtained by adding the abnormal number ratio and the minimum value of the abnormal interval distribution. Furthermore, the scanning time is divided into n acquisition nodes, and the signal of whether the light source area of each acquisition node is normal is obtained, and the number of abnormal signals in the light source area is counted, and the ratio of the number of abnormal signals in the light source area to the total number of acquisition nodes is calculated to obtain the ratio of the number of abnormalities; The time interval between abnormal signals in adjacent light source areas is obtained, marked as adjacent abnormal signal interval, the minimum value of the adjacent abnormal signal interval is extracted, and the ratio of the minimum value of the adjacent abnormal signal interval to the scanning time is calculated to obtain the minimum value of the abnormal interval distribution; It should be explained that the light stability value is calculated by the ratio of the number of abnormal signals in the light source area during the entire scanning time and the interval ratio. The larger the light stability value, the greater the probability of abnormal conditions in the qualified scanning area during the scanning time. The smaller the light stability value, the smaller the probability of abnormal conditions in the qualified scanning area during the scanning time. The larger the light stability value, the lower the accuracy of the scanning work of the scanner. Also, since the abnormal signal of the light source area is obtained based on the comparison and judgment of the light source intensity, its light stability value will also indicate the fluctuation of the light source intensity between qualified and unqualified during the scanning time. The smaller the light stability value, the smaller the fluctuation of the light source intensity during the scanning time, and the more stable it is. The larger the light stability value, the larger the fluctuation of the light source intensity during the scanning time, and the more unstable it is. The technical solution of the embodiment of the present invention is as follows: the intensity of light incident from a light source to a barcode area is obtained, and a qualified scanning area is determined; based on the qualified scanning area, a comparison is made with the barcode area to output a light source sufficiency value, and a signal is generated as to whether the light source area is normal; based on the abnormal signal of the light source area, a light stability value of light incident from the light source to the barcode area is obtained to determine whether a barcode scanning operation is to be performed; the present invention performs an area judgment analysis on the light source data when the scanner is scanning a code to be identified, and then performs a light stability analysis, so that the scanner operation is completed in accordance with the scanning requirements under the three conditions of light intensity, area, and fluctuation, thereby improving the accuracy of the scanner scanning operation. Example 2
[0033] See also Figure 2 As shown, the present invention is an adaptive control method based on a scanner, which is suitable for a scenario where a ring light source is used to illuminate a barcode and a scanner is used to read barcode information, and further includes the following steps: Step 4: Based on the abnormal signal of the light source area, obtain the adaptability value, evaluate the light applicability adjustment ability, and generate an adaptability level signal; The adaptability level signal includes a light source easy-to-regulate signal and a light source difficult-to-regulate signal; In some implementation schemes, when an abnormal signal of the light source area is obtained, the size offset value, the midpoint offset value and the light intensity reserve value are obtained, the size offset value and the midpoint offset value are summed to obtain a total deviation value, and then the light intensity reserve value is ratio-calculated to the total deviation value to obtain an adaptability value; comparing the adaptive capacity value to an adaptive capacity threshold; If the adaptability value is greater than or equal to the adaptability threshold, a light source easy-to-regulate signal is generated; If the adaptability value is less than the adaptability threshold, a signal indicating that the light source is not easily regulated is generated; It needs to be explained that the adaptability value indicates the offset between the scan-qualified area and the barcode area in size and position. The larger the adaptability value, the greater the offset between the scan-qualified area and the barcode area. The smaller the adaptability value, the smaller the offset between the scan-qualified area and the barcode area. The greater the offset between the scan-qualified area and the barcode area, the greater the difficulty of subsequent light source regulation. When a signal that the light source is difficult to regulate is obtained, a different type of light source can be directly replaced. In addition, the adaptability value also indicates the difference between the current maximum light intensity and the light intensity range required for barcode recognition, that is, for the light source control space corresponding to the current scan qualified area, the larger the light intensity reserved value, the greater the ability to control through the light source, and the smaller the light intensity reserved value, the smaller the ability to control through the light source; Furthermore, the process of obtaining the size offset value is as follows: Obtain the diameter length of the scanned qualified area and the diagonal length of the barcode area, perform difference calculation on the diameter length of the scanned qualified area and the diagonal length of the barcode area, and obtain the length difference of the scanned qualified area; The length difference of the scanned qualified area is calculated by ratio with the diagonal length of the barcode area to obtain the size offset value; The process of obtaining the midpoint offset value is: Obtain the center point of the scanned qualified area and the center point of the barcode area, measure the distance between the center point of the scanned qualified area and the center point of the barcode area, and obtain the difference in the distance between the center points of the area; Calculate the ratio of the midpoint distance difference in the area to the diagonal length of the barcode area to obtain the length offset value; Taking the center point of the barcode area as the reference point, measure the deviation angle between the center point of the scanned qualified area and the reference point, calculate the sine value of the deviation angle, and mark it as the angle offset value; The length offset value is multiplied by the angle offset value to obtain the midpoint offset value; It is explained that the deviation angle ranges from 0 to 45°; The deviation angle is measured as follows: Take the center point of the barcode area as the origin, construct a two-dimensional coordinate line with the origin, connect the center point of the scanned qualified area with the origin, get the angle measurement line, obtain the angles between the angle measurement line and the nearest X-axis and Y-axis, get the X-axis angle and the Y-axis angle, compare the X-axis angle and the Y-axis angle, and mark the smallest angle as the deviation angle; The process of obtaining the light intensity reserve value is as follows: Obtain the current maximum light intensity and the light intensity range required for barcode recognition, calculate the difference between the maximum light intensity and the maximum light intensity range required for barcode recognition, and obtain the light intensity control difference; Calculate the ratio of the light intensity control difference to the maximum value of the light intensity range to obtain the light intensity reserve value; The technical solution of the embodiment of the present invention is as follows: based on the abnormal signal of the light source area, an adaptability value is obtained, the light adaptability adjustment ability is evaluated, and an adaptability level signal is generated; the present invention judges the degree of deviation of the scanned qualified area in terms of size and position, and judges the difficulty of subsequent re-adjustment of the light conditions of the barcode according to the magnitude of the deviation; the corresponding adjustment work can be completed according to the adaptability level signal generated to ensure the normal operation of the subsequent scanning gun. Example 3
[0034] See also Figure 3As shown, the present invention is an adaptive control method based on a scanner, which is suitable for a scenario where a ring light source is used to illuminate a barcode and a scanner is used to read barcode information, and further includes the following steps: Step 5: Based on the light source easy-to-regulate signal, obtain the light source intensity control value, and regulate the light source incident on the barcode area; In some embodiments, when a light source easy-to-regulate signal is obtained, the center point of the scanned qualified area is obtained, and the maximum value of the distance between the boundary points of the barcode area and the center point of the scanned qualified area is measured, and marked as the maximum value of the center-boundary point distance; The difference between the maximum value of the distance between the center boundary point and the radius of the scanned qualified area is calculated to obtain the first scanned qualified area expansion value, which is marked as RK1; Then obtain the illumination intensity of the light source corresponding to the current scanned qualified area and the radius of the scanned qualified area, marked as QY and RQ respectively; By formula , calculate and obtain the first light source intensity control value QT1; Based on the first light source intensity control value QT1 obtained in the above implementation scheme, the first light source intensity control value QT1 is summed with the current light intensity QY to obtain the actual working light source intensity of the light source after control; Compare the actual working light intensity of the light source after adjustment with the light intensity range required for barcode recognition; 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 the light intensity after adjustment meets the requirements for barcode scanning and recognition without moving the light source position. The light of the barcode is automatically compensated according to the actual working light intensity of the light source after adjustment. In other embodiments, if the actual working light intensity of the light source after adjustment is not within the light intensity range required for barcode recognition, the radius of the scanned qualified area and the length of half the diagonal of the barcode area are obtained, and the difference is calculated to obtain the diameter expansion value of the second scanned qualified area, which is marked as RK2; Then obtain the illumination intensity of the light source corresponding to the current scanned qualified area and the radius of the scanned qualified area, marked as QY and RQ respectively; By formula , calculate and obtain the second light source intensity control value QT2; Based on the second light source intensity control value QT2 obtained in the above implementation scheme, the second light source intensity control value QT2 is summed with the current light intensity QY to obtain the actual working light source intensity of the light source after control; Compare the actual working light intensity of the light source after adjustment with the light intensity range required for barcode recognition; 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, the center point of the scanned qualified area can be aligned with the center point of the barcode area by moving the light source, and then the light of the barcode can be automatically compensated according to the actual working light intensity of the light source after adjustment; 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; The technical solution of the embodiment of the present invention is as follows: based on the light source easy-to-regulate signal, the light source intensity regulation value is obtained, and the light source incident on the barcode area is regulated and processed; by analyzing the current light source, the present invention can regulate the light source intensity without moving the light source, meet the barcode's demand for light, complete the automatic compensation of the barcode light, and realize the normal scanning of the scanner; the light source intensity can also be regulated while moving the light source, meet the barcode's demand for light, complete the automatic compensation of the barcode light, and realize the normal scanning of the scanner, and adaptively adjust the light source in the barcode area. Example 4
[0035] See also Figure 4 As shown, the present invention is an adaptive control system based on a scanner, which is suitable for a scenario where a ring light source is used to illuminate a barcode and a scanner is used to read barcode information, including: Area determination module: obtains the light intensity of the light source incident on the barcode area and determines the qualified scanning area; Specifically, 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 scanned qualified area; Then, 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; Draw lines to connect the edge points of the scan area to obtain a closed scan qualified area; Specifically, the process of determining the qualified light intensity is as follows: Compare the acquired light intensity with the light intensity range required for barcode recognition; If the light intensity is within the light intensity range required for barcode recognition, it means that the light intensity meets the requirements for barcode scanning and recognition, and the light intensity is marked as qualified light intensity; If the light intensity 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 the light intensity is marked as unqualified light intensity; Sufficient judgment module: Based on the scanned qualified area, it compares and judges with the barcode area, outputs the light source sufficiency value, and generates a signal whether the light source area is normal; The light source sufficiency value is calculated by the ratio of the area of the overlapped area to the area of the barcode area; Specifically, the scanned qualified area is overlapped and compared with the barcode area to obtain the overlap area; Obtain the area of the overlapped area and the area of the barcode area, calculate the ratio of the area of the overlapped area to the area of the barcode area, and obtain the light source sufficiency value; comparing the light sufficiency value with a light sufficiency threshold; If the light source sufficiency value is greater than or equal to the light source sufficiency threshold, it means that the light source in the scanning qualified area can fully cover the barcode, so that the barcode can be scanned normally within the light source range conditions, and a light source area normal signal is generated; If the light source sufficiency value is less than the light source sufficiency threshold, it means that the light source in the scanning qualified area cannot fully cover the barcode, so that the barcode cannot be scanned normally within the light source range conditions, and a light source area abnormality signal is generated; Stability judgment module: Based on the normal signal of the light source area, obtain the stability value of the light incident on the barcode area, and judge whether to perform barcode scanning; Among them, the light stability value is obtained by adding the abnormal number ratio and the minimum value of the abnormal interval distribution; Specifically, when a normal signal of the light source area is obtained, a light stability value is obtained; comparing the light stability value to a light stability threshold; If the light stability value is greater than or equal to the light stability threshold, it means that during the scanning time, the light incident on the barcode area has greater stability within the area and under time fluctuations, and meets the conditions for the barcode to be recognized by the scanner, then a scanning work signal is generated; If the light stability value is less than the light stability threshold, it means that during the scanning time, the light incident on the barcode area has a small stability performance within the area and under time fluctuations, which does not meet the conditions for the barcode to be recognized by the scanner, and a scanning adaptation signal is generated; Adaptability judgment module: when an abnormal signal is obtained in the light source area, the size offset value, midpoint offset value and light intensity reserve value are obtained, the size offset value and midpoint offset value are summed up to obtain the total deviation value, and then the light intensity reserve value is ratio-calculated to the total deviation value to obtain the adaptability value; comparing the adaptive capacity value to an adaptive capacity threshold; If the adaptability value is greater than or equal to the adaptability threshold, a light source easy-to-regulate signal is generated; If the adaptability value is less than the adaptability threshold, a light source difficult to control signal is generated.
[0036] Adaptive control module: Based on the light source easy-to-control signal, obtain the light source intensity control value and control the light source incident to the barcode area; The light source intensity control value includes a first light source intensity control value QT1 and a second light source intensity control value QT2; Specifically, when a light source easy-to-regulate signal is obtained, the center point of the scanned qualified area is obtained, and the maximum value of the distance between the boundary point of the barcode area and the center point of the scanned qualified area is measured, and marked as the maximum value of the center-boundary point distance; The difference between the maximum value of the distance between the center boundary point and the radius of the scanned qualified area is calculated to obtain the first scanned qualified area expansion value, which is marked as RK1; Then obtain the illumination intensity of the light source corresponding to the current scanned qualified area and the radius of the scanned qualified area, marked as QY and RQ respectively; By formula , calculate and obtain the first light source intensity control value QT1; Based on the first light source intensity control value QT1 obtained in the above implementation scheme, the first light source intensity control value QT1 is summed with the current light intensity QY to obtain the actual working light source intensity of the light source after control; Compare the actual working light intensity of the light source after adjustment with the light intensity range required for barcode recognition; 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 the light intensity after adjustment meets the requirements for barcode scanning and recognition without moving the light source position. The light of the barcode is automatically compensated according to the actual working light intensity of the light source after adjustment. More specifically, if the actual working light intensity of the light source after adjustment is not within the light intensity range required for barcode recognition, the radius of the scanned qualified area and the length of half the diagonal of the barcode area are obtained, and the difference is calculated to obtain the diameter expansion value of the second scanned qualified area, which is marked as RK2; Then obtain the illumination intensity of the light source corresponding to the current scanned qualified area and the radius of the scanned qualified area, marked as QY and RQ respectively; By formula , calculate and obtain the second light source intensity control value QT2; Based on the second light source intensity control value QT2 obtained in the above implementation scheme, the second light source intensity control value QT2 is summed with the current light intensity QY to obtain the actual working light source intensity of the light source after control; Compare the actual working light intensity of the light source after adjustment with the light intensity range required for barcode recognition; 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, the center point of the scanned qualified area can be aligned with the center point of the barcode area by moving the light source, and then the light of the barcode can be automatically compensated according to the actual working light intensity of the light source after adjustment; If the actual working light 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
[0037] 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 a device 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: Step 1: Obtain the light intensity of the light source incident on the barcode area and determine the qualified scanning area; Step 2: Based on the scanned qualified area, the light source sufficiency value is output by comparing it with the barcode area, and a signal is generated to determine whether the light source area is normal; The light source sufficiency value is calculated by the ratio of the area of the overlapped area to the area of the barcode area; 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; Among them, the light stability value is obtained by adding the abnormal number ratio and the minimum value of the abnormal interval distribution; Step 4: When an abnormal signal of the light source area is obtained, 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; If the adaptability value is greater than or equal to the adaptability threshold, a light source easy-to-regulate signal is generated; If the adaptability value is less than the adaptability threshold, a signal indicating that the light source is not easily regulated is generated; Step 5: Based on the light source easy-to-regulate signal, obtain the light source intensity control value, and regulate the light source incident on the barcode area; The light source intensity control value includes a first light source intensity control value QT1 and a second light source intensity control value QT2. Example 6
[0038] See also Figure 6, Figure 6 A schematic diagram of an embodiment of a computer-readable storage medium provided in an embodiment of the present invention. Figure 6 As shown, this embodiment provides a computer-readable storage medium 600, on which a computer program 611 is stored. When the computer program 611 is executed by a processor, the following steps are implemented: Step 1: Obtain the light intensity of the light source incident on the barcode area and determine the qualified scanning area; Step 2: Based on the scanned qualified area, the light source sufficiency value is output by comparing it with the barcode area, and a signal is generated to determine whether the light source area is normal; The light source sufficiency value is calculated by the ratio of the area of the overlapped area to the area of the barcode area; 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; Among them, the light stability value is obtained by adding the abnormal number ratio and the minimum value of the abnormal interval distribution; Step 4: When an abnormal signal of the light source area is obtained, 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; If the adaptability value is greater than or equal to the adaptability threshold, a light source easy-to-regulate signal is generated; If the adaptability value is less than the adaptability threshold, a signal indicating that the light source is not easily regulated is generated; Step 5: Based on the light source easy-to-regulate signal, obtain the light source intensity control value, and regulate the light source incident on the barcode area; The light source intensity control value includes a first light source intensity control value QT1 and a second light source intensity control value QT2.
[0039] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0040] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0041] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0042] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0043] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0044] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0045] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. An adaptive control system based on a scanner, characterized in that: include: Area determination module: obtains the light intensity of the light source incident on the barcode area and determines the qualified scanning area; Sufficient judgment module: Based on the scanned qualified area, it compares and judges with the barcode area, outputs the light source sufficiency value, and generates a signal whether the light source area is normal; Wherein, whether the light source area is normal signal includes a light source area normal signal or a light source area abnormal signal; Stability judgment module: Based on the normal signal of the light source area, obtain the stability value of the light incident on the barcode area, and judge whether to perform barcode scanning; Adaptability judgment module: Based on the abnormal signal of the light source area, obtain the adaptability value, evaluate the light applicability adjustment ability, and generate an adaptability level signal; The adaptability level signal includes a light source easy-to-regulate signal and a light source difficult-to-regulate signal; The adaptability value indicates the offset between the qualified scanning area and the barcode area in size and position. The larger the adaptability value, the greater the offset between the qualified scanning area and the barcode area. The smaller the adaptability value, the smaller the offset between the qualified scanning area and the barcode area. The greater the offset between the qualified scanning area and the barcode area, the greater the difficulty of subsequent light source control. In addition, the adaptability value also indicates the difference between the current maximum light intensity and the light intensity range required for barcode recognition, that is, for the light source control space corresponding to the current scan qualified area, the larger the light intensity reserved value, the greater the ability to control through the light source, and the smaller the light intensity reserved value, the smaller the ability to control through the light source; Adaptive control module: Based on the light source easy-to-control signal, obtain the light source intensity control value and control the light source incident to the barcode area; The light source intensity control value includes a first light source intensity control value QT1 and a second light source intensity control value QT2.
2. The adaptive control system based on a scanner gun according to claim 1, characterized in that: The size offset value, the midpoint offset value and the light intensity reserve value are obtained, and the size offset value and the midpoint offset value are summed up to obtain the total deviation value. Then, the light intensity reserve value is ratio-calculated with the total deviation value to obtain the adaptability value.
3. The adaptive control system based on a scanner gun according to claim 2, characterized in that: The process of obtaining the size offset value is as follows: The difference between the diameter length of the scanned qualified area and the diagonal length of the barcode area is calculated to obtain the length difference of the scanned qualified area; The length difference of the scanned qualified area is calculated by ratio with the diagonal length of the barcode area to obtain the size offset value.
4. The adaptive control system based on a scanner according to claim 3 is characterized in that: The process of obtaining the midpoint offset value is: Measure the distance between the center point of the scanned qualified area and the center point of the barcode area to obtain the difference in the distance between the center points of the areas; Calculate the ratio of the midpoint distance difference in the area to the diagonal length of the barcode area to obtain the length offset value; Taking the center point of the barcode area as the reference point, measure the deviation angle between the center point of the scanned qualified area and the reference point, calculate the sine value of the deviation angle, and mark it as the angle offset value; The length offset value is multiplied by the angle offset value to obtain the midpoint offset value.
5. The adaptive control system based on a scanner gun according to claim 4, characterized in that: The deviation angle is measured as follows: Take the center point of the barcode area as the origin, construct a two-dimensional coordinate line with the origin, connect the center point of the scanned qualified area with the origin, get the angle measurement line, obtain the angle between the angle measurement line and the nearest X-axis and Y-axis, get the X-axis angle and Y-axis angle, compare the X-axis angle and the Y-axis angle, and mark the smallest angle as the deviation angle.
6. The adaptive control system based on a scanner gun according to claim 5, characterized in that: The process of obtaining the light intensity reserve value is as follows: The maximum light intensity is calculated as a difference between the maximum light intensity and the maximum light intensity range required for barcode recognition to obtain the light intensity control difference; The light intensity reserve value is obtained by calculating the ratio of the light intensity control difference to the maximum value of the light intensity range.
7. The adaptive control system based on a scanner gun according to claim 1, characterized in that: The process of obtaining the first light source intensity control value QT1 is as follows: Get the center point of the scanned qualified area, measure the maximum value of the distance between the boundary points of the barcode area and the center point of the scanned qualified area, and mark it as the maximum value of the center-boundary point distance; The difference between the maximum value of the center boundary point distance and the radius of the scanned qualified area is calculated to obtain the first scanned qualified area diameter expansion value, which is marked as RK1; Then obtain the illumination intensity of the light source corresponding to the current scanned qualified area and the radius of the scanned qualified area, marked as QY and RQ respectively; By formula , calculate and obtain the first light source intensity control value QT1.
8. The adaptive control system based on a scanner gun according to claim 7, characterized in that: The process of regulation and processing is: The first light source intensity control value QT1 is added to the current light intensity QY to obtain the actual light source intensity of the light source after control; Compare the actual working light intensity of the light source after adjustment with the light intensity range required for barcode recognition; If the actual working light intensity of the adjusted light source is within the light intensity range required for barcode recognition, the light of the barcode is automatically compensated according to the actual working light intensity of the adjusted light source.
9. The adaptive control system based on a scanner gun according to claim 8, characterized in that: The process of obtaining the second light source intensity control value QT2 is as follows: If the actual working light intensity of the light source after adjustment is not within the light intensity range required for barcode recognition, obtain the radius of the scanned qualified area and the length of half the diagonal of the barcode area, and perform difference calculation to obtain the diameter expansion value of the second scanned qualified area, marked as RK2; Then obtain the illumination intensity of the light source corresponding to the current scanned qualified area and the radius of the scanned qualified area, marked as QY and RQ respectively; By formula , calculate and obtain the second light source intensity control value QT2.
10. The adaptive control system based on a scanner gun according to claim 9, characterized in that: The second light source intensity control value QT2 is added to the current light intensity QY to obtain the actual light source intensity of the light source after control; Compare the actual working light intensity of the light source after adjustment with the light intensity range required for barcode recognition; If the actual working intensity of the light source after adjustment is within the light intensity range required for barcode recognition, align the center point of the qualified scanning area with the center point of the barcode area, and then automatically compensate the light of the barcode according to the actual working intensity of the light source after adjustment.
Citation Information
Patent Citations
Photoelectric encoder real-time light intensity detection device
CN110160644A
Plane local area illumination control method and device
CN114517908A
Data processing method and device based on scanning gun
CN117708180A
The bar code reader and high-speed extraction systemof bar code locating, the control method of this system
KR1020040057175A
Hand-supportable digital imaging-based bar code symbol reader supporting narrow-area and wide-area modes of illumination and image capture
US20050103854A1
Cited By
Method and system for performing adaptive modulation on basis of scanning gun, and apparatus and storage medium
WO2026000552A1
