Method for preventing misjudgment caused by smudginess and scratches on surface of optical filter

By dynamically updating the reflected structured light inside the optical sensor and approaching the threshold, the misjudgment problem caused by dirty and scratches on the filter surface is solved, achieving a lower cost misjudgment reduction effect.

CN120067754APending Publication Date: 2025-05-30南京天易合芯电子有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510139584.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-07
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In existing optical sensors, dirty surfaces and scratches on the filter cause internal reflected structure light to increase, exceeding the threshold, and misjudgment occurs.

Method used

By dynamically updating the internal reflected structured light and approaching the far away threshold, the threshold value is adjusted to reduce misjudgment according to the difference between the initial reflected structured light value and the current reflected structured light value.

Benefits of technology

It effectively overcomes the misjudgment problem caused by filter damage, reduces costs, and solves the misjudgment situation caused by dirt and scratches in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067754A_ABST
    Figure CN120067754A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of optical identification, and discloses a method for preventing misjudgment caused by smudginess and scratches on the surface of an optical filter, which comprises the following steps of: 1, acquiring an initial reflection structured light value, and setting a proximity threshold value and a departure threshold value according to the initial reflection structured light value; and step 2, reading a current reflection structured light value, if the current reflection structured light value exceeds a proximity threshold value, determining that an object approaches, and at the moment, not modifying default configuration by the equipment until the object enters a far-away state. Through a software following method, the internal reflection structure light and the approaching and leaving threshold can be dynamically updated, misjudgment caused by optical filter damage is overcome, and the problem that in the prior art, the internal reflection structure light of an optical sensor product can be increased due to dirt and scratches, and the optical sensor product is damaged is solved. And the light of the internal reflection structure is greater than the approaching threshold, so that misjudgment is caused.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of optical recognition, and particularly relates to a method for preventing misjudgment caused by dirt and scratches on the surface of a filter Background Art

[0002] Currently, optical proximity sensors are used in electronic products for proximity and distance functions. For example, in a children's learning tablet computer, when a child gets too close, it will alarm and reduce the screen brightness.

[0003] Currently, filters are used in optical sensors for light transmission and waterproofing. During long-term use, the surface of the filter will get dirty and scratched due to the external environment. The dirt and scratches will increase the internal reflected structured light of the optical sensor product, resulting in the internal reflected structured light being greater than the proximity threshold and thus causing misjudgment (thinking that there is an object approaching when there is no object approaching in front).

[0004] The prior art includes:

[0005] 1. Improve the filter material to make it wear-resistant and reduce the risk of scratches, but this method has a high cost;

[0006] 2. Increase the difference between the proximity threshold and the internal reflected structured light to increase the acceptance of oil stains and scratches. However, after long-term use, there will still be oil stains and scratches, and there will still be a situation of misjudgment. Summary of the Invention

[0007] The purpose of the present invention is to solve the problems existing in the prior art, and to propose a method for preventing misjudgment caused by dirt and scratches on the surface of a filter.

[0008] In order to achieve the above purpose, the present invention adopts the following technical solutions:

[0009] A method for preventing misjudgment caused by dirt and scratches on the surface of a filter, including the following steps:

[0010] Step 1, obtain the initial value of the reflected structured light, and set the proximity threshold and the distance threshold according to the initial value of the reflected structured light;

[0011] Step 2, read the current value of the reflected structured light. If the current value of the reflected structured light exceeds the proximity threshold, it is determined that an object is approaching. At this time, the device does not modify the default configuration until the object enters the away state;

[0012] Step 3, after the device enters the away state, read the current value of the reflected structured light, and continuously read it three times. When it is determined that there is no object approaching in all three readings, then proceed to Step 4;

[0013] Step 4, update the initial value of the reflected structured light to the second reading, and at the same time update the proximity threshold and the distance threshold;

[0014] Step Five, Steps Two to Four are repeated cyclically.

[0015] Preferably, the specific process of Step Three is as follows:

[0016] The three consecutive readings are denoted as PSO, PS1, and PS2. When the absolute values of the differences between the three readings and the initial reflected structured light value are all within the set range, Step Four is carried out. If not within the set range, the cycle test continues from Step Two.

[0017] Preferably, in Step Four, to prevent approaching the threshold saturation, it is judged whether the difference between the sum of the approaching threshold and the PS2 reflection value and the initial reflected structured light value is less than the set value. If less than the set value, the initial reflected structured light value is updated to PS2, and the approaching threshold and the far - away threshold are updated.

[0018] Preferably, in Step Four, if the difference between the sum of the approaching threshold and the PS2 reflection value and the initial reflected structured light value is greater than or equal to the saturation set value, the initial reflected structured light value, the approaching threshold, and the far - away threshold are not updated.

[0019] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0020] Through the software following method, the present invention can dynamically update the internal reflected structured light and the approaching and far - away thresholds, overcome the misjudgment caused by the damage of the filter, and solve the problem in the prior art that dirt and scratches will increase the internal reflected structured light of the optical sensor product, resulting in misjudgment when the internal reflected structured light is greater than the approaching threshold. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a schematic flowchart of a method for preventing misjudgment caused by dirt and scratches on the surface of a filter. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments.

