Image brightness adjusting method and sorting machine
By automatically detecting differences in image brightness in the sorting machine and adjusting the light source, the image quality problems caused by light source attenuation and dust accumulation are solved, improving the recognition and sorting accuracy of the sorting machine and reducing the need for manual maintenance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING HONEST TECHNOLOGY CO LTD
- Filing Date
- 2025-10-11
- Publication Date
- 2026-05-12
AI Technical Summary
After long-term operation, the brightness of the light source of the sorting machine decreases, some lamp beads are damaged, or dust accumulates, resulting in insufficient or uneven image brightness, which affects image quality and sorting accuracy. Existing technology relies on manual inspection, which is inefficient and difficult to adjust effectively.
By acquiring the difference between the pixel values of each column of the observed image and the standard pixel values, the system automatically detects light source anomalies and adjusts the light source operating parameters or performs cleaning to ensure image brightness uniformity and clarity.
It enables rapid response and automatic adjustment to abnormal light sources, improves image quality, ensures the accuracy of identification and sorting by the sorting machine, and reduces labor costs and adjustment time.
Smart Images

Figure CN121280683B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of sorting equipment, specifically to an image brightness adjustment method and a sorting machine. Background Technology
[0002] During material sorting in a sorting machine, the surface images of the materials captured by a camera are used for identification and classification. During camera acquisition, the materials need to be illuminated by a light source to ensure clear and appropriately bright images. However, after prolonged operation, the light source in the sorting machine may experience overall brightness decay or damage to some LEDs, resulting in insufficient brightness in the captured images. Furthermore, dust and dirt can easily accumulate near the light source, blocking light and causing insufficient or uneven brightness in the captured images. This leads to low and uneven brightness in the images captured by the sorting machine, resulting in poor image quality and affecting the sorting accuracy and stability. Moreover, maintaining the light source is labor-intensive and inefficient, and the difficulty in adjusting image brightness further contributes to unstable image quality. Summary of the Invention
[0003] To overcome the problems existing in related technologies, an exemplary embodiment of this disclosure provides an image brightness adjustment method in a first aspect, applied to a sorting machine. The image brightness adjustment method includes: acquiring an observation image collected under a current light source; determining, based on the observation image, the observation pixel value of each column of pixels in the observation image; determining the brightness condition of the observation image based on the observation pixel value of each column of pixels and the corresponding standard pixel value; and, in response to the brightness condition of the observation image being abnormal, adjusting the current light source based on the detection result of the current light source to obtain a target image with normal brightness.
[0004] In some embodiments, determining the brightness of the observed image based on the observed pixel value and the corresponding standard pixel value of each column of pixels includes: determining the pixel difference between the observed pixel value and the corresponding standard pixel value of each column of pixels; and determining the brightness of the observed image based on the pixel difference of each column of pixels.
[0005] In some embodiments, determining the brightness of the observed image based on the pixel difference of each column of pixels includes: determining a maximum absolute value based on the absolute value of the pixel difference of each column of pixels; determining that the brightness of the observed image is normal in response to the maximum absolute value being less than a first threshold; and determining that the brightness of the observed image is abnormal in response to the maximum absolute value being greater than or equal to the first threshold.
[0006] In some embodiments, adjusting the current light source based on the detection result of the current light source to obtain a target image with normal brightness includes: determining the detection result of the current light source based on the pixel difference of each column of pixels; cleaning the surface of the current light source in response to the detection result of the current light source being normal to obtain a target image with normal brightness; and adjusting the operating parameters of the current light source in response to the detection result of the current light source being abnormal to obtain a target image with normal brightness.
[0007] In some embodiments, determining the detection result of the current light source based on the pixel difference of each column of pixels includes: determining an average gradient based on the gradient value of the pixel difference of each column of pixels; determining the detection result of the current light source as normal in response to the average gradient being less than or equal to a second threshold; and determining the detection result of the current light source as abnormal in response to the average gradient being greater than the second threshold.
[0008] In some embodiments, adjusting the operating parameters of the current light source in response to an abnormal detection result of the current light source to obtain a target image with normal brightness includes: determining the cause of the abnormality of the current light source based on the operating parameters of the current light source; adjusting the power of the abnormal light source based on a preset first mapping relationship between light source brightness and light source power and a first target brightness in response to the cause of the abnormality of the current light source being a local light bulb abnormality, to obtain a target image with normal brightness in response to a preset second mapping relationship between light source brightness and power and a second target brightness in response to the cause of the abnormality of the current light source being a complete light bulb abnormality, adjusting the current power of the current light source based on a preset second mapping relationship between light source brightness and power and a second target brightness in response to obtain a target image with normal brightness in response to the cause of the abnormality of the current light source.
[0009] In some embodiments, determining the cause of the anomaly of the current light source based on its operating parameters includes: performing additive anomaly detection on the LEDs in each region of the current light source to obtain LED detection results; and determining the cause of the anomaly of the current light source as a local LED anomaly in response to the LED detection results indicating that some LEDs are abnormal; or, determining the cause of the anomaly of the current light source as an all-LED anomaly in response to the absolute value of the difference between the first pixel average value and the second pixel average value of each column of pixels being greater than a third threshold, wherein the first pixel average value is determined based on the observed pixel values of each column of pixels, and the second pixel average value is determined based on the standard pixel values of each column of pixels.
[0010] In some embodiments, the step of adjusting the operating parameters of the current light source in response to an abnormal detection result of the current light source to obtain a target image with normal brightness further includes: in response to an abnormality of the current light source due to other reasons, adjusting the image brightness of the observed image based on the target image brightness to obtain a target image with normal brightness.
[0011] In some embodiments, adjusting the current light source based on the detection result of the current light source to obtain a target image with normal brightness includes: determining the operating state of the current light source based on the detection result of the current light source; determining the target cause of the abnormal brightness based on the operating state of the current light source; determining a target strategy based on a preset correspondence between abnormal causes and adjustment strategies and the target cause; and adjusting the current light source based on the target strategy to obtain a target image with normal brightness.
[0012] In some embodiments, the target cause includes any one or more of the following: the surface of the current light source has debris, some of the LEDs in the current light source are abnormal, all of the LEDs in the current light source are abnormal, or other causes.
[0013] In some embodiments, if the target cause is debris on the surface of the current light source, then based on the target strategy, the current light source is adjusted to obtain a target image with normal brightness, including: cleaning the surface of the current light source to obtain a target image with normal brightness; if the target cause is local LED abnormality in the current light source, then based on the target strategy, the current light source is adjusted to obtain a target image with normal brightness, including: adjusting the power of the abnormal LED based on a preset first mapping relationship between LED brightness and LED power and a first target brightness to obtain a target image with normal brightness; If the target cause is an abnormality in all the LEDs of the current light source, then based on the target strategy, the current light source is adjusted to obtain a target image with normal brightness, including: adjusting the current power of the current light source based on a preset second mapping relationship between light source brightness and power and a second target brightness to obtain a target image with normal brightness; if the target cause is another reason for the current light source, then based on the target strategy, the current light source is adjusted to obtain a target image with normal brightness, including: adjusting the image brightness of the observed image based on the target image brightness to obtain a target image with normal brightness.
[0014] Secondly, this disclosure also provides a sorting machine, the sorting machine comprising: a light source; an image acquisition module adjacent to the light source, configured to acquire an observation image acquired under the current light source; a calculation module, configured to determine the observation pixel value of each column of pixels in the observation image based on the observation image; and to determine the brightness of the observation image based on the observation pixel value of each column of pixels and the corresponding standard pixel value; and an adjustment module, configured to adjust the current light source based on the detection result of the current light source in response to the abnormal brightness of the observation image, so as to obtain a target image with normal brightness.
[0015] In some embodiments, the sorting machine further includes: a standard block; and a control mechanism for driving the standard block to move below the image acquisition position, so that the image acquisition module obtains the observed image through the standard block.
[0016] Thirdly, this disclosure also provides a computer-readable storage medium storing a program for performing the image brightness adjustment method described in any one of the first aspects.
[0017] According to the image brightness adjustment method provided in this disclosure, when the brightness of the acquired image is insufficient, it can more accurately and quickly determine abnormal conditions such as light source damage, insufficient brightness, or uneven brightness of the sorting machine. Based on these abnormal conditions, the light source can be adjusted, or the observed image can be adjusted in a timely manner, thereby effectively improving the brightness of the image acquired by the sorting machine, improving image quality, and further enhancing the accuracy of material identification and sorting. Simultaneously, it saves manpower, improves the response speed of image brightness adjustment, and increases the efficiency of image brightness adjustment. Attached Figure Description
[0018] This disclosure can be better understood by describing exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, in which:
[0019] Figure 1 This is a flowchart illustrating an image brightness adjustment method according to an exemplary embodiment of a publication;
[0020] Figure 2 This is a flowchart illustrating an image brightness adjustment method according to an exemplary embodiment of a publication;
[0021] Figure 3 This is a flowchart illustrating an image brightness adjustment method according to an exemplary embodiment of a publication;
[0022] Figure 4 This is a flowchart illustrating an image brightness adjustment method according to an exemplary embodiment of a publication;
[0023] Figure 5 This is a flowchart illustrating an image brightness adjustment method according to an exemplary embodiment of a publication;
[0024] Figure 6 This is a flowchart illustrating an image brightness adjustment method according to an exemplary embodiment of a publication;
[0025] Figure 7 This is a flowchart illustrating an image brightness adjustment method according to an exemplary embodiment of a publication;
[0026] Figure 8 This is a flowchart illustrating an image brightness adjustment method according to an exemplary embodiment of a publication;
[0027] Figure 9 This is a flowchart illustrating an image brightness adjustment method according to an exemplary embodiment of a publication;
[0028] Figure 10 This is a schematic diagram of a sorting machine structure shown according to an exemplary embodiment disclosed in a book;
[0029] Figure 11 This is a schematic diagram of an electronic device structure shown according to an exemplary embodiment disclosed in a publication. Detailed Implementation
[0030] The following describes specific embodiments of this disclosure. It should be noted that, in order to maintain brevity, this specification cannot provide a detailed description of all features of the actual embodiments. It should be understood that, in the actual implementation of any embodiment, just as in any engineering or design project, various specific decisions are often made to achieve the developer's specific goals and to meet system-related or business-related constraints, and this can change from one embodiment to another. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content of this disclosure, some design, manufacturing, or production modifications based on the technical content disclosed herein are merely conventional technical means and should not be construed as insufficient content of this disclosure.
[0031] Unless otherwise defined, the technical or scientific terms used in the claims and description shall have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms “first,” “second,” and similar terms used in the specification and claims of this patent application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. The terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the element or object preceding “comprising” or “including” encompasses the element or object listed following “comprising” or “including” and its equivalents, and do not exclude other elements or objects. The terms “connected” or “linked” and similar terms are not limited to physical or mechanical connections, nor are they limited to direct or indirect connections.
[0032] During the material identification and sorting process in a sorting machine, the materials need to be illuminated by a light source to facilitate image acquisition by an image acquisition device, thereby obtaining a clear image of the materials for accurate identification. During image acquisition, there are certain requirements for image brightness. Low image brightness easily leads to blurry images, making it difficult to identify details in the materials, resulting in identification errors and affecting the sorting accuracy of the machine. Furthermore, after long-term operation, the LEDs in the sorting machine's light source are prone to brightness decay, or damage to some LEDs, both of which can lead to insufficient overall or localized brightness in the image. Additionally, the sorting machine's working environment contains a lot of dust, which easily accumulates near the light source. Dust accumulated on the light source cover or camera surface can block light, resulting in low overall or localized brightness in the acquired image. Currently, the light source is generally inspected and maintained manually, which is labor-intensive and time-consuming, making it difficult to respond promptly to insufficient image brightness and affecting sorting accuracy. In addition, some current technologies use simple brightness compensation algorithms to correct the brightness of images acquired by sorting machines. However, this method can only adjust the overall brightness of the image. For cases where the image brightness is uneven due to dust, dirt, or damage to local LEDs, the brightness adjustment effect is poor, making it difficult to guarantee the overall uniformity and clarity of the image. This makes it difficult to guarantee the accuracy and stability of material identification and sorting.
[0033] To solve the above technical problems, such as Figure 1 As shown, an exemplary embodiment of this disclosure provides an image brightness adjustment method applied to a sorting machine, the image brightness adjustment method comprising steps S110 to S130.
[0034] Step S110: Acquire the observation image under the current light source. The observation image can be acquired using the current sorting machine under the current light source. The current light source is the light source set in the sorting machine to be inspected and adjusted.
[0035] Step S120: Based on the observed image, determine the observed pixel value for each column of pixels in the observed image. The observed image can be acquired using the current sorting machine. Based on the observed image, data for each column of pixels in the observed image is extracted, and the observed pixel value for each column is determined. The observed pixel value can be the grayscale mean, median, peak value, or brightness histogram integral, frequency domain energy, etc., of each column of pixels. A standard block can be set in the sorting machine. The surface of the standard block can be printed with a standard image. The image of the standard block can be acquired by the sorting machine as the observed image. Therefore, the area where the standard block is located in the observed image can be extracted and converted into a grayscale image. The grayscale mean or median of each column of data in the grayscale image is calculated separately, thus determining the observed pixel value. Alternatively, the sorting machine can also acquire an image of the surface of its conveyor device as the observed image. A portion of the image on the surface of the conveyor device is extracted, and this portion is converted into a grayscale image. The grayscale mean or median of each column of data is determined, thus determining the observed pixel value. Based on the observed pixel value, the brightness of each column of pixels in the observed image can be determined. When using standard block images as observation images, the image acquisition clarity is high. Therefore, when determining the observation pixel values based on the standard block images, subsequent image brightness detection and brightness adjustment of the image and light source can achieve high accuracy. Furthermore, when acquiring images from the surface of the sorting machine's conveyor device, the image acquisition process is simpler and more convenient, offering greater ease of use and eliminating the need for additional workpieces or equipment, thus effectively saving costs.
[0036] Step S130: Based on the observed pixel values of each column of pixels and the corresponding standard pixel values, determine the brightness of the observed image. The standard pixel values can be the grayscale mean, median, peak, or brightness histogram integral, frequency domain energy, etc., of each column of pixels in the standard image. The brightness of each column of pixels in the standard image can be determined using the standard pixel values. The standard image is an image acquired by the sorting machine under standard conditions. Standard conditions can be that the sorting machine's light source is free of dust and dirt, and the power of the light source is the standard power during normal operation of the sorting machine. Therefore, a standard block can be set, and the image of the standard block can be acquired under standard conditions as the standard image. Correspondingly, an image of the surface of the conveying device under standard conditions can also be acquired as the standard image to determine the standard pixel values. Based on the observed pixel values and the standard pixel values, the brightness difference between the observed image and the standard image can be determined, thereby determining the brightness of the observed image. When there is a significant difference between the observed image and the standard image, it can be determined that the brightness of the observed image is abnormal. Step S130 allows for timely and accurate capture of the brightness difference in the observed image relative to the standard image, as well as the location of the brightness difference, thereby determining whether the brightness of the observed image is abnormal.
[0037] In response to an abnormal brightness condition in the observed image, step S140 is executed. Based on the detection result of the current light source, the current light source is adjusted to obtain a target image with normal brightness. According to the brightness condition of the observed image, if the brightness condition is normal, it can be determined that the current light source is not abnormal, and the image acquired under the illumination conditions of the current light source has sufficient brightness and clarity to meet the image acquisition requirements of the sorting machine, ensuring the accuracy of material identification and sorting. If the brightness condition of the observed image is abnormal, step S140 is executed again to adjust the current light source based on the detection result. The detection result of the current light source can include: normal light source or abnormal light source. If the light source is normal, it can be determined that the light source is working normally, its illumination function is not abnormal, and it can be confirmed that the abnormal brightness condition of the observed image is not due to the light source. If the light source is abnormal, it can be determined that the illumination function of the light source is abnormal, resulting in abnormal image brightness. Therefore, the light source can be adjusted to address the abnormal light source condition, thereby changing the brightness condition of the image acquired by the adjusted light source, thus obtaining the target image. The brightness condition of the target image is normal.
[0038] The image brightness adjustment method provided in this embodiment can compare the observed pixel values of each column in the acquired observation image with the standard pixel values of each column in the corresponding standard image during the operation of the sorting machine to determine the brightness of the observed image. When the brightness of the observed image is abnormal, the light source can be adjusted according to the current state of the light source, so that the brightness of the acquired image after the adjusted light source illuminates the material is normal, thereby ensuring the accuracy and clarity of the image acquired by the sorting machine. Since the standard pixel value can characterize the brightness of each column of pixels in the standard image under standard conditions, the brightness difference between each column of pixels in the observed image and the standard image, as well as the overall brightness difference, can be accurately determined based on the observed pixel values and the standard pixel values, thus accurately determining the state of the sorting machine's light source. Compared with the existing technology that simply corrects the image through overall brightness compensation, this embodiment can effectively improve the uniformity and clarity of image brightness by adjusting the light source. Therefore, this embodiment can ensure that the sorting machine can maintain a high-quality image acquisition effect even after long-term operation, thereby improving the accuracy and stability of material identification and sorting.
[0039] In some embodiments, such as Figure 2 As shown, step S130, which determines the brightness of the observed image based on the observed pixel value and the corresponding standard pixel value of each column of pixels, may include steps S131 and S132.
[0040] Step S131: Determine the pixel difference between the observed pixel value and the corresponding standard pixel value for each column of pixels. The pixel difference is the difference between the observed pixel value and the corresponding standard pixel value. This allows us to determine the brightness difference of each column of pixels between the observed image and the standard image. Furthermore, the overall brightness difference between the observed image and the standard image can also be determined based on the pixel difference.
[0041] Step S132: Determine the brightness of the observed image based on the pixel difference of each column of pixels. The pixel difference can be used to characterize the difference in brightness between the standard image and the observed image for each column of pixels. This is done by determining the pixel difference between the observed pixel value and the corresponding standard pixel value for each column of pixels. If the pixel difference is small, it can be determined that the column of pixels is close to the standard image. Under the current light source, the brightness of the column of pixels meets the recognition and sorting requirements of the sorting machine, the clarity of the column of pixels is high, facilitating the sorting machine's recognition, and achieving high recognition accuracy. If the pixel difference is large, it can be determined that the column of pixels differs significantly from the standard image. Under the current light source, the brightness of the column of pixels may not meet the recognition and sorting requirements of the sorting machine, the clarity is low, and there is an anomaly. Furthermore, based on the pixel difference of each column of pixels, the position of the pixel column in the observed image that differs significantly from the standard pixel value can be accurately determined, thereby identifying the location where the brightness of the observed image is abnormal. Based on the pixel difference, the location and brightness difference between the observed image and the standard image can be determined. This allows us to determine whether the light source brightness is abnormal, as well as the location and coverage of the abnormality, thus accurately determining the state of the light source.
[0042] According to the image brightness adjustment method provided in this embodiment, the pixel difference between the observed pixel value and the corresponding standard pixel value of each column of pixels can be determined, and the brightness of the observed image can be further determined based on this difference. Therefore, on the one hand, the brightness of the observed image can be determined, and on the other hand, the specific pixel column where the brightness is abnormal can be located, thereby improving the accuracy and reliability of subsequent image brightness adjustment. Based on this method, the sorting machine can achieve real-time monitoring of the brightness status of the observed image, ensuring that when abnormal brightness occurs, timely adjustment or maintenance measures for the light source can be taken, effectively improving the stability of image acquisition and the accuracy of material identification and sorting.
[0043] In some embodiments, such as Figure 3 As shown, step S132, which determines the brightness of the observed image based on the pixel difference of each column of pixels, may include step S1321.
[0044] Step S1321: Determine the maximum absolute value based on the absolute value of the pixel difference for each column of pixels. Determining the absolute value of the pixel difference for each column of pixels determines the difference between the observed pixel value and the standard pixel value in the current column. The smaller the absolute value of the pixel difference, the smaller the difference between the observed pixel value and the standard pixel value in the current column. The larger the absolute value of the pixel difference, the greater the difference between the observed pixel value and the standard pixel value in the current column. For pixel columns with large differences, there may be abnormal brightness. Since there are multiple columns of pixels in the observed image, determining the brightness of each column of pixels requires a large amount of computing power. Therefore, by determining the maximum absolute value based on the absolute value of the pixel difference for each column of pixels in step S1321, the brightness of the entire observed image can be quickly determined by subsequently only determining the brightness of the pixel column with the largest absolute value of the pixel difference.
[0045] In response to the maximum absolute value being less than a first threshold, the brightness of the observed image is determined to be normal. To facilitate the determination of the brightness of the observed image, a first threshold can be preset. When the absolute value of the pixel difference is less than the first threshold, the pixel difference of that column of pixels is small, and it can be determined that the observed pixel value of that column of pixels is close to the standard pixel value, thus further determining that the brightness of that column of pixels is normal. Through step S1321, the absolute value of each column of pixels in the observed image can be determined, and the largest data among them is determined as the maximum absolute value. The pixel column corresponding to the maximum absolute value is the column of pixels in the current observed image with the largest pixel difference from the standard pixel value. Comparing the maximum absolute value with the first threshold, if the maximum absolute value is less than the first threshold, it can be determined that the brightness of the column of pixels in the observed image with the largest pixel difference from the standard pixel value is normal, thus determining that the overall brightness of the observed image is normal.
[0046] In response to the maximum absolute value being greater than or equal to a first threshold, the brightness of the observed image is determined to be abnormal. When the absolute value of the pixel difference is greater than or equal to the first threshold, the pixel difference of that column of pixels is large, indicating that the observed pixel value of that column differs significantly from the standard pixel value, thus further determining that the brightness of that column of pixels is abnormal. Through step S1321, the absolute value of each column of pixels in the observed image can be determined, and the largest value among them is identified as the maximum absolute value. The pixel column corresponding to the maximum absolute value is the column of pixels in the current observed image with the largest pixel difference from the standard pixel value. Comparing the maximum absolute value with the first threshold, if the maximum absolute value is greater than or equal to the first threshold, it can be determined that the brightness of the column of pixels with the largest pixel difference from the standard pixel value in the observed image is abnormal, thus determining that the overall brightness of the observed image is abnormal.
[0047] Specifically, the observed pixel value can be the average grayscale value of each column of pixels in the observed image. The observed image can be an image of a standard block acquired by a sorting machine. Based on the image of the standard block, the background portion of the image can be removed, and only the area where the standard block is located can be extracted as the target area. Subsequently, the image of the target area is converted into a grayscale image, and the average grayscale value of each column of pixels in the image is calculated and determined as the observed pixel value, which is recorded as follows. Correspondingly, the standard image can be an image of a standard block acquired under standard conditions. Based on the standard block image, the background can be removed, and only the area containing the standard block can be extracted as the target area. The target area image is then converted to grayscale, and the average grayscale value of each column of pixels in the image is calculated and recorded as the standard pixel value. Therefore, the pixel difference can be recorded as... It is determined by the following formula: Furthermore, to ensure the accuracy of pixel difference, preprocessing operations such as filtering and noise reduction can be performed to determine a more accurate pixel difference. Therefore, it can be done through: The maximum absolute value among the absolute values of pixel differences is determined, and this maximum absolute value is compared with a first threshold to determine the brightness of the observed image. Specifically, the first threshold can be less than or equal to 10. By comparing the maximum absolute value with the first threshold, the comparison calculation of the homogeneity of each pixel difference with the first threshold can be effectively avoided, thereby effectively saving computational resources.
[0048] The image brightness adjustment method provided in this embodiment can quickly determine whether the brightness of the observed image is normal. At the same time, it can significantly reduce the computational complexity in the process of image processing and recognition, improve the real-time performance and reliability of image brightness detection and adjustment, thereby ensuring that the sorting machine can maintain stable image quality in complex operating environments and improve the accuracy of material identification and sorting.
[0049] In some embodiments, such as Figure 4 As shown, step S140, based on the detection result of the current light source, adjusts the current light source to obtain a target image with normal brightness, which may include:
[0050] Step S141: Determine the detection result of the current light source based on the pixel difference of each column of pixels. The detection result of the light source can be determined based on the pixel difference of each column of pixels. The detection result of the light source can include whether the light source is normal or abnormal. Based on the pixel difference of each column of pixels, it can be determined whether the operating status of the light source is normal, thereby further determining the detection result of the light source. When the light source is normal, the light illuminating the surface of the material or standard block is uniform and sufficiently bright. An abnormal light source may include: light source damage, light source brightness attenuation, localized abnormalities in the light source, etc. Therefore, it can be determined whether there is an abnormality in the light source. If an abnormality exists, the light source can be adjusted; if the light source is normal, it can be determined that other factors outside the light source are affecting the brightness of the observed image.
[0051] Step S142: In response to the current light source detection result being normal, the surface of the current light source is cleaned to obtain a target image with normal brightness. When the light source itself is in a normal state, it can be determined that dirt or dust accumulation on the surface of the light source affects light illumination. Therefore, a self-cleaning procedure can be executed to clean the light source. Cleaning can be achieved by blowing gas onto the light source to blow away dust and other adhering dirt. Alternatively, water can be sprayed onto the light source to wash its surface, thus cleaning away stubborn dirt. Furthermore, a wiping device can be used to wipe the outer surface of the light source when dirt is detected, thereby cleaning the surface. After cleaning, the light source can operate normally without dirt or dust affecting light illumination, ensuring normal brightness in subsequently acquired images.
[0052] Step S143: In response to the abnormal detection result of the current light source, adjust the operating parameters of the current light source to obtain a target image with normal brightness. The operating parameters of the light source may include: the electric power of the light source, the luminous intensity of the light source, etc. When the light source is abnormal, the electric power and power supply parameters of the light source do not change, but the brightness of the light source may decrease, such as due to aging after long-term operation. Therefore, by adjusting the operating parameters of the light source, such as the power, the brightness of the light source can be adjusted to compensate for the sudden change in brightness caused by the abnormality of the light source, thereby changing the brightness of the observed image and obtaining a target image with normal brightness.
[0053] The image brightness adjustment method provided in this embodiment can take differentiated measures under different light source conditions: when the light source itself is functioning normally but has surface contamination, cleaning measures are used to ensure lighting quality; when the light source has abnormal performance, brightness compensation is achieved by adjusting operating parameters. Therefore, it can not only quickly restore the brightness of the target image to normal, but also improve the stability and robustness of the sorting machine in complex environments, ensuring the accuracy of material identification and sorting.
[0054] In some embodiments, such as Figure 5 As shown, step S141, determining the detection result of the current light source based on the pixel difference of each column of pixels, may include:
[0055] Step S1411: Determine the average gradient based on the gradient value of the pixel difference for each column of pixels. The gradient value of the pixel difference reflects the drastic change in brightness difference between the observed pixel value and the standard pixel value in the observed image. Therefore, the gradient value of the pixel difference for each column of pixels can be determined, and the average gradient of the pixel difference for each column of pixels in the observed image can be determined. The larger the average gradient, the greater the drastic change in brightness difference between the observed image and the standard image.
[0056] The detection result of the current light source is determined to be normal if the average gradient is less than or equal to a second threshold, and abnormal if the average gradient is greater than the second threshold. Under standard conditions, the light source provides high uniformity when illuminating materials or standard blocks, resulting in a relatively small average gradient. Therefore, the detection result of the light source can be determined by the average gradient. First, a second threshold can be preset, which can be less than or equal to 5. When the average gradient is less than or equal to the second threshold, it can be determined that the illumination of the current light source has high uniformity, thus the detection result of the current light source can be determined to be normal. However, when the average gradient is greater than the second threshold, it can be determined that the brightness of the observed image is uneven, thus the illumination of the current light source is not uniform, and the detection result of the current light source is determined to be abnormal.
[0057] This embodiment can quickly identify the uniformity of light source illumination by utilizing the gradient characteristics of pixel differences, thereby accurately determining the operating status of the light source. Compared to judging solely based on overall brightness differences or single-column pixel differences, this method can more sensitively reflect local anomalies in light source illumination, further improving the accuracy and robustness of light source detection.
[0058] In some embodiments, such as Figure 6 As shown, step S143, in response to the detection result of the current light source being abnormal, adjusts the operating parameters of the current light source to obtain a target image with normal brightness, which may include:
[0059] Step S1431: Determine the cause of the current light source's malfunction based on its operating parameters. The current light source may consist of multiple independent LEDs. The operating parameters of the light source may include the overall brightness of the light source, the power of the light source, and the power and brightness of each LED. The cause of the light source's malfunction can be determined based on these operating parameters.
[0060] In response to the current light source anomaly being a localized LED malfunction, step S1432 is executed. Based on a preset first mapping relationship between LED brightness and LED power, and a first target brightness, the power of the malfunctioning LED is adjusted to obtain a target image with normal brightness. When a localized LED in the light source malfunctions, the specific area or location of the malfunctioning LED can be determined. Therefore, the power of the malfunctioning LED can be adjusted, thereby adjusting its brightness. The power of the malfunctioning LED can be adjusted based on the preset first mapping relationship between LED brightness and LED power, and the first target brightness. Specifically, the brightness and power of the currently malfunctioning LED can be determined, and the first target brightness of the LED can be determined. The first target brightness can be the minimum brightness that the LED needs to achieve under normal light source conditions. Based on the first target brightness, the first mapping relationship between LED brightness and LED power, and the first target brightness, the power of the malfunctioning LED is adjusted, thereby restoring the LED to normal operation and ensuring that subsequent images acquired by the sorting machine are target images with normal brightness.
[0061] In response to the current light source malfunction being caused by all LEDs being faulty, step S1433 is executed. Based on a preset second mapping relationship between light source brightness and electrical power, and a second target brightness, the current electrical power of the current light source is adjusted to obtain a target image with normal brightness. When all LEDs are faulty, the overall brightness of the light source will decrease, thus confirming that the overall reduction in light source brightness is due to insufficient light source power. Therefore, the electrical power of the light source can be adjusted based on the preset second mapping relationship between light source brightness and electrical power, and the second target brightness, thereby achieving overall brightness adjustment of the light source.
[0062] Specifically, the first mapping relationship between the preset LED brightness and LED power can be determined by the following method: A standard block is illuminated using one LED. Under dust-free and clean conditions, multiple different images are acquired based on different LED power levels. The brightness of the LED can be determined based on the brightness of these multiple images. Therefore, the brightness of the LED at different power levels can be determined. Thus, the first mapping relationship between LED brightness and LED power can be established.
[0063] The second mapping relationship between light source brightness and electrical power can be determined as follows: First, under dust-free and dirt-free conditions, images of a standard block are acquired based on the electrical power of multiple light sources to determine standard images under different power levels. This eliminates the influence of dust and dirt on light source brightness by ensuring image acquisition is performed under dust-free conditions. Multiple standard images can be determined by supplying power to the same light source with multiple different power levels and acquiring images of the standard block. During the acquisition of multiple standard images, the electrical power can be varied, with a step size greater than or equal to 10W and less than or equal to 50W. Subsequently, the brightness of the standard image and its corresponding standard power can be determined based on the standard image. Based on the acquired multiple standard images, the overall brightness of each standard image can be determined, thereby identifying the different brightness levels of the same light source under different power levels. Finally, the second mapping relationship between light source brightness and electrical power can be determined based on the determined brightness of the standard image and its corresponding standard power.
[0064] The image brightness adjustment method provided in this embodiment can automatically analyze the light source status by comparing the acquired observation image with a standard image during the operation of the sorting machine. When the acquired image shows insufficient or uneven brightness due to local LED damage or overall brightness decay, the system can promptly detect and identify the problem area, thereby avoiding reliance on manual inspection, significantly reducing labor costs, and enabling rapid response to light source anomalies. Furthermore, since the determined observation pixel values and standard pixel values can accurately characterize the brightness of each column of pixels in the image, the specific location of the light source anomaly can be located on the pixel column, thus ensuring the accuracy of detection. Compared with the existing technology that simply corrects the image through overall brightness compensation, this embodiment can not only achieve overall brightness adjustment but also identify and adjust local brightness anomalies, effectively improving the uniformity and clarity of image brightness. Therefore, this embodiment can ensure that the sorting machine maintains high-quality image acquisition effects even after long-term operation, thereby improving the accuracy and stability of material identification and sorting.
[0065] In some embodiments, such as Figure 7 As shown, step S1431, which determines the cause of the current light source's abnormality based on the current light source's operating parameters, may include step S14311.
[0066] Step S14311: Perform additive anomaly detection on the LEDs in each region of the current light source to obtain the LED detection results. Additive anomaly detection can be performed on the LEDs in each region of the current light source. Additive anomaly is a local shift in the observed pixel value relative to the standard pixel value. The presence of additive anomalies in each region can be determined based on the pixel difference between the observed pixel value and the standard pixel value. Pixels with excessively large pixel differences in each column of pixels exhibit additive anomalies.
[0067] If the LED detection results indicate that some LEDs are abnormal, then the cause of the current light source's abnormality is determined to be a localized LED malfunction. If the light source is normal, the brightness reflected by the observed pixel values should be close to the standard pixel values, thus eliminating additive anomalies. If some LEDs in the light source malfunction, causing some LEDs to have reduced brightness or be damaged and unable to provide illumination, the pixel brightness distribution in the first data corresponding to the illuminated area of the malfunctioning LEDs will be abnormal. This will result in an additive anomaly between the first data and the standard data. Therefore, by detecting the additive anomaly in the difference between the first data and the standard data, it can be determined that a localized LED malfunction has occurred in the light source.
[0068] If the absolute value of the difference between the first pixel average and the second pixel average of each column of pixels is greater than a third threshold, then the cause of the current light source's anomaly is determined to be an anomaly in all LEDs. The first pixel average is determined based on the observed pixel values of each column, and the second pixel average is determined based on the standard pixel values of each column. The first pixel average can be the arithmetic mean of the observed pixel values of each column, and the second pixel average can be the arithmetic mean of the standard pixel values of each column. The overall brightness of the observed image can be determined based on the first pixel average, and the overall brightness of the standard image can be determined based on the second pixel average. Therefore, determining the difference between the first pixel average and the second pixel average of each column determines the difference in brightness between the observed image and the standard image. A third threshold can be preset. If the absolute value of the difference between the first pixel average and the second pixel average of each column is less than or equal to the third threshold, it can be determined that the brightness of the current observed image is close to that of the standard image, and the light source does not exhibit an overall brightness anomaly. However, if the absolute value of the difference between the first pixel average and the second pixel average of each column is greater than the third threshold, it can be determined that the brightness of the observed image differs significantly from that of the standard image, indicating that the current light source has experienced overall attenuation. The overall decrease in light source brightness may be due to the abnormality of all LED chips. Therefore, it can be determined that the current abnormality of the light source is caused by the abnormality of all LED chips.
[0069] The image brightness adjustment method provided in this embodiment can comprehensively evaluate the working status of the light source from multiple perspectives, including overall brightness difference, local brightness change, gradient characteristics of brightness change, and brightness distribution shift. This embodiment enables accurate detection of different types of light source anomalies, distinguishing between uneven brightness caused by local LED damage and overall brightness attenuation, avoiding the problem in existing technologies where only overall brightness compensation is possible without pinpointing specific anomalies. This method not only improves the precision and reliability of light source anomaly detection but also provides accurate data for subsequent light source adjustment, image compensation, or equipment maintenance, effectively ensuring the uniformity and clarity of images acquired by the sorting machine, and significantly improving the accuracy and stability of material identification and sorting.
[0070] In some embodiments, such as Figure 8 As shown, step S143, in response to the detection result of the current light source being abnormal, adjusts the operating parameters of the current light source to obtain a target image with normal brightness, and may also include step S1434.
[0071] If the cause of the current light source's abnormality is "other," then step S1434 is executed, adjusting the brightness of the observed image based on the target image brightness to obtain a target image with normal brightness. When the cause of the light source's abnormality is determined to be something other than the abnormalities of all or some LEDs provided in the above embodiments, or when the specific cause of the light source's abnormality cannot be determined, the light source may not be adjusted; instead, the image itself may be adjusted. Furthermore, if the light source remains in an abnormal state, the brightness of the observed image may also be adjusted based on the target image brightness, according to this embodiment. Specifically, the brightness of the observed image acquired by the sorting machine can be corrected. Through post-processing, the overall brightness of the observed image can be adjusted to ensure that the brightness of the observed image can determine its internal state during the recognition process, facilitating subsequent material recognition calculations.
[0072] According to the image brightness adjustment method provided in this embodiment, when the light source is continuously abnormal or it is difficult to directly compensate for brightness by adjusting the light source, the image brightness can be supplemented by performing brightness correction on the image, effectively improving the image quality. Therefore, the brightness stability of subsequently acquired images can be effectively guaranteed, thereby significantly improving the accuracy and robustness of material identification and sorting.
[0073] In some embodiments, such as Figure 9 As shown, step S140, based on the detection result of the current light source, adjusts the current light source to obtain a target image with normal brightness, and may include steps S144 to S147.
[0074] Step S144: Based on the detection results of the current light source, determine the operating status of the current light source. If the brightness of the observed image is determined to be abnormal, the operating status of the current light source can be determined based on the detection results. Based on the detection results of the preceding steps, it can be determined whether the current light source is in an abnormal state or a normal operating state.
[0075] Step S145: Based on the current operating state of the light source, determine the target cause of the abnormal brightness. According to the current operating state of the light source, the specific cause of the abnormal brightness in the observed image, i.e., the target cause, can be determined. In some embodiments, the target cause may include any one or more of the following: debris on the surface of the current light source, a partial malfunction of the LEDs in the current light source, a malfunction of all LEDs in the current light source, or other causes. Specifically, when the operating state of the light source is normal, but the brightness of the observed image is abnormal, the cause of the abnormal brightness can be determined as: debris on the surface of the current light source, such as dust accumulation or other dirt. When the brightness of the observed image is abnormal, and the operating state of the light source is abnormal, the target cause leading to the abnormal brightness can be determined based on the specific abnormality of the light source, including a partial malfunction of the LEDs in the current light source, a malfunction of all LEDs in the current light source, etc.
[0076] Step S146: Based on the preset correspondence between abnormal causes and adjustment strategies, and the target cause, determine the target strategy. This can be done by determining the adjustment strategy, i.e., the target strategy, to resolve the current abnormal brightness condition, according to the pre-set correspondence between causes of abnormal brightness and adjustment measurements, and based on the determined target cause.
[0077] Step S147: Based on the target strategy, adjust the current light source to obtain a target image with normal brightness. According to the determined target strategy, perform corresponding operations to adjust the light source, bringing it from an abnormal state to a normal operating state. This allows the light source to function normally and provide illumination, with both the brightness and illumination range of the light source at normal levels. Thus, the brightness of the acquired observation image is normal, resulting in the target image.
[0078] According to the image brightness adjustment method provided in this embodiment, when the light source is continuously abnormal or it is difficult to directly compensate for brightness by adjusting the light source, the image brightness can be supplemented by performing brightness correction on the image, effectively improving the image quality. Therefore, the brightness stability of subsequently acquired images can be effectively guaranteed, thereby significantly improving the accuracy and robustness of material identification and sorting.
[0079] In some embodiments, if the target cause is debris on the surface of the current light source, the current light source is adjusted based on a target strategy to obtain a target image with normal brightness. This includes cleaning the surface of the current light source to obtain a target image with normal brightness. When it is determined that the target cause of abnormal brightness is debris on the surface of the current light source, the corresponding target strategy can be determined as cleaning the surface of the current light source to obtain a target image with normal brightness. A self-cleaning procedure can be executed to clean the light source. Cleaning can be achieved by blowing gas onto the light source to blow away dust and other adhering dirt attached to the surface of the light source's LED beads. Alternatively, water can be sprayed onto the light source to clean the surface of the LED beads, thereby removing stubborn dirt. Furthermore, a wiping device can be provided to wipe the outer surface of the light source's LED beads when it is determined that dirt exists on the surface of the light source, thereby cleaning the surface of the light source.
[0080] If the cause of the problem is a localized malfunction of the LEDs in the current light source, then based on the target strategy, the current light source is adjusted to obtain a target image with normal brightness. This includes: adjusting the power of the malfunctioning LEDs based on a preset first mapping relationship between LED brightness and LED power, and a first target brightness, to obtain a target image with normal brightness. When an LED in the light source malfunctions, the specific area or location of the malfunctioning LED can be determined. Therefore, the power of the malfunctioning LED can be adjusted, thereby adjusting the brightness of the malfunctioning LED in the light source. Specifically, based on the preset first mapping relationship between LED brightness and LED power, and the first target brightness, the power required for the adjusted LED to reach the first target brightness can be determined. Based on the difference between the current power of the LED and the required power, the power of the LED is adjusted so that the LED reaches the first target brightness, thus enabling subsequent images of the LED with normal brightness to obtain a target image. Furthermore, when a local LED chip experiences abnormal brightness, the light source can be re-tested after adjusting its power. If, after multiple self-tests and adjustments, the LED chips in the same area continue to malfunction, it can be assumed that the LED chips in that area are damaged. Therefore, the sorting machine can issue an alarm to notify relevant personnel to replace the corresponding LED chips promptly, ensuring the brightness of the sorting machine's light source during subsequent operation. The image brightness adjustment method provided in this embodiment not only compensates for localized LED chip malfunctions through power adjustment but also automatically triggers an alarm mechanism when persistent malfunctions cannot be eliminated, reminding maintenance personnel to replace the damaged LED chips in a timely manner. This enables automatic diagnosis and early warning of the light source status, preventing a decrease in sorting accuracy due to insufficient light source brightness and improving the reliability and stability of the sorting machine during long-term operation.
[0081] If the cause of the problem is the abnormality of all LEDs in the current light source, the current light source is adjusted based on the target strategy to obtain a target image with normal brightness. This includes adjusting the current power of the current light source based on a preset second mapping relationship between light source brightness and power, and a second target brightness, to obtain a target image with normal brightness. When all LEDs are abnormal, the power corresponding to the brightness closest to the light source, i.e., the second target brightness, can be determined based on the preset second mapping relationship between light source brightness and power. The difference between the current power of the light source and the power corresponding to the second target brightness can be used as the power to be adjusted. Increasing the power of the current light source based on this difference will adjust the light source, ensuring that the adjusted light source has sufficient brightness to provide adequate illumination during the acquisition of material images, making the images clearer and improving the accuracy of material identification and sorting. This ensures that the light source can recover to standard illumination brightness even when there is overall attenuation. Therefore, it effectively avoids the problem of abnormal image grayscale caused by insufficient light source brightness, ensuring that the acquired material images have uniform and clear brightness, further improving the accuracy and stability of subsequent material identification and sorting.
[0082] If the cause of the target image is other than the current light source, then based on the target strategy, the current light source is adjusted to obtain a target image with normal brightness. This includes adjusting the brightness of the observed image based on the target image brightness to obtain a target image with normal brightness. Specifically, when the light source continuously malfunctions or exhibits anomalies that are difficult to compensate for by directly adjusting the light source, the brightness of the acquired observed image can be directly corrected. A brightness correction coefficient can be determined based on the brightness difference between the observed image and the standard image. Through image processing algorithms, based on the brightness of the observed image and the determined brightness correction coefficient, the brightness of the observed image is corrected to match the brightness of the standard image. Furthermore, during subsequent material image acquisition and recognition processes, the sorting machine corrects the brightness of the acquired images based on the brightness correction coefficient to ensure that the brightness of the subsequently acquired images meets the conditions for recognition and sorting, thereby ensuring the sorting accuracy of the sorting machine.
[0083] Specifically, the determination of the aforementioned causes can be performed sequentially or in a randomized order during data processing and cause determination. Alternatively, a light sensor can be added directly near the camera or light source to measure the light intensity and determine its operating status.
[0084] The image brightness adjustment method provided in this embodiment can perform different processing on the light source according to different abnormal states of the light source, thereby achieving targeted brightness correction of the image. By combining multiple measures such as self-cleaning of the light source, local power compensation, overall power adjustment, and image brightness correction, the stability of imaging illumination can be maintained under different abnormal light source conditions, ensuring the uniformity of brightness and image clarity of the acquired image, resulting in better reliability and further improving the material identification accuracy of the sorting machine.
[0085] Based on the same inventive concept, such as Figure 10 As shown, this disclosure also provides a sorting machine 200, which may include: a light source 210, an image acquisition module 220, a calculation module 230, and an adjustment module 240.
[0086] The light source 210 is used to illuminate the material being conveyed by the conveying device. The sorting machine 200 may be equipped with a conveyor belt or other conveying device for conveying materials. The light source 210 may be positioned above the conveying device and may face the surface of the conveying device, so that the light source 210 can illuminate the material on the surface of the conveying device, thereby improving the brightness of the surface of the conveying device and thus improving the clarity of subsequent image acquisition of the material.
[0087] Image acquisition module 220, adjacent to light source 210, is used to acquire observation images under the current light source 210. Image acquisition module 220 may be adjacent to light source 210 and may include a camera for acquiring images, capable of acquiring observation images under the current light source 210. The camera used for acquiring images in image acquisition module 220 may be a line scan camera or an area scan camera, etc.
[0088] The calculation module 230 is used to determine the observed pixel value of each column of pixels in the observed image, and to determine the brightness of the observed image based on the observed pixel value of each column of pixels and the corresponding standard pixel value. The calculation module 230 can perform image data processing and calculations based on the observed image acquired by the image acquisition module 220. The calculation module 230 can determine the observed pixel value of each column of pixels in the observed image. Furthermore, it can calculate the pixel difference between the observed pixel value and the standard pixel value to determine the brightness of the observed image.
[0089] The adjustment module 240, in response to an abnormal brightness condition in the observed image, adjusts the current light source 210 based on the detection result to obtain a target image with normal brightness. The adjustment module 240 can adjust the light source 210 accordingly based on the brightness condition of the observed image determined by the calculation module 230. Through the adjustment module 240, an observed image that was originally in an abnormal brightness state can be transformed into a target image with normal brightness after the adjustment module 240 adjusts the light source 210 and the observed image is acquired again. Therefore, the adjustment module 240 can adjust the light source 210 according to the brightness condition of the observed image and the state of the light source 210 to ensure that the light source 210 maintains normal illumination and that the sorting machine 200 can acquire a target image with normal and clear brightness, thereby improving the accuracy of subsequent material identification and sorting.
[0090] According to the sorting machine 200 provided in this embodiment, the light source 210 can be automatically diagnosed and adjusted in the entire process of conveying, lighting, collecting and sorting, so as to ensure that the image brightness is always stable and reliable, improve the image clarity, thereby significantly improving the accuracy of material identification and sorting, and further improving the intelligence and automation level of the sorting equipment.
[0091] In some embodiments, the sorting machine 200 may further include: a standard block and a control mechanism.
[0092] The standard block can be moved to an image acquisition position below the light source 210 so that the sorting machine 200 can acquire standard and observation images of the standard block. The standard block can be installed on a control mechanism, which drives the movement of the standard block to a position below the light source 210 so that the sorting machine 200 can acquire images of the standard block.
[0093] A control mechanism is used to drive the standard block to move below the image acquisition position, so that the image acquisition module 220 can obtain the observation image through the standard block. The control mechanism can be a telescopic track, slide rail, or rotating arm, etc., located on one side below the light source 210, and can be retracted while the sorter 200 is operating to avoid affecting the material image acquisition, recognition, and sorting of the sorter 200. When it is necessary to acquire a standard image or an observation image, the control mechanism can drive the standard block to move below the image acquisition position to achieve the acquisition of both standard and observation images.
[0094] Specifically, before the sorting machine performs its sorting operation, under conditions where the light source of the sorting machine has not attenuated and is free of dust and dirt, a standard block is pushed out by the control mechanism, lowering it to a first position above the belt and moving it to a second position at the same speed as the belt. The first and second positions are equidistant from the upper surface of the belt and from the camera of the image acquisition device. During the movement of the standard block, an image is captured by the camera as a standard image to determine standard data. Subsequently, the standard block is retracted by the control mechanism, moving it and the control mechanism away from the camera to prevent them from interfering with the acquisition and recognition of material images during the sorting machine's operation. During the image brightness adjustment process, the standard block is pushed out again by the control mechanism, lowering it to the first position above the belt and moving it to a second position at the same speed as the belt. The first and second positions are equidistant from the upper surface of the belt and from the camera of the image acquisition device, thus acquiring an observation image to determine the first data. Based on the first data and the standard data, the state of the sorting machine's light source during the image acquisition process can be determined. When an abnormality is detected in the light source, the light source or the observed image can be adjusted adaptively according to the state of the light source, thereby enabling timely identification and accurate adjustment of the light source abnormality, so that the light source can maintain a more suitable brightness and the image quality of the acquired image can remain stable even under more complex field conditions.
[0095] According to the sorting machine provided in this embodiment, through the image self-inspection module, the sorting machine can detect the light source status in real time during the material sorting process, automatically compensate for light source abnormalities or correct image brightness, and ensure stable brightness of the acquired image. This improves the accuracy and reliability of material identification and sorting, while reducing the frequency of manual inspections, and achieving automation and intelligence in light source management.
[0096] Based on the same inventive concept, this disclosure also provides a computer-readable storage medium storing a program for executing the image brightness adjustment method in any of the foregoing embodiments. Figure 11As shown, one embodiment of this disclosure provides an electronic device 300. The electronic device 300 includes one or more processors 310, a memory 320, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components are interconnected via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple electronic devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 5 Take the 310 processor as an example.
[0097] Processor 310 may be a central processing unit, a network processor, or a combination thereof. Processor 310 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPA), or any combination thereof.
[0098] The memory 320 stores instructions executable by at least one processor 310 to cause the at least one processor 310 to perform the image brightness adjustment method shown in the above embodiments.
[0099] The memory 320 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device. Furthermore, the memory 320 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 320 may optionally include memory remotely located relative to the processor 310, and these remote memories may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0100] The memory 320 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 320 may also include a combination of the above types of memory.
[0101] The electronic device also includes an input device 330 and an output device 340. The processor 310, memory 320, input device 330, and output device 340 can be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.
[0102] Input device 330 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the electronic device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 340 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.
[0103] This application uses specific terms to describe embodiments of the application. Terms such as "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of the application. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations throughout this specification do not necessarily refer to the same embodiment. Furthermore, certain features, structures, or characteristics in one or more embodiments of the application can be appropriately combined.
[0104] In the context of this application, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" do not specifically refer to the singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of explicitly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.
[0105] Similarly, it should be noted that, in order to simplify the description of the present application and thus aid in the understanding of one or more embodiments, the foregoing description of the embodiments of the present application sometimes combines multiple features into a single embodiment, drawing, or description thereof. However, this disclosure method does not imply that the subject matter of the present application requires more features than those mentioned in the claims. In fact, the embodiments contain fewer features than all the features of the single embodiments disclosed above.
[0106] The basic concepts have been described above. Obviously, for those skilled in the art, the above disclosure is merely illustrative and does not constitute a limitation of this application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and corrections to this application. Such modifications, improvements, and corrections are suggested in this application, and therefore remain within the spirit and scope of the embodiments of this application.
Claims
1. An image brightness adjustment method, characterized in that, The image brightness adjustment method, applied to a sorting machine, includes: Acquire observation images under the current light source; Based on the observed image, the observed pixel value of each column of pixels in the observed image is determined respectively; The brightness of the observed image is determined based on the observed pixel value and the corresponding standard pixel value of each column of pixels. In response to the abnormal brightness of the observed image, the current light source is adjusted based on the detection result of the current light source to obtain a target image with normal brightness. The step of determining the brightness of the observed image based on the observed pixel value and the corresponding standard pixel value of each column of pixels includes: determining the pixel difference between the observed pixel value and the corresponding standard pixel value of each column of pixels; and determining the brightness of the observed image based on the pixel difference of each column of pixels. The step of adjusting the current light source based on the detection result of the current light source to obtain a target image with normal brightness includes: determining the detection result of the current light source based on the pixel difference of each column of pixels; cleaning the surface of the current light source in response to the detection result of the current light source being normal to obtain a target image with normal brightness; and adjusting the operating parameters of the current light source in response to the detection result of the current light source being abnormal to obtain a target image with normal brightness. The step of adjusting the operating parameters of the current light source to obtain a target image with normal brightness in response to the detection result of the current light source being abnormal includes: determining the cause of the abnormality of the current light source based on the operating parameters of the current light source; adjusting the power of the abnormal light source based on a preset first mapping relationship between light source brightness and light source power and a first target brightness in response to the cause of the abnormality of the current light source being a local light bulb abnormality, so as to obtain a target image with normal brightness in response to the cause of the abnormality of the current light source being a complete light bulb abnormality, adjusting the current power of the current light source based on a preset second mapping relationship between light source brightness and power and a second target brightness in response to the cause of the abnormality of the current light source being a complete light bulb abnormality, so as to obtain a target image with normal brightness in response to the cause of the abnormality of the current light source being a complete light bulb abnormality.
2. The image brightness adjustment method according to claim 1, characterized in that, Determining the brightness of the observed image based on the pixel difference of each column of pixels includes: The maximum absolute value is determined based on the absolute value of the pixel difference of each column of pixels; In response to the maximum absolute value being less than a first threshold, the brightness of the observed image is determined to be normal; In response to the maximum absolute value being greater than or equal to the first threshold, the brightness of the observed image is determined to be abnormal.
3. The image brightness adjustment method according to claim 1, characterized in that, Determining the detection result of the current light source based on the pixel difference of each column of pixels includes: The average gradient is determined based on the gradient value of the pixel difference in each column of pixels; In response to the average gradient being less than or equal to a second threshold, the detection result of the current light source is determined to be normal; In response to the average gradient being greater than a second threshold, the detection result of the current light source is determined to be abnormal.
4. The image brightness adjustment method according to claim 1, characterized in that, The process of determining the cause of the anomaly of the current light source based on its operating parameters includes: Additive anomaly detection is performed on the LEDs in each region of the current light source to obtain the LED detection results; and In response to the LED detection results indicating that some LEDs are abnormal, the cause of the current light source's abnormality is determined to be a localized LED malfunction; or, If the absolute value of the difference between the first pixel average value and the second pixel average value of each column of pixels is greater than a third threshold, then the abnormality of the current light source is determined to be an abnormality of all LED beads, wherein the first pixel average value is determined based on the observed pixel value of each column of pixels, and the second pixel average value is determined based on the standard pixel value of each column of pixels.
5. The image brightness adjustment method according to claim 4, characterized in that, The step of adjusting the operating parameters of the current light source to obtain a target image with normal brightness in response to the detection result of the current light source being abnormal also includes: If the cause of the current light source's abnormality is other, then the brightness of the observed image is adjusted based on the target image brightness to obtain a target image with normal brightness.
6. The image brightness adjustment method according to any one of claims 1-2, characterized in that, The step of adjusting the current light source based on the detection result to obtain a target image with normal brightness includes: Based on the detection results of the current light source, the operating status of the current light source is determined; Based on the current operating state of the light source, the abnormal brightness condition is determined to be the target cause. Based on the pre-defined correspondence between abnormal causes and adjustment strategies, and the target cause, the target strategy is determined; Based on the target strategy, the current light source is adjusted to obtain a target image with normal brightness.
7. The image brightness adjustment method according to claim 6, characterized in that, The cause of the target includes any one or more of the following: the surface of the current light source has debris, some of the lamp beads of the current light source are abnormal, all of the lamp beads of the current light source are abnormal, or other reasons.
8. The image brightness adjustment method according to claim 7, characterized in that, If the target cause is that there are impurities on the surface of the current light source, then based on the target strategy, the current light source is adjusted to obtain a target image with normal brightness, including: cleaning the surface of the current light source to obtain a target image with normal brightness; If the target cause is a local lamp bead abnormality in the current light source, then based on the target strategy, the current light source is adjusted to obtain a target image with normal brightness, including: based on a preset first mapping relationship between lamp bead brightness and lamp bead power and a first target brightness, adjusting the power of the abnormal lamp bead to obtain a target image with normal brightness. If the target cause is that all the LEDs of the current light source are abnormal, then based on the target strategy, the current light source is adjusted to obtain a target image with normal brightness, including: based on a preset second mapping relationship between light source brightness and power and a second target brightness, adjusting the current power of the current light source to obtain a target image with normal brightness; If the target cause is another cause of the current light source, then based on the target strategy, the current light source is adjusted to obtain a target image with normal brightness, including: adjusting the image brightness of the observed image based on the target image brightness to obtain a target image with normal brightness.
9. A sorting machine, characterized in that, The sorting machine includes: light source; An image acquisition module, adjacent to the light source, is used to acquire observation images under the current light source. The calculation module is used to determine the observed pixel value of each column of pixels in the observed image based on the observed image; and to determine the brightness of the observed image based on the observed pixel value of each column of pixels and the corresponding standard pixel value, including: determining the pixel difference between the observed pixel value of each column of pixels and the corresponding standard pixel value; and determining the brightness of the observed image based on the pixel difference of each column of pixels. An adjustment module is configured to, in response to an abnormal brightness condition in the observed image, adjust the current light source based on the detection result of the current light source to obtain a target image with normal brightness, including: determining the detection result of the current light source based on the pixel difference of each column of pixels; cleaning the surface of the current light source in response to a normal detection result to obtain a target image with normal brightness; and adjusting the operating parameters of the current light source in response to an abnormal detection result to obtain a target image with normal brightness; wherein, the adjustment in response to an abnormal detection result of the current light source... The method of determining the operating parameters of the current light source to obtain a target image with normal brightness includes: determining the cause of the current light source's abnormality based on the operating parameters of the current light source; in response to the cause of the current light source's abnormality being a local LED abnormality, adjusting the power of the abnormal LEDs based on a preset first mapping relationship between LED brightness and LED power and a first target brightness to obtain a target image with normal brightness; or, in response to the cause of the current light source's abnormality being a complete LED abnormality, adjusting the current power of the current light source based on a preset second mapping relationship between light source brightness and power and a second target brightness to obtain a target image with normal brightness.
10. The sorting machine according to claim 9, characterized in that, The sorting machine also includes: Standard block; A control mechanism is used to drive the standard block to move below the image acquisition position so that the image acquisition module can obtain the observed image through the standard block.
11. A computer-readable storage medium storing a program for performing the image brightness adjustment method according to any one of claims 1-8.