A noise filtering method, device and storage medium
By analyzing the change law of spot position in the image, the noise filtering problem of the triangular ranging system under sunlight interference is solved, the distance measurement accuracy and stability are improved, the misjudgment and calculation burden is reduced, and the burden of misjudgment and calculation is enhanced. The robustness and response speed of the system are achieved.
Patent Information
- Application Number
- CN202411497515.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-10-25
AI Technical Summary
The triangular ranging system is difficult to effectively filter out noise without accidentally filtering out effective information under strong sunlight interference. The existing technology methods have misjudgment and false filtering, which affects the accuracy and stability of the ranging.
By analyzing the position change pattern of the target spot in multi-frame images, identifying and filtering out the noise spot, using the spot position offset and change rate threshold to determine the noise spot, filtering out the noise in real time, reducing post-processing complexity and misjudgment.
It improves the accuracy of noise filtering and ranging accuracy, enhances the system's response speed and robustness, reduces misjudgment and calculation burden, adapts to complex lighting conditions, and provides more stable depth perception capabilities.
Smart Images

Figure CN119006295B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image signal processing, and in particular to a noise filtering method, device and storage medium. Background Art
[0002] In the current technological context, with the rapid development of artificial intelligence technologies such as robots and autonomous driving, obtaining environmental depth information has become an important basis for these intelligent devices to accurately locate, avoid obstacles and make autonomous decisions. The acquisition of environmental depth information usually relies on a variety of sensor technologies, among which lidar, depth vision, and ultrasonic sensors are the most common solutions. These technologies provide devices with three-dimensional depth perception capabilities, allowing devices to understand and cope with complex environments. However, the accuracy and stability of depth information acquisition largely depends on the ranging technology used.
[0003] At present, the widely used ranging technologies in the market are mainly divided into two categories: triangulation and time of flight (TOF). Among them, triangulation ranging has been widely used in home and commercial ranging devices due to its cost advantage. Although triangulation ranging technology has certain advantages, it still faces some challenges in practical applications. For example, in order to ensure the accuracy of ranging, the triangulation ranging system often works in the infrared band and is equipped with filters and laser light sources to reduce the interference of ambient light. However, as a powerful natural infrared light source, the sun brings great interference to the triangulation ranging system. The infrared noise generated by sunlight usually has strong ray characteristics, which not only affects the ranging accuracy, but also may cause troubles to users.
[0004] In order to avoid interference from sunlight, traditional filtering methods include identifying these ray characteristics and filtering them out, but this method may mistakenly filter out valid information in actual measurement, especially when the object being measured is parallel to the optical path, this false filtering phenomenon is more serious.
[0005] The prior art also includes that CN110443275B discloses a method, device and storage medium for removing noise, which identifies sampling points that meet the conditions (there are N consecutive sampling points belonging to the same straight line, and the straight line points to the camera coordinate origin of the triangulation laser radar, and N is an integer greater than 1) as noise points based on the position information of each sampling point transmitted sequentially by the triangulation laser radar, and removes the noise points.
[0006] However, this method performs post-processing filtering based on the collected point cloud data, and the features are not stable (if a few points are filtered out by other mechanisms, it will not conform to the rules of post-processing), and this method is easily confused with straight objects perpendicular to the radar, resulting in misjudgment.
[0007] In order to further identify the noise caused by sunlight interference, CN102034091B discloses a spot recognition method and device for a digital solar sensor, which uses the spot size and grayscale value to capture whether the previous and next frames are the same spot, and then distinguishes the solar spot and the earth spot according to the movement trajectory of the spot. The solar spot is easily affected by the changes in imaging and loses the match of the solar spot, resulting in missed recognition of the solar spot.
[0008] Therefore, in order to further improve the adaptability of triangulation ranging systems in complex environments, especially under strong sunlight interference, it is urgent to develop more intelligent and robust filtering algorithms to ensure that effective information in the ranging process is retained while filtering out noise. This will help improve the performance of ranging equipment under various lighting conditions and provide more reliable depth perception capabilities for applications such as robots and autonomous driving. Summary of the invention
[0009] In view of this, the purpose of the present application is to provide a noise filtering method, device and storage medium, which can identify and filter out noise spots by analyzing the position change pattern of the target light spot in multiple frames of images, thereby effectively avoiding the situation where valid information is mistakenly filtered out, thereby effectively improving the accuracy of the filtering results, and providing higher ranging accuracy and stability for applications in scenarios such as robots and autonomous driving.
[0010] The present invention provides a noise filtering method, which includes:
[0011] For each frame of the acquired multiple frames of original images, determine the spot position of each target spot in the frame of original image; the original image is an image collected by an optical sensor used by a triangulation distance measurement method;
[0012] According to the spot position of each target spot in the original image, the position offset between the target spots between adjacent frames is calculated;
[0013] According to the position offset between two target light spots in adjacent frames, it is determined whether there is a target light spot that satisfies the position variation rule of the noise light spot;
[0014] The target light spot satisfying the noise light spot position variation rule is determined as the noise light spot, and at least one noise light spot is filtered out according to a preset filtering strategy.
[0015] Optionally, the target spot on each frame of the original image is determined by the following steps:
[0016] Identify the light spots on each frame of the original image respectively, and determine all the original light spots on each frame of the original image;
[0017] For each frame of original image, the original light spots on the frame of original image that meet the preset screening requirements are determined as the target light spots of the frame of original image, and the spot position of each target light spot is determined.
[0018] Optionally, determining whether there is a target light spot satisfying a noise light spot position variation rule according to a position offset between two target light spots between adjacent frames includes:
[0019] According to the time continuity requirement, one target light spot is selected from each of the original images for combination to obtain at least one light spot group;
[0020] For any light spot group, according to the time increasing principle, the ratio of the offsets of two adjacent positions in the light spot group is calculated to obtain at least one offset change rate of the light spot group;
[0021] Determine whether the difference between each offset change rate of the light spot group and the corresponding change rate threshold is within a preset error range;
[0022] If they are all located at , it is determined that the target light spot in the light spot group meets the law of position variation of the noise light spot; otherwise, it is determined that the light spot group does not meet the law of position variation of the noise light spot.
[0023] Optionally, the change rate threshold corresponding to each offset change rate is determined by the following steps:
[0024] Get the initial rotation angle corresponding to each frame of the original image;
[0025] For any offset change rate, determine the total rotation angle according to the initial rotation angle of the original image corresponding to the offset change rate;
[0026] The total rotation angle is used to search for a corresponding change rate threshold from a pre-constructed angle-change rate threshold correspondence table to determine the change rate threshold corresponding to the offset change rate.
[0027] Optionally, filtering out at least one noise spot according to a preset filtering strategy includes:
[0028] If the optical sensor includes an active light source, filtering out at least one noise light spot according to a preset filtering strategy;
[0029] If the optical sensor does not contain an active light source, the largest noise light spot is filtered out according to a preset filtering strategy.
[0030] Optionally, construct an angle-change rate threshold correspondence table by following the steps below:
[0031] Obtain the rotation angle range when the light spot corresponding to the interference light source irradiates the edge of the optical sensor;
[0032] According to the preset sampling angular velocity and sampling interval time, multiple sampling rotation angles and the total sampling time when rotating to the sampling rotation angles are selected from the rotation angle range;
[0033] For each sampling rotation angle, the total sampling time, the preset sampling angular velocity and the sampling interval time corresponding to the sampling rotation angle are input into the change rate calculation formula to determine the change rate threshold corresponding to the sampling rotation angle;
[0034] According to all sampled rotation angles and their corresponding change rate thresholds, an angle-change rate threshold correspondence table is constructed.
[0035] Optionally, the change rate threshold corresponding to each offset change rate is determined by the following steps:
[0036] Get the initial rotation angle and image sampling interval corresponding to each frame of the original image;
[0037] For any offset change rate, determine the rotation angular velocity and the total sampling time according to the initial rotation angle of the original image and the image sampling interval time corresponding to the offset change rate;
[0038] The rotation angular velocity, the image sampling interval time and the total sampling time are input into a change rate calculation formula to determine a change rate threshold corresponding to the offset change rate.
[0039] Optionally, the change rate calculation formula is:
[0040]
[0041] in, L i For the i The position offset of the light spot within the sampling period, i.e. i Time and i- The difference in the position offset of the light spot at time 1 ,L i+1 For the i +1 The position offset of the light spot within the sampling period, that is, i+ 1st moment and i The difference in the position offset of the light spot at the moment, D is the change rate threshold, , , , , is the angular velocity, is the interval time, For total time.
[0042] Optionally, in an autonomous mobile device, the multiple frames of original images are obtained by the following method:
[0043] If the optical sensor can rotate by itself, the autonomous mobile device is controlled to be stationary, and the optical sensor is rotated by itself to obtain the multiple frames of original images;
[0044] If the optical sensor cannot rotate by itself, the autonomous mobile device is controlled to move to acquire the multiple frames of original images.
[0045] The embodiment of the present application further provides a noise filtering device, the noise filtering device comprising:
[0046] A first determination module is used to determine the spot position of each target spot in each frame of the original image among the acquired multiple frames of original images; the original image is an image collected by an optical sensor used by a triangulation distance measurement method;
[0047] A calculation module, used for calculating the position offset between target light spots between adjacent frames according to the light spot position of each target light spot in the original image;
[0048] The second determination module is used to determine whether there is a target light spot that satisfies the noise light spot position variation rule according to the position offset between two target light spots between adjacent frames;
[0049] The filtering module is used to determine the target light spot that meets the noise light spot position change rule as the noise light spot, and filter out at least one noise light spot according to a preset filtering strategy.
[0050] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the noise filtering method as described above are performed.
[0051] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the noise filtering method described above are executed.
[0052] The embodiments of the present application provide a noise filtering method, device and storage medium. The noise filtering method includes: determining the spot position of each target light spot in each frame of the original image among multiple frames of acquired original images; the original image is an image captured by an optical sensor used in a triangulation ranging method; calculating the position offset between target light spots between adjacent frames according to the spot position of each target light spot in the original image; determining whether there is a target light spot that satisfies a noise light spot position variation law according to the position offset between two target light spots between adjacent frames; determining the target light spot that satisfies the noise light spot position variation law as a noise light spot, and filtering out at least one noise light spot according to a preset filtering strategy. The method of determining whether there is a target light spot that satisfies the noise light spot position change rule according to the position offset between two target light spots between adjacent frames includes: selecting one target light spot from each of all original images for combination according to the time continuity requirement to obtain at least one light spot group; for any light spot group, calculating the ratio of two adjacent position offsets in the light spot group according to the time increasing principle to obtain at least one offset change rate of the light spot group; judging whether the difference between each offset change rate of the light spot group and the corresponding change rate threshold is within a preset error range; if both are within, determining that the target light spot in the light spot group satisfies the noise light spot position change rule; otherwise, determining that the light spot group does not satisfy the noise light spot position change rule; determining the change rate threshold corresponding to each offset change rate by the following steps: obtaining the initial rotation angle corresponding to each frame of the original image; for any offset change rate, determining the total rotation angle according to the initial rotation angle of the original image corresponding to the offset change rate; using the total rotation angle to find the corresponding change rate threshold from a pre-constructed angle-change rate threshold correspondence table to determine the change rate threshold corresponding to the offset change rate.
[0053] In this way, firstly, the original image is directly used to analyze the spot position, without the need to rely on the point cloud data, and noise such as sun spots can be identified and filtered out at an earlier stage, realizing real-time noise filtering. This processing method reduces the complexity of post-processing, enables the system to quickly filter out noise at the imaging stage, and improves the response speed and real-time performance of the overall ranging system. It can also avoid the errors generated in the point cloud generation process, and directly use the original image for spot filtering to simplify the processing flow, reduce the system's calculation burden, and improve the accuracy of subsequent processing results. Secondly, this technical solution can more effectively identify noise spots by analyzing the spot position offset in each frame of the image in real time, and judging the change rate based on continuous spot groups, so that the system can identify noise spots at an early stage, avoiding the misjudgment caused by the traditional method's reliance on complete point cloud data (reducing recognition errors caused by data loss or incompleteness), and this solution directly analyzes the collected spot position in real time, greatly reducing confusion with vertical objects and reducing misjudgment. Secondly, this technical solution can accurately identify noise spots that conform to the progressive law of solar spots by calculating the rate of change of the offset of every two adjacent spots in the spot group and combining time continuity to identify noise spots, and can reduce the problem of losing solar spots due to spot size and grayscale value, thereby making the identification of noise spots more robust and avoiding the mis-filtering of valid spots in scenes with complex and changing lighting conditions. In addition, when calculating the rate of change of spot offset, a preset rate of change threshold is used, and it is dynamically adjusted in combination with the initial rotation angle of each frame image, so that it can more flexibly adapt to the spot change characteristics under different environmental conditions, reducing the risk of misjudging and filtering out valid information in actual ranging. Therefore, this method determines whether the noise spot position change law is met according to the offset, change rate and dynamic threshold (dynamically adjusted according to the rotation angle) of the target spot in adjacent frames, avoids misjudging noise due to abnormal single frame position, can handle complex situations in dynamic environments more flexibly, and can ensure that noise spots can still be accurately identified and filtered under more complex conditions, improve the applicability of optical sensors in various scenarios, and enable autonomous mobile devices to provide more stable depth perception capabilities in complex environments. The change rate threshold (dynamic determination threshold) corresponding to the offset change rate can be determined by looking up the table according to the total rotation angle, which can increase the speed of determining the change rate threshold, and by pre-constructing the angle-change rate threshold correspondence table, the speed of threshold determination results can be further improved and the amount of calculation in the noise filtering process can be reduced. And through the pre-constructed "angle-change rate threshold correspondence table", it can adapt to the change of spots under various angle conditions, improve the efficiency of recognition, and enhance the robustness in the ranging process. Thereby providing higher ranging accuracy and stability for applications in scenarios such as robots and autonomous driving.
[0054] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 A flowchart of a noise filtering method provided in an embodiment of the present application;
[0057] Figure 2 Schematic diagram of the distance measurement principle of the triangulation distance measurement method;
[0058] Figure 3 This is an example of spot imaging of sunlight on an optical sensor;
[0059] Figure 4 A schematic diagram of the structure of a noise filtering device provided in an embodiment of the present application;
[0060] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.
[0062] First, the application scenarios to which the present application is applicable are introduced. The present application can be applied to autonomous mobile devices, and specifically to the field of robots, such as robots with ranging technology.
[0063] Research has found that in the current technological context, with the rapid development of artificial intelligence technologies such as robots and autonomous driving, obtaining environmental depth information has become an important basis for these intelligent devices to accurately locate, avoid obstacles, and make autonomous decisions. The acquisition of environmental depth information usually relies on a variety of sensor technologies, among which lidar, depth vision, and ultrasonic sensors are the most common solutions. These technologies provide devices with distance / depth perception capabilities, allowing devices to understand and cope with complex environments. However, the accuracy and stability of depth information acquisition largely depends on the ranging technology used.
[0064] At present, the widely used ranging technologies in the market are mainly divided into two categories: triangulation and time of flight (TOF). Among them, triangulation ranging has been widely used in home and commercial ranging devices due to its cost advantage. Although triangulation ranging technology has certain advantages, it still faces some challenges in practical applications. For example, in order to ensure the accuracy of ranging, the triangulation ranging system often works in the infrared band and is equipped with filters and laser light sources to reduce the interference of ambient light. However, as a powerful natural infrared light source, the sun brings great interference to the triangulation ranging system. The infrared noise generated by sunlight usually has strong ray characteristics, which not only affects the ranging accuracy, but also may cause troubles to users.
[0065] In order to avoid interference from sunlight, the traditional filtering method is mainly to identify these ray characteristics and filter them out, but this method may mistakenly filter out effective information in actual measurement, especially when the object to be measured is parallel to the optical path, this false filtering phenomenon is more serious.
[0066] Based on this, the embodiments of the present application provide a noise filtering method, device and storage medium, which can identify and filter out noise spots by analyzing the position change pattern of the target light spot in multiple frames of images, thereby effectively avoiding the situation where valid information is mistakenly filtered out, thereby effectively improving the accuracy of the filtering results, and providing higher ranging accuracy and stability for applications in scenarios such as robots and autonomous driving.
[0067] See also Figure 1 , Figure 1 Flow chart of a noise filtering method provided in an embodiment of the present application. The noise filtering method can be applied to a noise filtering device, which can be a robot, etc. Figure 1 As shown in , the noise filtering method provided in the embodiment of the present application includes:
[0068] S101 . For each frame of the acquired multiple frames of original images, determine the spot position of each target spot in the frame of original image.
[0069] S102, calculating the position offset between the target light spots between adjacent frames according to the light spot position of each target light spot in the original image.
[0070] S103 . Determine whether there is a target light spot that satisfies the position variation rule of the noise light spot according to the position offset between two target light spots between adjacent frames.
[0071] S104: Determine a target light spot that satisfies a noise light spot position variation rule as a noise light spot, and filter out at least one noise light spot according to a preset filtering strategy.
[0072] In a noise filtering method provided in the present application, firstly, the original image is directly used to analyze the spot position, without generating point cloud data, and noise such as sun spots can be identified and filtered out at an earlier stage, realizing real-time noise filtering. This processing method reduces the complexity of post-processing, enables the system to quickly filter out noise at the imaging stage, and improves the response speed and real-time performance of the overall ranging system. It can also avoid errors generated during the point cloud generation process, and directly use the original image for spot filtering to simplify the processing flow, reduce the system's computational burden, and improve the accuracy of subsequent processing results. Secondly, this technical solution can more effectively identify noise spots by analyzing the spot position offset in each frame of the image in real time, so that the system can identify noise spots at an early stage, avoiding the misjudgment caused by the traditional method's reliance on complete point cloud data (reducing recognition errors caused by data loss or incompleteness), and this solution directly analyzes the collected spot position in real time, greatly reducing confusion with vertical objects and reducing misjudgment. It can also avoid the problem of losing the sun spot due to the spot size and grayscale value, making the recognition of noise spots more robust and avoiding the false filtering of valid spots in scenes with complex and changeable lighting conditions.
[0073] Illustratively, during the operation of the autonomous mobile robot, the noise filtering method provided in this embodiment is used to filter the detection data collected by the laser radar installed on the robot, and the robot is controlled based on the filtered detection data, such as positioning and obstacle avoidance, to improve the accuracy of the robot's positioning and obstacle avoidance, and to improve the stability and efficiency of the robot's operation.
[0074] With respect to step S101, the original image is an image captured by an optical sensor used in the triangulation distance measurement method. Therefore, the original image is an image directly from the optical sensor without being processed.
[0075] For example, the optical sensor may be a CCD or CMOS sensor, wherein the original image captured by the optical sensor may be determined based on an electrical signal formed based on the number of photons received on the sensor surface.
[0076] For examples, see Figure 2 , Figure 2 Figure 1 is a schematic diagram of the distance measurement principle of the triangulation distance measurement method. Figure 2 As shown, the distance of the measured object ; where s is the distance from the laser to the center of the camera, f is the focal length of the camera, and x is the distance of the imaging spot on the optical sensor. Figure 2 It can be seen that x is the key parameter for obtaining the distance of the measured object. If there is interference from sunlight at this time, it may be sensitive to light at any position on the optical sensor, interfering with the imaging spot that captures the real measured object (the principle of binocular ranging is similar and will not be repeated here). Therefore, in order to ensure the accuracy of the subsequent ranging results, it is necessary to accurately filter out the noise spot.
[0077] For examples, see Figure 3 , Figure 3 This is an example of the spot imaging of sunlight on an optical sensor. Figure 3 As shown in Figure 1, if there is direct sunlight interference, it will produce unnecessary light spots on the optical sensor, such as Figure 3 As shown in the spot on the right, the sunlight spot will have a relatively obvious spot curve / surface similar to "normal distribution" on the device. However, since other objects may also present similar curves / surfaces, multiple frames are required to identify whether it is sunlight by the displacement law of the spot on the CMOS.
[0078] In one example, the multiple frames of original images are acquired by the following method: if the optical sensor can rotate by itself, the autonomous mobile device is controlled to be stationary, and the multiple frames of original images are acquired by the self-rotation of the optical sensor; if the optical sensor cannot rotate by itself, the autonomous mobile device is controlled to move to acquire the multiple frames of original images.
[0079] Here, the autonomous mobile device may include various types of devices and systems, depending on the application scenario and task requirements. For example, the autonomous mobile device may be a robot, an autonomous driving car, etc.
[0080] It should be noted that the implementation process of this solution will be described later with the help of robots, but this solution is not limited to being applied only to robots.
[0081] Continuing with the above example, the above example provides two methods for obtaining multiple frames of original images. The first method is: if the optical sensor itself can rotate, there is no need to move the device. In this case, the system will control the autonomous mobile device to remain stationary and directly obtain multiple frames of original images through the rotation of the optical sensor. The second method is: if the optical sensor does not have the self-rotation function, the autonomous mobile device is controlled to move, and multiple frames of images are obtained by relying on the movement of the device (such as rotation, etc.), and the original image is collected by changing the position and angle of the mobile device.
[0082] Here, the acquired multiple frames of original images may be continuous multiple frames of original images, or multiple images extracted at equal intervals from the acquired images. The acquired multiple frames of original images are generally original images of more than 4 frames.
[0083] In this way, according to whether the optical sensor has the self-rotation function, the image acquisition method can be flexibly adjusted to ensure that both the rotating sensor and the mobile device can effectively obtain multiple frames of original images, thereby improving the compatibility of the solution. In addition, by collecting multiple frames of image data at different viewing angles, it is ensured that the target area is fully covered, thereby providing rich data support for subsequent operations such as target recognition and noise filtering. In particular, the position change of the sun as one of the light sources that illuminates the noise spot in a short period of time can be ignored, so the sun's formation spot appears at different positions on the optical sensor as the robot rotates, and the position can be derived and calculated. Then, multiple frames of original images are obtained by rotating the optical sensor or moving the autonomous mobile device, so that the noise spot therein can be easily identified. When the optical sensor itself can rotate, there is no need to move the device, so as to avoid the error accumulation caused by the simultaneous rotation of the optical sensor and the mobile device, thereby improving the accuracy of noise spot recognition.
[0084] Continuing with step S101 , the target light spots are all or part of the original light spots in the original image.
[0085] When determining the spot position of each target spot in each frame of the original image, for example, the position coordinates of the spot (eg, x, y coordinates in a two-dimensional image) can be identified through image processing algorithms such as brightness detection, edge detection, or morphological analysis.
[0086] In one embodiment provided in the present application, the target light spot on each frame of the original image is determined by the following steps:
[0087] S201 , identifying the light spots on each frame of the original image respectively, and determining all the original light spots on each frame of the original image.
[0088] S202 . For each frame of original image, determine the original light spots on the frame of original image that meet the preset screening requirements as target light spots of the frame of original image, and determine the light spot position of each target light spot.
[0089] Regarding step S201, in this step, for each frame of original image, the light spots on the original image are identified by using image processing technology to determine all the original light spots on the frame of original image.
[0090] For step S202, the preset screening requirement is set according to conditions such as brightness, size, shape, position change, etc. of the light spot, and some light spots are screened out from all original light spots as target light spots, or all original light spots are directly used as target light spots.
[0091] The specific screening method can be adaptively set according to the actual situation and is not limited here.
[0092] In this way, the method can effectively identify all light spots from each frame of the original image, and accurately determine the target light spot and its position based on the preset screening conditions. This not only improves the accuracy of light spot recognition, but also reduces the subsequent processing volume and improves processing efficiency when only part of the original light spots are selected as target light spots.
[0093] With respect to step S102, the multiple frames of original images are a captured image sequence, and adjacent frames refer to two consecutive images in the image sequence, such as the t-th frame and the 𝑡+1-th frame of original images.
[0094] For example, assume that the collected multiple frames of original images are 4 consecutive frames of original images, each of which has two light spots (the first frame includes target light spots A and B, the second frame includes target light spots C and D, the third frame includes target light spots E and F, and the fourth frame includes target light spots G and H), and the light spot positions are (A xy , B xy )、(C xy , D xy )、(E xy , F xy )、(G xy , H xy ). The calculation of the position offset between the target light spots between adjacent frames can be obtained: L AC (the distance between A and C), L AD (the distance between A and D), L BC (the distance between B and C), L BD (the distance between B and D), L CE (the distance between C and E), L CF (the distance between C and F), L DE (the distance between D and E), L DF (the distance between D and F), L EG (the distance between E and G), L EH (the distance between E and H), L FG (the distance between F and G), L FH (The distance between F and H).
[0095] With respect to step S103, the noise spot position variation rule is a rule determined according to the movement characteristics of the noise spot.
[0096] The noise light spot may be, for example, a light spot generated by sunlight, an artificial light source in the environment, or the like.
[0097] In an implementation manner provided in the present application, determining whether there is a target light spot satisfying the noise light spot position variation rule according to the position offset between any two target light spots between adjacent frames includes:
[0098] S1031. According to the time continuity requirement, select one target light spot from each of all original images for combination to obtain at least one light spot group.
[0099] S1032. For any light spot group, calculate the ratio of the offsets of two adjacent positions in the light spot group according to the time increasing principle, and obtain at least one offset change rate of the light spot group.
[0100] S1033: Determine whether the difference between each offset change rate of the light spot group and the corresponding change rate threshold is within a preset error range.
[0101] S1034. If they are all located at , it is determined that the target light spot in the light spot group meets the rule of position variation of the noise light spot; otherwise, it is determined that the light spot group does not meet the rule of position variation of the noise light spot.
[0102] Regarding step S1031, in this step, according to the time continuity relationship, one target light spot is selected from each of the multiple frames of original images, and they are combined into a light spot group.
[0103] Here, it is assumed that the light spots in each light spot group represent the same target light spots in different frames (in fact, the light spots in the light spot group include different light spots), so that the movement trajectory of a certain light spot can be tracked.
[0104] Continuing with the example in step S102, according to the two light spots in each image (the first frame includes target spots A and B, the second frame includes target spots C and D, the third frame includes target spots E and F, and the fourth frame includes target spots G and H), the following light spot groups can be obtained: (A, C, E, G), (A, C, E, H), (A, C, F, G), (A, C, F, H), (A, D, E, G), (A, D,E, H), (A, D, F, G), (A, D, F, H), (B, C, E, G), (B, C, E, H), (B, C, F, G), (B, C, F, H), (B, D, E, G), (B, D, E, H), (B, D, F, G), (B, D, F, H), and a total of 16 light spot groups are determined.
[0105] Regarding step S1032, in this step, for each light spot group, the ratio of the light spot position offset between adjacent frames is calculated in the order of increasing time, which is called the offset change rate. This ratio reflects the position change of the light spot between adjacent frames.
[0106] For example, the formula for the offset change rate is as follows:
[0107]
[0108] in, is the position offset of the target spot between frame t and frame t+1, and is the position offset between the next two frames t+1 and t+2.
[0109] Continuing with the example in step S1031 above, taking the light spot group (A, C, E, G) as an example, two offset change rates are obtained in the light spot group: , The calculation principle of the offset change rate of other spot groups is the same and will not be repeated here.
[0110] With respect to step S1033, in this step, each offset change rate in the light spot group is compared with the corresponding threshold value, and the difference between the two is calculated to determine whether the difference between the two is within a preset error range.
[0111] Here, the thresholds corresponding to different offset change rates may be different.
[0112] For step S1033, the present application provides two methods for determining the change rate threshold. In one implementation provided in the present application, the change rate threshold corresponding to each offset change rate is determined by the following steps:
[0113] S301, obtaining an initial rotation angle corresponding to each frame of the original image.
[0114] S302: For any offset change rate, determine a total rotation angle according to an initial rotation angle of the original image corresponding to the offset change rate.
[0115] S303: Use the total rotation angle to search for a corresponding change rate threshold from a pre-constructed angle-change rate threshold correspondence table to determine a change rate threshold corresponding to the offset change rate.
[0116] With respect to step S301 , in this step, for each frame of the original image, an initial rotation angle when the original image is captured is obtained.
[0117] For example, if the optical sensor rotates to acquire an image, the initial angle is the angle of the sensor relative to the reference position when the sensor captures the frame of image. For example, the initial angle of the first frame of image is , the second frame is , the third frame is , and so on.
[0118] For step S302, for any offset change rate, the total rotation angle is calculated according to the initial rotation angles of all original images corresponding to the offset change rate. The total rotation angle refers to the cumulative rotation angle from the first frame to the last frame in the original image corresponding to the offset change rate.
[0119] For example, The corresponding total rotation angle is the result of subtracting the initial rotation angle of the first frame of the original image from the initial rotation angle of the third frame of the original image.
[0120] Regarding step S303, in this step, the angle-change rate threshold correspondence table may be obtained in advance through experiments or calculations, and is used to define reasonable thresholds of the offset change rate at different rotation angles.
[0121] In this way, by determining the total rotation angle corresponding to each offset change rate, and determining the change rate threshold corresponding to the offset change rate by looking up the table according to the total rotation angle, the speed of determining the change rate threshold can be improved, and by pre-constructing the angle-change rate threshold correspondence table, the speed of threshold determination results can be further improved and the amount of calculation in the noise filtering process can be reduced. And through the pre-constructed "angle-change rate threshold correspondence table", it can adapt to the spot changes under various angle conditions, and enhance the robustness in the ranging process.
[0122] With respect to step S303, in one implementation mode provided in the present application, an angle-change rate threshold correspondence table is constructed by the following steps:
[0123] S401, obtaining a rotation angle range when a light spot corresponding to an interference light source irradiates an edge of an optical sensor.
[0124] S402: According to a preset sampling angular velocity and a sampling interval, a plurality of sampling rotation angles and a total sampling time when rotating to the sampling rotation angles are selected from a rotation angle range.
[0125] S403 . For each sampling rotation angle, input the total sampling time, preset sampling angular velocity and sampling interval time corresponding to the sampling rotation angle into a change rate calculation formula to determine a change rate threshold corresponding to the sampling rotation angle.
[0126] S404: construct an angle-change rate threshold correspondence table according to all sampled rotation angles and their corresponding change rate thresholds.
[0127] For step S401, for example, when the interference light source is sunlight, the rotation angle range of the light spot corresponding to the interference light source when irradiating the edge of the optical sensor is obtained as follows: determining the rotation angle range of the interference light source (such as sunlight) when irradiating the edge of the optical sensor. This angle range usually represents the angle span of the optical sensor when the light spot moves from one side of the sensor to the other side.
[0128] With respect to step S402 , a plurality of sampling angles are selected from the rotation angle range according to the preset sampling angular velocity (rotation speed) and the sampling interval time, and the total time required to rotate from one angle to another angle is calculated.
[0129] For example, if the sampling angular velocity is The sampling interval is 0.1 seconds, and the sampling rotation angle range is from arrive , then the sampling points may include , ,……, , .
[0130] With respect to step S403, in this step, for each sampling rotation angle, the total sampling time, the sampling angular velocity and the sampling interval time are substituted into the change rate calculation formula to determine the corresponding change rate threshold.
[0131] For step S404, an "angle-change rate threshold correspondence table" is constructed according to different sampling rotation angles and their corresponding change rate thresholds. In this way, in actual operation, the reasonable change rate range of the spot movement at each rotation angle can be quickly found, effectively improving the noise spot filtering speed.
[0132] In this way, determining different change rate thresholds according to the specific rotation angle is conducive to more accurate identification of noise spots formed by interfering light sources and reducing misjudgments. And by constructing an angle-change rate threshold table, the system can filter out unreasonable light spot motion information at different lighting angles, thereby improving the depth perception ability of ranging equipment in applications such as robots and autonomous driving. The pre-constructed angle-change rate threshold table allows fast search and calculation, further reducing the burden of real-time calculations and improving the response speed during noise filtering.
[0133] Continuing with step S1033, in another embodiment provided by itself, the change rate threshold corresponding to each offset change rate is determined by the following steps:
[0134] S501: Obtain an initial rotation angle and image sampling interval corresponding to each frame of the original image.
[0135] S502: For any offset change rate, determine the rotation angular velocity and the total sampling time according to the initial rotation angle of the original image and the image sampling interval time corresponding to the offset change rate.
[0136] S503: Input the rotation angular velocity, the image sampling interval time and the total sampling time into a change rate calculation formula to determine a change rate threshold corresponding to the offset change rate.
[0137] For step S501, for each frame of original image, the initial rotation angle (eg, the angle of rotation of the optical sensor) when each frame of original image is captured and the sampling interval time between images (ie, the time difference between two frames of original image) are obtained.
[0138] For step S502, for any offset change rate, the total sampling time is determined according to the total number of original images corresponding to the offset change rate and the image sampling interval time. The total rotation angle is determined according to the initial rotation angle of the corresponding original image, and the ratio of the total rotation angle to the total sampling time is determined as the rotation angular velocity.
[0139] Regarding step S503, the description of this step can refer to the description of S403, and can achieve the same technical effect, so it is not described in detail.
[0140] In this way, by calculating the change rate threshold based on the rotation angular velocity and sampling time, the system can accurately determine the reasonable movement range of the light spot between adjacent frames and reduce misjudgment. And by adjusting the change rate threshold according to different rotation angles and time intervals, it can flexibly adapt to the movement law of the light spot in a variety of motion or rotation conditions, and improve the robustness of the ranging equipment in complex environments. It can also quickly calculate a reasonable change rate threshold in real-time processing, improve the efficiency of noise light spot recognition and filtering, and thus improve the accuracy of the robot's ranging results.
[0141] With respect to steps S403 and S503, in one implementation manner provided in the present application, the change rate calculation formula is:
[0142]
[0143] in, L i For the i The position offset of the light spot within the sampling period, i.e. i Time and i- The difference in the position offset of the light spot at time 1 ,L i+1 For the i +1 The position offset of the light spot within the sampling period, that is, i+ 1st moment and i The difference in the position offset of the light spot at the moment, D is the change rate threshold, , , , , is the angular velocity, is the interval time, For total time.
[0144] The calculation formula of the rate of change is derived based on the changing characteristics of the interfering light source. The specific derivation process is as follows:
[0145] Taking the interference light source as sunlight as an example, assuming that the sunlight is directly hitting the camera (installed on an autonomous mobile device, such as a robot) as the zero point, starting from the zero point, the laser radar rotates at an angle of , then the distance that direct sunlight moves inside the imaging device is l It can be obtained by the following formula:
[0146]
[0147] Where R is the position of the light spot relative to the rotation center (the rotation center of the optical sensor) when the sun is directly shining, and it is a constant. It is a function of time and rotation speed, so the formula for the difference in the distance the light spot moves between two frames can be obtained:
[0148]
[0149]
[0150] Then the ratio of the movement difference of two consecutive light spots can be obtained:
[0151]
[0152] Therefore:
[0153]
[0154] Neglecting the differentials of the quadratic form, we get:
[0155]
[0156] The speed (angular velocity) and sampling period dt (interval time) are both known values, so the formula can be expressed as:
[0157]
[0158] in, L i For the i The position offset of the light spot within the sampling period, i.e. i Time and i- The difference in the position offset of the light spot at time 1 ,L i+1 For the i +1 The position offset of the light spot within the sampling period, that is, i+ 1st moment and i The difference in the position offset of the light spot at the moment, D is the change rate threshold, , , , , is the angular velocity, is the interval time, For total time.
[0159] For step S1034, for each spot group, if the difference between each offset change rate of the spot group and the corresponding change rate threshold is within the preset error range, it is determined that all target spots in the spot group meet the noise spot position change rule, that is, all target spots in the spot group are determined to be noise spots. Otherwise, it is determined that all target spots in the spot group are not noise spots.
[0160] Continuing with the above example of step S1032, taking the light spot group (A, C, E, G) as an example, if the two offset change rates in the light spot group are , The differences between the corresponding change rate thresholds are all within the preset error range, then A, C, E, and G are determined to be noise spots; if the two offset change rates in the spot group are , If the difference between any one of and the corresponding change rate threshold is not within the preset error range, it is determined that A, C, E, G are not noise spots.
[0161] In this way, by analyzing the motion trajectory of the light spot group (calculating the offset change rate), it is possible to more carefully determine whether the light spot conforms to the change law of noise. And by evaluating the light spot through the offset change rate, it is possible to avoid misjudging the noise due to abnormal position of a single frame, which can handle complex situations in dynamic environments more flexibly, and ensure that the noise light spots can still be accurately identified and filtered under more complex conditions, thereby improving the applicability of optical sensors in a variety of scenarios. In addition, the subsequent elimination of the identified noise light spots can reduce interference in the measurement, maintain the continuity and accuracy of ranging and target tracking, and enable autonomous mobile devices to provide more stable depth perception capabilities in complex environments.
[0162] With respect to step S104, the preset filtering strategy is a rule and method formulated for processing and filtering noise spots during the noise spot identification process.
[0163] In an embodiment provided in the present application, filtering out at least one noise spot according to a preset filtering strategy includes: if the optical sensor contains an active light source, filtering out at least one noise spot according to a preset filtering strategy; if the optical sensor does not contain an active light source, filtering out the largest noise spot according to a preset filtering strategy.
[0164] For example, when this solution is used in an environment where there is no sunlight, but there are other static light sources (a progressive pattern similar to that of sunlight spots will appear), for radar / 3D stereo vision with active light sources, for each frame of the original image, at most M (M is greater than 1) noise spots can be selected for filtering, which can effectively remove the interference of static light sources; for a binocular camera without light sources, only the largest noise spot can be filtered out, because there are many static images on the CMOS, which are easy to be filtered out by mistake.
[0165] In this way, by adopting different noise spot filtering strategies according to whether the optical sensor contains an active light source, the flexibility, accuracy and real-time performance are significantly improved, reducing the impact of strong interference such as sunlight on the ranging system, and enhancing the stability and adaptability of the system in complex environments, thereby providing more reliable environmental perception capabilities for applications such as robots and autonomous driving.
[0166] Based on the same inventive concept, a noise filtering device corresponding to the noise filtering method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned noise filtering method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0167] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of a noise filtering device provided in an embodiment of the present application. Figure 4 As shown in , the noise filtering device 400 includes:
[0168] The first determination module 410 is used to determine the spot position of each target spot in each frame of the original image among the acquired multiple frames of original images; the original image is an image collected by an optical sensor used by a triangulation distance measurement method;
[0169] A calculation module 420, for calculating the position offset between target light spots between adjacent frames according to the light spot position of each target light spot in the original image;
[0170] The second determination module 430 is used to determine whether there is a target light spot that satisfies the noise light spot position variation rule according to the position offset between two target light spots between adjacent frames;
[0171] The filtering module 440 is used to determine the target light spot that meets the noise light spot position variation rule as a noise light spot, and filter out at least one noise light spot according to a preset filtering strategy.
[0172] Optionally, the first determining module 410 is further configured to determine a target light spot on each frame of the original image through the following steps:
[0173] Identify the light spots on each frame of the original image respectively, and determine all the original light spots on each frame of the original image;
[0174] For each frame of original image, the original light spots on the frame of original image that meet the preset screening requirements are determined as the target light spots of the frame of original image, and the spot position of each target light spot is determined.
[0175] Optionally, when the second determination module 430 is used to determine whether there is a target light spot that satisfies the noise light spot position variation rule according to the position offset between two target light spots between adjacent frames, the second determination module 430 is used to:
[0176] According to the time continuity requirement, one target light spot is selected from each of the original images for combination to obtain at least one light spot group;
[0177] For any light spot group, according to the time increasing principle, the ratio of the offsets of two adjacent positions in the light spot group is calculated to obtain at least one offset change rate of the light spot group;
[0178] Determine whether the difference between each offset change rate of the light spot group and the corresponding change rate threshold is within a preset error range;
[0179] If they are all located at , it is determined that the target light spot in the light spot group meets the law of position variation of the noise light spot; otherwise, it is determined that the light spot group does not meet the law of position variation of the noise light spot.
[0180] Optionally, when the filtering module 440 is used to filter out at least one noise spot according to a preset filtering strategy, the filtering module 440 is used to:
[0181] If the optical sensor includes an active light source, filtering out at least one noise light spot according to a preset filtering strategy;
[0182] If the optical sensor does not contain an active light source, the largest noise light spot is filtered out according to a preset filtering strategy.
[0183] Optionally, the noise filtering device 400 is further configured to determine a change rate threshold corresponding to each offset change rate through the following steps:
[0184] Get the initial rotation angle corresponding to each frame of the original image;
[0185] For any offset change rate, determine the total rotation angle according to the initial rotation angle of the original image corresponding to the offset change rate;
[0186] The total rotation angle is used to search for a corresponding change rate threshold from a pre-constructed angle-change rate threshold correspondence table to determine the change rate threshold corresponding to the offset change rate.
[0187] Optionally, the noise filtering device 400 is further configured to construct an angle-change rate threshold correspondence table through the following steps:
[0188] Obtain the rotation angle range when the light spot corresponding to the interference light source irradiates the edge of the optical sensor;
[0189] According to the preset sampling angular velocity and sampling interval time, multiple sampling rotation angles and the total sampling time when rotating to the sampling rotation angles are selected from the rotation angle range;
[0190] For each sampling rotation angle, the total sampling time, the preset sampling angular velocity and the sampling interval time corresponding to the sampling rotation angle are input into the change rate calculation formula to determine the change rate threshold corresponding to the sampling rotation angle;
[0191] According to all sampled rotation angles and their corresponding change rate thresholds, an angle-change rate threshold correspondence table is constructed.
[0192] Optionally, the noise filtering device 400 is further configured to determine a change rate threshold corresponding to each offset change rate through the following steps:
[0193] Get the initial rotation angle and image sampling interval corresponding to each frame of the original image;
[0194] For any offset change rate, determine the rotation angular velocity and the total sampling time according to the initial rotation angle of the original image and the image sampling interval time corresponding to the offset change rate;
[0195] The rotation angular velocity, the image sampling interval time and the total sampling time are input into a change rate calculation formula to determine a change rate threshold corresponding to the offset change rate.
[0196] Optionally, the change rate calculation formula is:
[0197]
[0198] in, L i For the i The position offset of the light spot within the sampling period, i.e. i Time and i- The difference in the position offset of the light spot at time 1 ,L i+1 For the i +1 The position offset of the light spot within the sampling period, that is, i+ 1st moment and i The difference in the position offset of the light spot at the moment, D is the change rate threshold, , , , , is the angular velocity, is the interval time, For total time.
[0199] Optionally, when applied to an autonomous mobile device, the noise filtering device 400 is further used to obtain the multiple frames of original images by the following method:
[0200] If the optical sensor can rotate by itself, the autonomous mobile device is controlled to be stationary, and the optical sensor is rotated by itself to obtain the multiple frames of original images;
[0201] If the optical sensor cannot rotate by itself, the autonomous mobile device is controlled to move to acquire the multiple frames of original images.
[0202] See also Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown in , the electronic device 500 includes a processor 510 , a memory 520 and a bus 530 .
[0203] The memory 520 stores machine-readable instructions executable by the processor 510. When the electronic device 500 is running, the processor 510 communicates with the memory 520 via the bus 530. When the machine-readable instructions are executed by the processor 510, the above-mentioned Figure 1The specific implementation of the steps in the method embodiment shown can be found in the method embodiment, and will not be repeated here.
[0204] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 The specific implementation of the steps in the method embodiment shown can be found in the method embodiment, and will not be repeated here.
[0205] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0206] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0207] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0208] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0209] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0210] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A noise filtering method, It is characterized in that The noise filtering method comprises: For each frame of the acquired multiple frames of original images, determine the spot position of each target spot in the frame of original image; the original image is an image collected by an optical sensor used by a triangulation distance measurement method; According to the spot position of each target spot in the original image, the position offset between the target spots between adjacent frames is calculated; According to the position offset between two target light spots in adjacent frames, it is determined whether there is a target light spot that satisfies the position variation rule of the noise light spot; Determine a target light spot that satisfies the noise light spot position variation rule as a noise light spot, and filter out at least one noise light spot according to a preset filtering strategy; The determining whether there is a target light spot satisfying the position variation rule of the noise light spot according to the position offset between two target light spots between adjacent frames includes: According to the time continuity requirement, one target light spot is selected from each of the original images for combination to obtain at least one light spot group; For any light spot group, according to the time increasing principle, the ratio of the offsets of two adjacent positions in the light spot group is calculated to obtain at least one offset change rate of the light spot group; Determine whether the difference between each offset change rate of the light spot group and the corresponding change rate threshold is within a preset error range; If they are all located at, it is determined that the target light spot in the light spot group meets the law of position change of the noise light spot; otherwise, it is determined that the light spot group does not meet the law of position change of the noise light spot; Determine the change rate threshold corresponding to each offset change rate by following the steps below: Get the initial rotation angle corresponding to each frame of the original image; For any offset change rate, determine the total rotation angle according to the initial rotation angle of the original image corresponding to the offset change rate; The total rotation angle is used to search for a corresponding change rate threshold from a pre-constructed angle-change rate threshold correspondence table to determine the change rate threshold corresponding to the offset change rate.
2. The noise filtering method according to claim 1, It is characterized in that Determine the target spot on each frame of the original image through the following steps: Identify the light spots on each frame of the original image respectively, and determine all the original light spots on each frame of the original image; For each frame of original image, the original light spots on the frame of original image that meet the preset screening requirements are determined as the target light spots of the frame of original image, and the spot position of each target light spot is determined.
3. The noise filtering method according to claim 1, It is characterized in that The step of calculating the position offset between any two target light spots between adjacent frames according to the light spot position of each target light spot in the original image includes: For two adjacent frames of original images, select a target spot from each of the two frames of original images; Based on the selected spot positions of the two target light spots, a position offset between the two target light spots is determined.
4. The noise filtering method according to claim 1, It is characterized in that The step of filtering out at least one noise light spot according to a preset filtering strategy includes: If the optical sensor includes an active light source, filtering out at least one noise light spot according to a preset filtering strategy; If the optical sensor does not contain an active light source, the largest noise light spot is filtered out according to a preset filtering strategy.
5. The noise filtering method according to claim 1, It is characterized in that Construct the angle-change rate threshold correspondence table through the following steps: Obtain the rotation angle range when the light spot corresponding to the interference light source irradiates the edge of the optical sensor; According to the preset sampling angular velocity and sampling interval time, multiple sampling rotation angles and the total sampling time when rotating to the sampling rotation angles are selected from the rotation angle range; For each sampling rotation angle, the total sampling time, the preset sampling angular velocity and the sampling interval time corresponding to the sampling rotation angle are input into the change rate calculation formula to determine the change rate threshold corresponding to the sampling rotation angle; According to all sampled rotation angles and their corresponding change rate thresholds, an angle-change rate threshold correspondence table is constructed.
6. The noise filtering method according to claim 1, It is characterized in that Determine the change rate threshold corresponding to each offset change rate by following the steps below: Get the initial rotation angle and image sampling interval corresponding to each frame of the original image; For any offset change rate, determine the rotation angular velocity and the total sampling time according to the initial rotation angle of the original image and the image sampling interval time corresponding to the offset change rate; The rotation angular velocity, the image sampling interval time and the total sampling time are input into a change rate calculation formula to determine a change rate threshold corresponding to the offset change rate.
7. The noise filtering method according to claim 5 or 6, It is characterized in that The change rate calculation formula is: in, L i For the i The position offset of the light spot within the sampling period, L i+1 For the i +1 is the position offset of the light spot within the sampling period, D is the change rate threshold, , , , , is the angular velocity, is the interval time, For total time.
8. The noise filtering method according to claim 1, It is characterized in that Applied to an autonomous mobile device, the multiple frames of original images are obtained by the following method: If the optical sensor can rotate by itself, the autonomous mobile device is controlled to be stationary, and the optical sensor is rotated by itself to obtain the multiple frames of original images; If the optical sensor cannot rotate by itself, the autonomous mobile device is controlled to move to acquire the multiple frames of original images.
9. A noise filtering device, It is characterized in that The noise filtering device comprises: A first determination module is used to determine the spot position of each target spot in each frame of the original image among the acquired multiple frames of original images; the original image is an image collected by an optical sensor used by a triangulation distance measurement method; A calculation module, used for calculating the position offset between target light spots between adjacent frames according to the light spot position of each target light spot in the original image; The second determination module is used to determine whether there is a target light spot that satisfies the noise light spot position variation rule according to the position offset between two target light spots between adjacent frames; A filtering module, used to determine a target light spot that satisfies the noise light spot position variation rule as a noise light spot, and filter out at least one noise light spot according to a preset filtering strategy; When the second determination module is used to determine whether there is a target light spot that satisfies the noise light spot position variation rule according to the position offset between two target light spots between adjacent frames, the second determination module is used to: According to the requirements of time continuity and position correspondence, a target light spot is selected from each of the original images for combination to obtain at least one light spot group; For any light spot group, according to the time increasing principle, the ratio of the offsets of two adjacent positions in the light spot group is calculated to obtain at least one offset change rate of the light spot group; Determine whether the difference between each offset change rate of the light spot group and the corresponding change rate threshold is within a preset error range; If they are all located at, it is determined that the target light spot in the light spot group meets the law of position change of the noise light spot; otherwise, it is determined that the light spot group does not meet the law of position change of the noise light spot; The noise filtering device is also used to determine a change rate threshold corresponding to each offset change rate through the following steps: Get the initial rotation angle corresponding to each frame of the original image; For any offset change rate, determine the total rotation angle according to the initial rotation angle of the original image corresponding to the offset change rate; The total rotation angle is used to search for a corresponding change rate threshold from a pre-constructed angle-change rate threshold correspondence table to determine the change rate threshold corresponding to the offset change rate.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the noise filtering method according to any one of claims 1 to 8 are executed.
Citation Information
Patent Citations
Light spot identifying method and device for digital sun sensor
CN102034091B
Methods, equipment and storage media for noise removal
CN110443275B
Noise determination method and device and electronic equipment
CN117218027A
Robot positioning method and device, robot and storage medium
CN117928540A
Range-extending system and spatial filter for enhancing hartmann-shack images and associated methods
US20020118340A1
