Lens smudginess self-inspection method, device and equipment of deviation correction sensor and medium
By performing optical axis verification and pixel unit energy value comparison on the CMOS photosensitive device of the polarization correction sensor, the lens dirt is automatically determined, which solves the problem of low self-inspection accuracy of the polarization correction sensor lens and achieves higher detection accuracy and timeliness.
Patent Information
- Application Number
- CN202511124229.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-12-02
AI Technical Summary
Existing correction sensors have low self-inspection accuracy for dirty lenses, and are prone to misjudging and ignoring slight contamination, especially in environments with equipment vibration, which affects detection accuracy.
By calibrating the optical axis of the CMOS photosensitive device of the correction sensor, recording the reference light energy value of each pixel, and acquiring the light energy value in real time, dividing the pixel unit, calculating the ratio of the current total energy value to the reference total energy value, the system can automatically determine whether the lens is dirty.
It improves the accuracy of lens dirt self-inspection of the correction sensor, enabling timely identification and warning of lens dirt, reducing human error and delayed detection.
Smart Images

Figure CN121048876A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of sensor technology, and in particular relates to a method, device, equipment and medium for self-inspection of lens dirt in a correction sensor. Background Technology
[0002] The correction sensor consists of a transmitter and a receiver. The transmitter emits a parallel beam of light that illuminates the CMOS image sensor in the receiver. The receiver's MCU main control unit collects and converts the light signals from each pixel of the CMOS image sensor into digital light energy values, and finally calculates the position of the object within the detection area.
[0003] In real-world industrial applications, the outer surfaces of the transmitter and receiver lenses of polarization correction sensors are prone to accumulating minute contaminants such as dust and hair. These contaminants can cause abnormal light energy reception by pixels in the corresponding areas of the CMOS image sensor, leading to errors in object position calculations. Currently, the industry commonly uses manual diagnostics to detect lens contamination, typically only conducting manual checks when the polarization correction sensor's output signal exhibits drastic fluctuations or obvious anomalies. However, in environments with equipment vibration, fluctuations in the sensor's output signal can easily be misinterpreted as lens contamination, while minor contamination is often overlooked. Furthermore, manual checks cannot be performed in real time, often resulting in persistent lens contamination, thus affecting the detection accuracy of the polarization correction sensor until the next maintenance cycle.
[0004] Therefore, improving the accuracy of the self-detection of dirt on the lens of the correction sensor is a technical problem that urgently needs to be solved. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and medium for self-inspection of lens dirt in a correction sensor, to solve the technical problem of low accuracy in self-inspection of lens dirt in existing correction sensors.
[0006] In a first aspect, the present invention provides a method for self-inspection of lens dirt in a polarization correction sensor, comprising:
[0007] Obtain the correction sensor to be self-tested, perform optical axis calibration on the correction sensor, and record the reference light energy value of each pixel on the CMOS photosensitive device of the correction sensor.
[0008] Real-time acquisition of light energy values of each pixel in the light-receiving area of the CMOS photosensitive device to be self-tested, and division of the pixels in the light-receiving area of the CMOS photosensitive device into several pixel units at fixed intervals;
[0009] Calculate the current total energy value E1 and the current reference total energy value E2 of each pixel unit in the light-gathering area of the CMOS image sensor.
[0010] The current total energy value E1 of each pixel unit in the light-receiving area is compared with the current reference total energy value E2 of the corresponding pixel unit;
[0011] If the ratio of the current total energy value E1 of each pixel unit in the light-receiving area to the reference total energy value E2 of the corresponding pixel unit is less than a preset threshold, it is determined that the lens of the correction sensor is dirty.
[0012] Furthermore, the step of acquiring the correction sensor to be self-tested, performing optical axis calibration on the correction sensor, and recording the reference light energy value of each pixel on the CMOS photosensitive device of the correction sensor includes:
[0013] When there are no obstructions between the transmitter and receiver of the correction sensor, a calibration command is sent through the host computer connected to the correction sensor.
[0014] The receiver of the correction sensor responds to the calibration command sent by the host computer, and the MCU unit of the receiver records the reference light energy value of each pixel of the CMOS photosensitive device.
[0015] Furthermore, the step of calculating the current total energy value E1 and the current reference total energy value E2 of each pixel unit in the light-gathering region of the CMOS image sensor includes:
[0016] The current light energy value of each pixel unit in the light-receiving area of the CMOS photosensitive device and the current reference light energy value of the corresponding pixel unit are accumulated and calculated to obtain the current total energy value E1 of each pixel unit in the light-receiving area and the current reference total energy value E2 of the corresponding pixel unit.
[0017] Furthermore, the comparison of the current total energy value E1 of each pixel unit in the light-receiving region with the current reference total energy value E2 of the corresponding pixel unit includes:
[0018] When there is no object to be tested in the self-testing correction sensor, the current total energy value E1 of each pixel unit on the CMOS photosensitive device is compared with the current reference total energy value E2 of the corresponding pixel unit.
[0019] Furthermore, the comparison of the current total energy value E1 of each pixel unit in the light-receiving region with the current reference total energy value E2 of the corresponding pixel unit also includes:
[0020] When the correction sensor to be self-tested has a test object, calculate the boundary line between the light-blocking area and the light-incoming area on the CMOS photosensitive device.
[0021] Starting from the light-incoming region direction of the calculated boundary line, each pixel unit compares the current total energy value E1 of each pixel unit on the CMOS image sensor with the current reference total energy value E2 of the corresponding pixel unit.
[0022] Furthermore, when the self-testing correction sensor has a test object, calculating the boundary between the light-blocking area and the light-receiving area on the CMOS photosensitive device includes:
[0023] Obtain the maximum light energy value of the light-receiving area of the correction sensor, and preset a preset percentage of the maximum light energy value as a dynamic threshold;
[0024] The system scans pixel by pixel from the light-shielding area to the light-receiving area of the CMOS image sensor, and the position of the first pixel that exceeds the dynamic threshold is preset as the boundary between the light-shielding area and the light-receiving area.
[0025] Furthermore, after determining that the lens of the polarization correction sensor is dirty if the ratio of the current total energy value E1 of each pixel unit in the light-receiving area to the reference total energy value E2 of the corresponding pixel unit exceeds a preset threshold, the method further includes:
[0026] If the lens of the correction sensor is determined to be dirty, a dirt warning event is sent to the host computer through the receiver of the correction sensor.
[0027] Secondly, the present invention provides a lens dirt self-checking device for a correction sensor, comprising:
[0028] The acquisition module is used to acquire the correction sensor to be self-tested, perform optical axis verification on the correction sensor, and record the reference light energy value of each pixel on the CMOS photosensitive device of the correction sensor.
[0029] The partitioning module is used to collect the light energy value of each pixel in the light-receiving area of the CMOS photosensitive device of the correction sensor to be self-tested in real time, and to divide the pixels in the light-receiving area of the CMOS photosensitive device into several pixel units at fixed intervals.
[0030] The calculation module is used to calculate the current total energy value E1 and the current reference total energy value E2 of each pixel unit in the light-gathering area of the CMOS image sensor.
[0031] The comparison module is used to compare the current total energy value E1 of each pixel unit in the light-receiving area with the current reference total energy value E2 of the corresponding pixel unit.
[0032] If the ratio of the current total energy value E1 of each pixel unit in the light-receiving area to the reference total energy value E2 of the corresponding pixel unit is less than a preset threshold, the determination module determines that the lens of the correction sensor is dirty.
[0033] Thirdly, the present invention provides an apparatus including a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements a method for self-detection of lens dirt by a correction sensor as described in any of the first aspects above.
[0034] Fourthly, the present invention provides a storage medium storing program instructions, which, when executed by a processor, implement a method for self-detection of lens dirt by a correction sensor as described in any of the first aspects above.
[0035] Compared with existing technologies, the lens contamination self-inspection method for the polarization correction sensor provided by this invention can record a reference light energy value for each pixel by performing optical axis calibration on the CMOS photosensitive device of the polarization correction sensor. By calculating the difference between the current total energy value of each pixel unit in the light-receiving area on the CMOS photosensitive device and the reference total energy value, the lens contamination status of the polarization correction sensor can be accurately determined, effectively improving the accuracy of the lens contamination self-inspection of the polarization correction sensor. Attached Figure Description
[0036] Figure 1 A schematic diagram of the overall structure of the transmitter and receiver of a correction sensor provided in an embodiment of the present invention;
[0037] Figure 2 A cross-sectional view of the transmitter and receiver of a correction sensor provided in an embodiment of the present invention;
[0038] Figure 3 A flowchart illustrating a lens contamination self-inspection method for a correction sensor provided in an embodiment of the present invention;
[0039] Figure 4 A reference light energy value on a CMOS photosensitive device provided in an embodiment of the present invention;
[0040] Figure 5 This invention provides an embodiment of the light energy value of a CMOS photosensitive device with dirt when there is no test object.
[0041] Figure 6 This invention provides an embodiment of the light energy value of a CMOS photosensitive device without contamination when there is a test object present.
[0042] Figure 7 This invention provides an embodiment of the light energy value of a CMOS photosensitive device with dirt when there is a test object present.
[0043] Figure 8 This is a schematic diagram of the structure of a lens dirt self-inspection device for a correction sensor provided in an embodiment of the present invention;
[0044] Figure 9 This is a schematic diagram of the structure of a device provided in an embodiment of the present invention;
[0045] Figure 10 This is a schematic diagram of a storage medium structure according to an embodiment of the present invention.
[0046] Among them, 10 is the transmitter, 11 is the transmitting area lens, 20 is the receiver, 21 is the receiving area lens, 22 is the CMOS photosensitive device, 23 is the MCU main control unit, and 30 is the parallel beam. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0048] To make the description of this disclosure more detailed and complete, illustrative descriptions of embodiments and specific examples of the present invention are provided below; however, these are not the only forms of implementing or utilizing the specific embodiments of the present invention. The embodiments cover features of multiple specific embodiments and the methods, steps, and their order for constructing and operating these specific embodiments. However, other specific embodiments may also be used to achieve the same or equivalent functions and step sequences. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.
[0049] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.
[0050] In the description of the embodiments of the present invention, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The word "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more. Other quantifiers should be understood similarly. The preferred embodiments described herein are only used to illustrate and explain the present invention and are not intended to limit the present invention. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0051] Please refer to Figures 1-2 , Figure 1 This is a schematic diagram of the overall structure of the transmitter and receiver of a correction sensor provided in an embodiment of the present invention. Figure 2 This is a cross-sectional view of the transmitter and receiver of a polarization correction sensor provided in an embodiment of the present invention. In this embodiment, the polarization correction sensor consists of a transmitter 10 and a receiver 20. A parallel light beam 30 emitted by the transmitter 10 illuminates the CMOS photosensitive device 22 of the receiver. The CMOS photosensitive device 22 is formed by arranging multiple pixels. The function of the CMOS photosensitive device is to convert light energy into analog signals. The MCU main control unit 23 of the receiver 20 collects and converts the light signals of each pixel of the CMOS photosensitive device 22 into digital light energy values. Finally, the position of the object in the detection area is calculated by an algorithm. In actual industrial application environments, the outer surfaces of the transmitting area lens 11 of the transmitter and the receiving area lens 21 of the receiver of the polarization correction sensor are prone to adhering to dust, hair, and other minute contaminants, resulting in a low accuracy rate of the polarization correction sensor's self-detection of dirty lenses.
[0052] To address the aforementioned technical problem of low accuracy in the self-inspection of dirt on the lens of the polarization correction sensor, this invention provides a method for self-inspection of dirt on the lens of the polarization correction sensor. Please refer to... Figure 3 , Figure 3 This is a flowchart illustrating a lens contamination self-inspection method for a polarization correction sensor according to an embodiment of the present invention. The lens contamination self-inspection method specifically includes the following steps S10-S50:
[0053] S10: Obtain the correction sensor to be self-tested, perform optical axis calibration on the correction sensor, and record the reference light energy value of each pixel on the CMOS photosensitive device of the correction sensor. Specifically, in this embodiment of the invention, the optical axis of the correction sensor needs to be calibrated first to determine whether the parallel light emitted by the transmitter of the correction sensor is within the receiving area. Optical axis calibration can eliminate errors caused by optical path deviation. At the same time, the reference light energy value of each pixel is recorded, providing an accurate reference standard for subsequent comparison and analysis.
[0054] S20: Real-time acquisition of the light energy value of each pixel in the light-receiving area of the CMOS image sensor to be self-tested, and division of the pixels in the light-receiving area of the CMOS image sensor into several pixel units at fixed intervals. Specifically, in this embodiment of the invention, by acquiring the light energy value of each pixel in the light-receiving area of the CMOS image sensor in real time, the current working status of the sensor can be obtained in a timely manner, ensuring the real-time performance and accuracy of the data. Furthermore, the pixels in the light-receiving area of the CMOS image sensor can be divided into several pixel units at intervals of 200 pixels, such as 1-200 pixels as one pixel unit, 201-400 pixels as one pixel unit, and 401-600 pixels as one pixel unit. Dividing the pixels into several pixel units can refine the data acquisition and ensure accurate monitoring of the light energy values in different areas.
[0055] S30: Calculate the current total energy value E1 and the current reference total energy value E2 of each pixel unit in the light-gathering area of the CMOS image sensor. Specifically, in this embodiment of the invention, by calculating the difference between the current total energy value E1 and the reference total energy value E2 of each pixel unit, any changes in light energy caused by dirt or other problems can be effectively detected.
[0056] S40: Compare the current total energy value E1 of each pixel unit in the light-receiving area with the current reference total energy value E2 of the corresponding pixel unit. Specifically, in this embodiment of the invention, by comparing the current total energy value E1 of each pixel unit in the light-receiving area with the current reference total energy value E2 of the corresponding pixel unit, it is possible to identify whether the light energy value of each pixel module on the CMOS photosensitive device of the real-time detected polarization correction sensor has attenuated, and further determine whether dirt or contaminants have adhered to the polarization correction sensor.
[0057] S50: If the ratio of the current total energy value E1 of each pixel unit in the light-receiving area to the reference total energy value E2 of the corresponding pixel unit is less than a preset threshold, it is determined that the lens of the polarization correction sensor is dirty. Specifically, in this embodiment of the invention, it can be preset that when the lens is not dirty, the ratio of the current total energy value E1 of each pixel unit in the light-receiving area to the reference total energy value E2 of the corresponding pixel unit is greater than 0.9, that is, the current total energy value E1 of each pixel unit in the light-receiving area is less than 90% of the reference total energy value E2 of the corresponding pixel unit, indicating that the light energy value has decayed and dirt has adhered to the polarization correction sensor.
[0058] As a further preferred option, please refer to Figure 4 , Figure 4This invention provides a reference light energy value on a CMOS photosensitive device. In step S20, a polarization correction sensor to be self-tested is acquired, the optical axis of the polarization correction sensor is calibrated, and the reference light energy value of each pixel on the CMOS photosensitive device of the polarization correction sensor is recorded. Specifically, this includes steps S11-S12:
[0059] S11: When there are no obstructions between the transmitter and receiver of the correction sensor, a calibration command is sent through the host computer connected to the correction sensor. Specifically, in this embodiment of the invention, as follows... Figure 4 As shown, when there are no obstructions between the transmitter and receiver of the polarization correction sensor, and all the parallel light from the transmitter hits the CMOS image sensor of the receiver, the light energy value of each pixel in the light-receiving area of the CMOS image sensor does not show significant attenuation. Choosing to perform calibration when there are no obstructions between the transmitter and receiver avoids the influence of external interference such as dust, foreign objects, and obstructions on the acquisition of reference light energy, effectively ensuring the accuracy of the acquired reference light energy value.
[0060] S12: The receiver of the polarization correction sensor responds to the calibration command sent by the host computer, and the MCU unit of the receiver records the reference light energy value of each pixel of the CMOS image sensor. Specifically, in this embodiment of the invention, the receiver of the polarization correction sensor automatically responds to the host computer command to perform data acquisition and recording, which can reduce human operation errors. Recording the reference light energy value of the CMOS image sensor pixel by pixel helps to accurately identify the light energy changes of each pixel unit in the subsequent process.
[0061] As a further preferred embodiment, in step S20, the light energy value of each pixel in the light-receiving area of the CMOS photosensitive device of the correction sensor to be self-tested is acquired in real time, and the pixels in the light-receiving area of the CMOS photosensitive device are divided into several pixel units at fixed intervals, specifically including step S21:
[0062] S12: The current light energy value of each pixel unit in the light-receiving area of the CMOS image sensor and the current reference light energy value of the corresponding pixel unit are accumulated and calculated to obtain the current total energy value E1 of each pixel unit in the light-receiving area and the current reference total energy value E2 of the corresponding pixel unit. Specifically, in this embodiment of the invention, the current light energy values of each pixel unit in the light-receiving area of the CMOS image sensor can be accumulated and calculated. For example, pixels 1 to 200 on the CMOS image sensor are the first pixel unit, pixels 201 to 400 are the second pixel unit, and pixels 401 to 600 are the third pixel unit. The current light energy value of the second pixel unit in the light-receiving area of the CMOS image sensor is the sum of the first and second pixel units, that is, the sum of pixels 1 to 400 on the CMOS image sensor. The current light energy value of the third pixel unit is the sum of the first, second, and third pixel units, that is, the sum of pixels 1 to 600 on the CMOS image sensor. By accumulating and calculating the light energy value of each pixel unit, this embodiment of the invention can effectively integrate the data of each pixel unit.
[0063] As a further preferred option, please refer to Figure 5 , Figure 5 This invention provides an embodiment of light energy values for a CMOS photosensitive device with dirt when there is no object being tested. Step S30, which compares the current total energy value E1 of each pixel unit in the light-receiving area with the current reference total energy value E2 of the corresponding pixel unit, specifically includes step S31:
[0064] S31: When the polarization correction sensor to be self-tested has no object under test, the current total energy value E1 of each pixel unit on the CMOS photosensitive device is compared with the current reference total energy value E2 of the corresponding pixel unit. Specifically, in this embodiment of the invention, when the polarization correction sensor to be self-tested has no object under test, there is no light-blocking area on the CMOS photosensitive device. By comparing the current total energy value E1 of each pixel unit with the current reference total energy value E2 of the corresponding pixel unit, it is possible to accurately identify which pixel units have experienced a decrease in light energy value, such as... Figure 5 As shown, when there is no object to be tested in the self-testing correction sensor, tiny hairs adhere to the receiving lens of the correction sensor, and the light energy at approximately 700 pixels is attenuated.
[0065] As a further preferred option, please refer to Figures 6-7 , Figure 6 This invention provides an embodiment of the light energy value of a CMOS photosensitive device without contamination when there is a test object present. Figure 7This invention provides an embodiment of light energy values for a CMOS photosensitive device with dirt when there is a test object present. Step S30, which compares the current total energy value E1 of each pixel unit in the light-receiving area with the current reference total energy value E2 of the corresponding pixel unit, further includes steps S32-S33:
[0066] S32: When the self-testing correction sensor has a test object, calculate the boundary line between the light-blocking area and the light-incoming area on the CMOS photosensitive device. Specifically, in this embodiment of the invention, the position of the test object in the detection area of the correction sensor can be calculated by calculating the position of the boundary line between the light-blocking area and the light-incoming area on the CMOS photosensitive device; for example... Figure 6 As shown, there is a measured object between the transmitter and receiver of the correction sensor. The front half is a light-blocking area, and the back half is a light-incoming area.
[0067] S33: From the direction of the light-receiving area of the calculated boundary line, compare the current total energy value E1 of each pixel unit on the CMOS image sensor with the current reference total energy value E2 of the corresponding pixel unit, pixel by pixel. Specifically, in the embodiments of the present invention, as follows... Figure 7 As shown, there is a measured object between the transmitter and receiver of the polarization correction sensor, and tiny hairs are adhered to the receiving lens, resulting in a decrease in light energy around the approximately 1600 pixel position. Comparing the current total energy value E1 of each pixel unit on the CMOS image sensor with the current reference total energy value E2 of the corresponding pixel unit helps to identify minute changes in energy values in local areas.
[0068] As a further preferred embodiment, in step S32, when the polarization correction sensor to be self-tested has a test object, the boundary line between the light-blocking area and the light-receiving area on the CMOS photosensitive device is calculated. Step S32 specifically includes:
[0069] S321: Obtain the maximum light energy value of the light-receiving area of the correction sensor, and preset a preset percentage of the maximum light energy value as a dynamic threshold. Specifically, in this embodiment of the invention, 85% of the maximum light energy value of the light-receiving area can be used as the threshold. If a pixel from the CMOS image sensor is detected to exceed 85% of the maximum light energy value, then the pixel of the CMOS image sensor is considered a pixel of the light-receiving area.
[0070] S322: Scan pixel by pixel from the light-shielding area to the light-receiving area of the CMOS image sensor, and preset the position of the first pixel exceeding the dynamic threshold as the boundary line between the light-shielding area and the light-receiving area. Specifically, in this embodiment of the invention, the boundary line can be found pixel by pixel from the light-shielding area to the light-receiving area, and the position of the first pixel with energy greater than the threshold can be used as the boundary line.
[0071] As a further preferred embodiment, after determining that the lens of the polarization correction sensor is dirty if the ratio of the current total energy value E1 of each pixel unit in the light-receiving area to the reference total energy value E2 of the corresponding pixel unit exceeds a preset threshold, the method further includes:
[0072] S60: If it is determined that the lens of the polarization correction sensor is dirty, a dirt warning event is sent to the host computer through the receiver of the polarization correction sensor. Specifically, in this embodiment of the invention, the receiver of the polarization correction sensor compares the current total energy value E1 of each pixel unit in the light-receiving area of the CMOS photosensitive device with the reference total energy value E2 of the corresponding pixel unit in each sampling cycle. If energy attenuation is detected and dirt is found adhering to the polarization correction sensor, the receiver sends a dirt warning event to the external system in real time. After receiving the warning event, the external system promptly performs a lens wiping and cleaning action.
[0073] On the other hand, the present invention also provides a lens dirt self-checking device for a correction sensor, please refer to... Figure 8 , Figure 8 A schematic diagram of a lens contamination self-inspection device for a polarization correction sensor provided in an embodiment of the present invention includes: an acquisition module 81, used to acquire the polarization correction sensor to be self-inspected, perform optical axis calibration on the polarization correction sensor, and record the reference light energy value of each pixel on the CMOS photosensitive device of the polarization correction sensor; a division module 82, used to collect the light energy value of each pixel in the light-receiving area of the CMOS photosensitive device of the polarization correction sensor to be self-inspected in real time, and divide the pixels in the light-receiving area of the CMOS photosensitive device into several pixel units at fixed intervals; a calculation module 83, used to calculate the current total energy value E1 of each pixel unit in the light-receiving area of the CMOS photosensitive device and the current reference total energy value E2 of the corresponding pixel unit; a comparison module 84, used to compare the current total energy value E1 of each pixel unit in the light-receiving area with the current reference total energy value E2 of the corresponding pixel unit; and a determination module 85, which determines that the lens of the polarization correction sensor is contaminated if the ratio of the current total energy value E1 of each pixel unit in the light-receiving area to the reference total energy value E2 of the corresponding pixel unit is less than a preset threshold.
[0074] The lens dirt self-inspection device of the correction sensor provided in this embodiment of the invention can execute the technical solution of the lens dirt self-inspection method of the correction sensor in any of the above embodiments. Its implementation principle and beneficial effects are similar to those of the lens dirt self-inspection method of the correction sensor. Please refer to the implementation principle and beneficial effects of the lens dirt self-inspection method of the correction sensor, which will not be repeated here.
[0075] Please refer to Figure 9 , Figure 9 This is a schematic diagram of the structure of a device provided in an embodiment of the present invention. Figure 9As shown, the device 90 includes a processor 91 and a memory 92 coupled to the processor 91. The memory 92 stores program instructions for implementing the lens dirt self-checking method of the correction sensor in any of the above embodiments. The processor 91 executes the program instructions stored in the memory 92. The processor 91 may also be referred to as a CPU (Central Processing Unit). The processor 91 may be an integrated circuit chip with signal processing capabilities. The processor 91 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor may be a microprocessor or any conventional processor.
[0076] Please refer to Figure 10 , Figure 10 This is a schematic diagram of a storage medium structure according to an embodiment of the present invention. The storage medium 100 of this embodiment stores program instructions 101 capable of implementing the lens dirt self-checking method of the aforementioned correction sensor. These program instructions 101 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.
[0077] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0078] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
[0079] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A self-inspection method for lens dirt in a polarization correction sensor, characterized in that, include: Obtain the correction sensor to be self-tested, perform optical axis calibration on the correction sensor, and record the reference light energy value of each pixel on the CMOS photosensitive device of the correction sensor. Real-time acquisition of light energy values of each pixel in the light-receiving area of the CMOS photosensitive device to be self-tested, and division of the pixels in the light-receiving area of the CMOS photosensitive device into several pixel units at fixed intervals; Calculate the current total energy value E1 and the current reference total energy value E2 of each pixel unit in the light-gathering area of the CMOS image sensor. The current total energy value E1 of each pixel unit in the light-receiving area is compared with the current reference total energy value E2 of the corresponding pixel unit; If the ratio of the current total energy value E1 of each pixel unit in the light-receiving area to the reference total energy value E2 of the corresponding pixel unit is less than a preset threshold, it is determined that the lens of the correction sensor is dirty.
2. The lens dirt self-inspection method for the correction sensor according to claim 1, characterized in that, The process of acquiring the correction sensor to be self-tested, performing optical axis calibration on the correction sensor, and recording the reference light energy value of each pixel on the CMOS photosensitive device of the correction sensor includes: When there are no obstructions between the transmitter and receiver of the correction sensor, a calibration command is sent through the host computer connected to the correction sensor. The receiver of the correction sensor responds to the calibration command sent by the host computer, and the MCU unit of the receiver records the reference light energy value of each pixel of the CMOS photosensitive device.
3. The lens contamination self-inspection method for the correction sensor according to claim 1, characterized in that, The calculation of the current total energy value E1 and the current reference total energy value E2 of each pixel unit in the light-gathering area of the CMOS image sensor includes: The current light energy value of each pixel unit in the light-receiving area of the CMOS photosensitive device and the current reference light energy value of the corresponding pixel unit are accumulated and calculated to obtain the current total energy value E1 of each pixel unit in the light-receiving area and the current reference total energy value E2 of the corresponding pixel unit.
4. The lens contamination self-inspection method for the correction sensor according to claim 1, characterized in that, The step of comparing the current total energy value E1 of each pixel unit in the light-receiving region with the current reference total energy value E2 of the corresponding pixel unit includes: When there is no object to be tested in the self-testing correction sensor, the current total energy value E1 of each pixel unit on the CMOS photosensitive device is compared with the current reference total energy value E2 of the corresponding pixel unit.
5. The lens dirt self-inspection method for the correction sensor according to claim 4, characterized in that, The step of comparing the current total energy value E1 of each pixel unit in the light-receiving region with the current reference total energy value E2 of the corresponding pixel unit further includes: When the correction sensor to be self-tested has a test object, calculate the boundary line between the light-blocking area and the light-incoming area on the CMOS photosensitive device. Starting from the light-incoming region direction of the calculated boundary line, each pixel unit compares the current total energy value E1 of each pixel unit on the CMOS image sensor with the current reference total energy value E2 of the corresponding pixel unit.
6. The lens contamination self-inspection method for the correction sensor according to claim 5, characterized in that, When the self-testing correction sensor has an object to be tested, the calculation of the boundary line between the light-blocking area and the light-receiving area on the CMOS photosensitive device includes: Obtain the maximum light energy value of the light-receiving area of the correction sensor, and preset a preset percentage of the maximum light energy value as a dynamic threshold; The system scans pixel by pixel from the light-shielding area to the light-receiving area of the CMOS image sensor, and the position of the first pixel that exceeds the dynamic threshold is preset as the boundary between the light-shielding area and the light-receiving area.
7. The lens contamination self-inspection method for the correction sensor according to claim 1, characterized in that, If the ratio of the current total energy value E1 of each pixel unit in the light-receiving area to the reference total energy value E2 of the corresponding pixel unit exceeds a preset threshold, and the lens of the polarization correction sensor is determined to be dirty, the method further includes: If the lens of the correction sensor is determined to be dirty, a dirt warning event is sent to the host computer through the receiver of the correction sensor.
8. A lens dirt self-inspection device for a polarization correction sensor, characterized in that, include: The acquisition module is used to acquire the correction sensor to be self-tested, perform optical axis verification on the correction sensor, and record the reference light energy value of each pixel on the CMOS photosensitive device of the correction sensor. The partitioning module is used to collect the light energy value of each pixel in the light-receiving area of the CMOS photosensitive device of the correction sensor to be self-tested in real time, and to divide the pixels in the light-receiving area of the CMOS photosensitive device into several pixel units at fixed intervals. The calculation module is used to calculate the current total energy value E1 and the current reference total energy value E2 of each pixel unit in the light-gathering area of the CMOS image sensor. The comparison module is used to compare the current total energy value E1 of each pixel unit in the light-receiving area with the current reference total energy value E2 of the corresponding pixel unit. If the ratio of the current total energy value E1 of each pixel unit in the light-receiving area to the reference total energy value E2 of the corresponding pixel unit is less than a preset threshold, the determination module determines that the lens of the correction sensor is dirty.
9. A device, characterized in that, The device includes a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements a method for self-detection of lens dirt by the correction sensor as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium stores program instructions, which, when executed by a processor, implement a method for self-checking lens dirt of the correction sensor as described in any one of claims 1 to 7.