[0023] Referring to Figure 1 , a method for preventing misjudgment caused by dirt and scratches on the surface of a filter. Taking a proximity sensor as an example, the proximity sensor itself integrates a receiving photosensitive diode and a laser. By driving its own laser to emit light, the photosensitive diode of itself measures the light reflected by the laser encountering an obstacle in front and converts it into an internal digital signal value PS. Through various modes of judgment, the structured light and the approaching and far - away thresholds are dynamically changed to reduce misjudgment. The specific steps are as follows:

[0024] Step 1: Through calibration before the whole machine leaves the factory, obtain the initial reflected structured light PScrosspre, and set the proximity threshold H_THOD (equal to PScrosspre + set target difference) and the far threshold L_THOD (equal to H_THOD - 200) according to the initial reflected structured light value, and store them in the hard disk of the whole machine;

[0025] Step 2: Turn on the machine and read the PS value. If the PS value exceeds the proximity threshold, enter the wearing state. At this time, the whole machine does not modify the default configuration and waits until the whole machine enters the far state (to prevent an object from blocking in front of the filter before the machine is turned on. If the method of the present invention is called at this time, the whole machine will not be able to recognize the object all the time);

[0026] Step 3: After the whole machine enters the far state, read the PS value. Continuously read three numbers, PSO (the first reading), PS1 (the second reading), PS2 (the third reading). At the same time, all three conditions are met, and the absolute values of (PS0 - PScrosspre), (PS1 - PScrosspre), and (PS2 - PScrosspre) all meet the set range (the minimum value is the interference noise of the chip, which can be calculated as 10, and the maximum value is L_THOD / 2). If not, return to Step 1 and continue the loop test (Note: Continuously read 3 times. If an object approaches the sensor in the middle, the method of the present invention is not called. Continuously read 3 times. When ensuring that there is no object and only the filter itself changes, the method of the present invention is called);

[0027] Step 4: Take PS2 as PScross (the current internal reflected structured light). In order to prevent H_THOD from saturating, judge whether H_THOD + PScross - PScrosspre < 3800 holds (for example, the saturation data is 4096, leaving a margin, and the maximum cannot exceed 3800). If the judgment holds, put processpre = process in the hard disk, and at the same time upgrade the values of H_THOD and LTHOD in the hard disk.

[0028] Step 5: Repeat Steps 2 to 4 in a loop.

[0029] Compared with the prior art, by improving the filter material to make it friction-resistant and reduce the risk of scratches, or by increasing the difference between the proximity threshold and the internal reflected structured light to increase the acceptance of oil stains and scratches, the present invention can dynamically update the internal reflected structured light and the proximity and far thresholds, overcome the misjudgment caused by filter damage, solve the situation in the prior art where dirt and scratches will increase the internal reflected structured light of the optical sensor product, resulting in the internal reflected structured light being greater than the proximity threshold and thus causing misjudgment, and the cost is lower.

[0030] As described above, it is only the preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution of the present invention and its inventive concept, making equivalent substitutions or changes, shall be covered by the protection scope of the present invention.

Claims

1. A method for preventing misjudgment caused by dirt and scratches on the filter surface, characterized in that: The following steps are involved: Step 1, obtaining an initial reflected structured light value, and setting a proximity threshold and a distance threshold according to the initial reflected structured light value; Step 2: Read the current reflected structured light value. If the current reflected structured light value exceeds the proximity threshold, it is determined that an object is approaching. At this time, the device does not modify the default configuration until the object enters the far-away state. Step 3: After the device enters the away state, read the current reflected structured light value three times in a row. If it is determined that there is no object approaching in the three areas, proceed to step 4. Step 4, updating the initial reflected structured light value to the second reading, and updating the approach threshold and the distance threshold at the same time; Step 5: Steps 2 to 4 are repeated in a loop.

2. A method for preventing misjudgment caused by dirt and scratches on the filter surface according to claim 1, characterized in that: The specific process of step three is: The three consecutive readings are recorded as PSO, PS1 and PS2. When the absolute values ​​of the differences between the three readings and the initial reflected structured light values ​​are within the set range, step 4 is performed. If not within the set range, the test is continued from step 2 in a loop.

3. The method for preventing misjudgment caused by dirt and scratches on the filter surface according to claim 1, characterized in that: In step 4, in order to prevent the proximity threshold from being saturated, it is determined whether the difference between the sum of the proximity threshold and the PS2 reflection value and the initial reflection structured light value is less than the set value. If it is less than the set value, the initial reflection structured light value is updated to PS2, and the proximity threshold and the distance threshold are updated.

4. The method for preventing misjudgment caused by dirt and scratches on the filter surface according to claim 3, characterized in that: In the step 4, if the difference between the sum of the proximity threshold and the PS2 reflection value and the initial reflection structured light value is greater than or equal to the saturation setting value, the initial reflection structured light value, the proximity threshold and the distance threshold are not updated.