Article detection method and system based on TOF distance measurement
The TOF range measuring sensor array detects items in the vehicle refrigerator in real time, solving the problem of false alarms in the existing technology, and achieving accurate detection and timely warning of items in the vehicle refrigerator.
Patent Information
- Application Number
- CN202510627230.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-08-12
AI Technical Summary
Existing vehicle-mounted refrigerator items detection methods are prone to false alarms, especially because weight sensors and image recognition are greatly affected by vibration and optical fiber, resulting in the inability to accurately detect items left by users.
The TOF range measurement sensor array is used to obtain distance data in real time, and through the comparison of the real-time distance sequence and the reference distance sequence, confirm whether there is an item at the target position, and perform early warning actions when the item is detected.
Accurate detection of items in the car refrigerator is achieved to avoid false alarms, and ensure that users are informed of the remaining items in a timely manner and take corresponding measures when leaving the vehicle.
Smart Images

Figure CN120468962A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of object detection, and in particular to an object detection method and system based on TOF ranging. Background Art
[0002] As cars become increasingly intelligent, car refrigerators are becoming standard equipment in many vehicles. However, unlike traditional refrigerators, car refrigerators cannot store items for extended periods, especially items like food and medicine that require low-temperature storage. Currently, users often forget to remove items from the refrigerator when leaving the vehicle, causing them to spoil, produce odors, or breed bacteria, impacting the vehicle's interior and affecting user health.
[0003] Currently, commonly used object detection methods mainly rely on weight sensor detection and image recognition detection. Weight sensor detection mainly determines whether there is an object by measuring the weight change inside the refrigerator. However, it is greatly affected by vibration and is prone to false alarms. Image recognition detection is greatly affected by optical fibers and is also prone to false alarms. Summary of the Invention
[0004] The embodiments of the present invention provide a method and system for object detection based on TOF ranging, aiming to solve the problem that current object detection methods are prone to false alarms.
[0005] In a first aspect, an embodiment of the present invention provides an object detection method based on TOF ranging, the method comprising:
[0006] acquiring distance data measured by a sensor array in real time to obtain a real-time distance sequence, wherein the sensor array includes a plurality of sensors;
[0007] Whether an object exists at a target location is confirmed based on the real-time distance sequence and the reference distance sequence, wherein the real-time distance sequence includes real-time distances measured by multiple different sensors, and the reference distance sequence includes reference distances measured by multiple different sensors.
[0008] If there is an object at the target location, an early warning action is performed.
[0009] In a second aspect, an embodiment of the present invention further provides an object detection system, wherein the object detection system is configured with any of the above-mentioned object detection methods based on TOF ranging.
[0010] An embodiment of the present invention provides an object detection method and system based on TOF ranging. The method includes: acquiring distance data measured by a sensor array in real time to obtain a real-time distance sequence, wherein the sensor array includes multiple sensors; confirming whether there is an object at the target position based on the real-time distance sequence and a reference distance sequence, wherein the real-time distance sequence includes real-time distances measured by multiple different sensors, and the reference distance sequence includes reference distances measured by multiple different sensors. If there is an object at the target position, an early warning action is performed. The embodiment of the present invention can measure the distance in real time to obtain a real-time distance sequence, and then confirm whether there is an object at the target position based on the real-time distance sequence and the reference distance sequence, and perform an early warning action when there is an object, thereby enabling detection of objects by distance to avoid false alarms. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0012] Figure 1 1 is a flow chart of an object detection method based on TOF ranging provided by an embodiment of the present invention;
[0013] Figure 2 1 is a schematic diagram of a first sub-process of a method for detecting an object based on TOF ranging provided by an embodiment of the present invention;
[0014] Figure 3 2 is a schematic diagram of a second sub-process of the object detection method based on TOF ranging provided in an embodiment of the present invention;
[0015] Figure 4 3 is a schematic diagram of a third sub-process of the object detection method based on TOF ranging provided in an embodiment of the present invention;
[0016] Figure 5 4 is a schematic diagram of a fourth sub-process of the object detection method based on TOF ranging provided in an embodiment of the present invention;
[0017] Figure 6 2 is a schematic diagram of a fifth sub-process of the object detection method based on TOF ranging provided in an embodiment of the present invention;
[0018] Figure 7 This is a schematic diagram of the sixth sub-process of the object detection method based on TOF ranging provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0020] It will be understood that when used in this specification and the appended claims, the terms “include” and “comprising” indicate the presence of described features, integers, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, operations, elements, components and / or groups thereof.
[0021] It should also be understood that the terminology used in this specification is for the purpose of describing specific embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should further be understood that the term "and / or" as used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, including and including these combinations.
[0022] See also Figure 1 , Figure 1 This is a flow chart of an object detection method based on TOF ranging provided by an embodiment of the present invention. The object detection method based on TOF ranging provided by an embodiment of the present invention can be applied to an object detection system. The object detection system can be configured in a vehicle to detect objects in a vehicle refrigerator to prevent users from leaving objects in the vehicle refrigerator when leaving the vehicle. Figure 1 As shown, the method includes steps S100 to S120.
[0023] S100 , acquiring distance data measured by a sensor array in real time to obtain a real-time distance sequence, wherein the sensor array includes a plurality of sensors.
[0024] In an embodiment of the present invention, the object detection system may include a sensor array, which may include multiple sensors. The multiple sensors may be TOF (Time of Flight) sensors. The TOF sensor can calculate the distance by measuring the round-trip time of the light signal (or other signal) between the target object and the sensor. The multiple sensors can be set at different positions in the vehicle refrigerator so that the distance in different directions can be measured. For example, 3-5 TOF ranging points can be set in the vehicle refrigerator, and a sensor is set at each TOF ranging point, wherein the multiple sensors are evenly distributed in the vehicle refrigerator to cover the entire internal space of the refrigerator.
[0025] A real-time distance sequence contains multiple real-time distances, one for each sensor. For example, if a car refrigerator has three sensors, the real-time distance sequence contains three real-time distances. Let's say the real-time distance sequence D = [7, 2, 1], which indicates that the data measured by the three sensors are 7 cm, 2 cm, and 1 cm, respectively.
[0026] S110 , confirming whether an object exists at a target location based on the real-time distance sequence and a reference distance sequence, wherein the real-time distance sequence includes real-time distances measured by multiple different sensors, and the reference distance sequence includes reference distances measured by multiple different sensors.
[0027] In this embodiment of the present invention, the reference distance sequence is the distance measured by sensors when the vehicle refrigerator is empty. When the vehicle refrigerator is empty, the sensors can measure the distance multiple times to obtain multiple distance data. This distance data is then filtered to remove abnormal data, and the remaining data is then subjected to a sliding average to obtain the reference distance. For example, if reference distance D0 = [50, 50, 50], this distance sequence indicates that when the vehicle refrigerator is empty, the data measured by all three sensors is 50 cm.
[0028] After obtaining the real-time distance sequence, it can be compared with the reference distance sequence to confirm the presence of an object at the target location. For example, the real-time distance sequence can be subtracted from the reference distance sequence to obtain a distance change value. The presence of an object is then confirmed based on whether the distance change value meets a preset threshold. When an object is present at the target location, the distance change is typically more significant.
[0029] See also Figure 2 In some embodiments, such as this embodiment, step S110 also includes steps S111-S113.
[0030] S111, calculating the difference between each real-time distance in the real-time distance sequence and each reference distance in the reference distance sequence to obtain a plurality of first differences;
[0031] S112, if at least one of the plurality of first differences is greater than a first preset threshold, preliminarily confirming that an object exists at the target location;
[0032] S113: If two adjacent first difference values among the plurality of first difference values are greater than a second preset threshold, it is determined that there is an object at the target location.
[0033] In an embodiment of the present invention, a first difference value can be obtained by calculating the difference between the real-time distance in the real-time distance sequence and the reference distance in the reference distance sequence. The presence of an object can then be determined based on the relationship between the first difference value and a first preset threshold value and a second preset threshold value. Specifically, when at least one first difference value is greater than the first preset threshold value, a preliminary determination can be made that an object is present at the target location. A determination can then be made as to whether multiple first difference values are greater than the second preset threshold value. If two adjacent first difference values are greater than the second preset threshold value, the presence of an object can be determined at the target location. If no first difference value is greater than the first preset threshold value, or if only one first difference value is greater than the first preset threshold value, the absence of an object at the target location can be determined, possibly due to sensor obstruction.
[0034] Suppose three sensors are installed on the left front (Sensor1), top center (Sensor2), and right rear (Sensor3) of the refrigerator, and the reference distance sequence measured by the three sensors is D0 = [50, 50, 50]. Let D1 = [47.2, 46.9, 47.1, 48.5, 47], where D1 represents the distance data measured five times by sensor 1, D2 = [35.1, 34.8, 34.9, 35.5, 35.0], where D2 represents the distance data measured five times by sensor 2, and D3 = [50.2, 49.8, 50.1, 49.9, 50.0], where D3 represents the distance data measured five times by sensor 3. Before calculation, the data can be preprocessed to remove outliers. For example, for D1, the highest and lowest values can be removed, and the median value of 47.1 can be taken. For D2, smoothing can be performed, and the average of the first three distances calculated can be 34.9. For D3, its value is relatively stable, so the median value of 50 can be taken. In other words, the final value D = [47.1, 34.9, 50] is subtracted to calculate the difference between the real-time distance sequence and the reference distance sequence, ΔD = [2.9, 15.1, 0]. If the first preset threshold is 2 and the second preset threshold is 1, then two first differences in ΔD = [2.9, 15.1, 0] are greater than the second preset threshold, indicating that an object is present at the target location.
[0035] S120: If there is an object at the target location, perform an early warning action.
[0036] In an embodiment of the present invention, when an item is located at a target location, an alert action can be executed. This alert action can include sending a message to alert the user. Multiple alert actions are possible, with different alert actions tailored to different types of items. For example, for items that do not require high refrigeration requirements, only a local message can be sent. For items that require high refrigeration requirements, a message can be sent to the user's mobile terminal, such as a cell phone, simultaneously with the local message.
[0037] See also Figure 3 In some embodiments, such as the present embodiment, the object detection method based on TOF ranging further includes steps S130-S131.
[0038] S130, obtaining a plurality of the first differences, and confirming a height feature, a distribution feature, and a gradient feature of a left-behind object based on the plurality of the first differences, wherein the left-behind object is an object at the target location;
[0039] S131, confirming the type of the left-behind item based on the height feature, the distribution feature, and the gradient feature, and executing a matching warning action based on the type of the left-behind item.
[0040] In this embodiment of the present invention, the height feature describes the height of the left-behind item, the distribution feature describes the uniformity of the left-behind item's distribution within the vehicle refrigerator, and the gradient feature describes the rate of change in the left-behind item's height distribution within the vehicle refrigerator. Using these features, the type of left-behind item can be identified, facilitating the determination of different warning actions.
[0041] See also Figure 4 In some embodiments, such as this embodiment, step S130 also includes steps S1301-S1304.
[0042] S1301, identifying the maximum difference value from the plurality of first differences to obtain the height feature;
[0043] S1302, calculating the variance of the plurality of first differences to obtain the distribution feature;
[0044] S1303, calculating the difference between the first difference values of adjacent sensors to obtain a first gradient value, and calculating the distance between adjacent sensors to obtain a second gradient value;
[0045] S1304: Calculate the average of the ratios of the first gradient value and the second gradient value to obtain the gradient feature.
[0046] In this embodiment of the present invention, assuming that the reference distance sequence D0 = [50, 50, 50] and the standard distance sequence D = [47.1, 35.12, 50.0], then ΔD = [2.9, 14.88, 0]. If the first preset threshold is 5 and the second preset threshold is 2, the first difference corresponding to sensor Sensor2 is greater than 5, preliminarily confirming that there is an object at the target location. Then, cross-validation is performed on adjacent sensors, and the differences corresponding to sensor Sensor1 and sensor Sensor2 are both greater than 2, satisfying the condition that the two adjacent first differences are greater than the second preset threshold, confirming that there is a leftover object at the target location.
[0047] After confirming the item was left behind, the type of item can be determined. Based on the first differences, the height, distribution, and gradient characteristics of the item are calculated. For example, if the height characteristic is 14.88, the mean of the three first differences is 5.927, and the variance is 68.3, the distribution characteristic is 68.3. Assume that the coordinates of sensor 1 are (0, 20), the coordinates of sensor 2 are (20, 20), and the coordinates of sensor 3 are (40, 20). The lateral spacing between sensor 1 and sensor 2 is 20, and the lateral spacing between sensor 2 and sensor 3 is 20, respectively. Therefore, the second gradient values are 20 and 20, respectively. Calculating two adjacent first differences yields first gradient values of 11.98 and 14.88, respectively. The ratios of the first gradient value to the second gradient value are 0.599 and 0.744, respectively, with a mean of 0.6715, indicating a gradient characteristic of 0.6715.
[0048] Figure 5 In some embodiments, such as the present embodiment, the object detection method based on TOF ranging further includes steps S140-S141.
[0049] S140, if the height feature matches the preset first height feature, the distribution feature matches the preset first distribution feature, and the gradient feature matches the preset first gradient feature, then the type of the left-behind object is determined to be the first type;
[0050] S141: If the type of the left-behind item is the first type, a local message is sent to execute the warning action.
[0051] In an embodiment of the present invention, the first type is a bottled beverage, the first height feature of the bottled beverage is 7, the first distribution feature is 10.2, and the first gradient feature is 3.0. When the calculated height feature, distribution feature, and gradient feature match the first height feature, the first distribution feature, and the first gradient feature, respectively, the type of the leftover item is confirmed to be the first type. It is understood that matching does not mean that the index values are exactly the same, but rather that a certain error is allowed. When determining the type, the calculated height feature, distribution feature, and gradient feature are usually compared with all pre-stored height features, distribution features, and gradient features, and then the one with the highest probability is selected as the type of the leftover item.
[0052] See also Figure 6 In some embodiments, such as the present embodiment, the object detection method based on TOF ranging further includes steps S150-S151.
[0053] S150, if the height feature matches the preset second height feature, the distribution feature matches the preset second distribution feature, and the gradient feature matches the preset second gradient feature, then the type of the left-behind object is determined to be the second type;
[0054] S151: If the type of the left-behind item is the second type, sending an early warning message to the mobile terminal after the left-behind item has not been taken away for a preset time to execute the early warning action.
[0055] In an embodiment of the present invention, the second type is a lunch box type, whose second height feature is 5, the second distribution feature is 0.3, and the second gradient feature is 0. When the calculated height feature, distribution feature, and gradient feature match the second height feature, the second distribution feature, and the second gradient feature, respectively, the type of the left-behind item is confirmed as the second type.
[0056] See also Figure 7 In some embodiments, such as the present embodiment, the object detection method based on TOF ranging further includes steps S160-S161.
[0057] S160: If the height feature matches a preset third height feature, the distribution feature matches a preset third distribution feature, and the gradient feature matches a preset second gradient feature, then the type of the left-behind object is determined to be the third type;
[0058] S161: If the type of the left-behind item is the third type, sending an early warning message to the mobile terminal to execute the early warning action.
[0059] In this embodiment of the present invention, the third type is a medicine box type, whose third height characteristic is 6, the third distribution characteristic is 6, and the third gradient characteristic is 6. When the calculated height characteristic, distribution characteristic, and gradient characteristic match the third height characteristic, the third distribution characteristic, and the third gradient characteristic, respectively, the type of the leftover item is determined to be the third type. It will be understood that the first to third height characteristics, the first to third distribution characteristics, and the first to third gradient characteristics described above are all preset characteristics, and other types of characteristics may be added based on actual conditions.
[0060] In certain embodiments, such as the present embodiment, the object detection method based on TOF ranging further includes the following step: if changes in temperature and humidity at the target location are detected, temperature and humidity compensation is performed on the real-time distance sequence.
[0061] In an embodiment of the present invention, the temperature compensation formula is: compensation value = original value * (1 + 0.0005 * ΔT), where the original value is the real-time distance and ΔT is the temperature difference between the temperature corresponding to the reference distance and the current temperature. For example, if the original value is 35.03 and ΔT is 5, then the compensation value = 35.03 * 1.0025 = 35.12, thereby eliminating the impact of temperature on distance. For humidity, when it is detected that the humidity exceeds a preset threshold, the first preset threshold and the second preset threshold can be increased by a certain ratio. For example, when the humidity is detected to exceed 80%, the ratio of the first preset threshold and the second preset threshold can be increased by 20%. That is, if the first preset threshold is 5, it will be increased to 6 after the increase, and if the second preset threshold is 2, it will be increased to 2.4 after the increase. In addition, in addition to compensating for real-time distance based on temperature and humidity, vibration compensation can also be performed. For example, when vehicle vibration is detected, accelerometer data is used to compensate for distance measurement.
[0062] The present invention further provides an object detection system, which is configured with the object detection method based on TOF ranging described in any one of the above embodiments.
[0063] Specifically, the object detection system may include a sensor array, which may include multiple sensors, and the multiple sensors may be TOF (Time of Flight) sensors. The TOF sensor can calculate the distance by measuring the round-trip time of the light signal (or other signal) between the target object and the sensor. Multiple sensors can be set at different positions in the car refrigerator, so that distances in different directions can be measured. For example, 3-5 TOF ranging points can be set in the car refrigerator, and a sensor is set at each TOF ranging point, wherein the multiple sensors are evenly distributed in the car refrigerator to cover the entire internal space of the refrigerator.
[0064] The object detection method and object detection system based on TOF ranging disclosed in the present invention can measure distance in real time to obtain a real-time distance sequence, and then confirm whether there is an object at the target location based on the real-time distance sequence and the reference distance sequence, and perform an early warning action when an object is present, thereby realizing object detection by distance and avoiding false alarms.
[0065] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned object detection system and each unit can refer to the corresponding description in the aforementioned method embodiment. For the convenience and brevity of description, it will not be repeated here.
[0066] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0067] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, to the extent such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to encompass such changes and modifications.
[0068] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A method for detecting objects based on TOF ranging, characterized in that: The method comprises: acquiring distance data measured by a sensor array in real time to obtain a real-time distance sequence, wherein the sensor array includes a plurality of sensors; confirming whether an object exists at a target location based on the real-time distance sequence and a reference distance sequence, wherein the real-time distance sequence includes real-time distances measured by a plurality of different sensors, and the reference distance sequence includes reference distances measured by a plurality of different sensors; If there is an object at the target location, an early warning action is performed.
2. The method according to claim 1, wherein The step of confirming whether an object exists at a target location based on the real-time distance sequence and the reference distance sequence includes: calculating a difference between each real-time distance in the real-time distance sequence and each reference distance in the reference distance sequence to obtain a plurality of first difference values; If at least one of the plurality of first differences is greater than a first preset threshold, it is preliminarily confirmed that an object exists at the target location.
3. The method according to claim 2, wherein After the step of preliminarily confirming that an object exists at the target location if at least one of the plurality of first differences is greater than a first preset threshold, the method further includes: If two adjacent first difference values among the plurality of first difference values are greater than a second preset threshold, it is confirmed that an object exists at the target position.
4. The method according to claim 2, wherein The method further comprises: Acquire a plurality of the first difference values, and confirm a height feature, a distribution feature, and a gradient feature of a left-behind object based on the plurality of the first difference values, wherein the left-behind object is an object at the target location; The type of the left-behind object is confirmed based on the height feature, the distribution feature, and the gradient feature, and a matching early warning action is performed based on the type of the left-behind object.
5. The method according to claim 4, wherein The step of confirming the height characteristics, distribution characteristics, and gradient characteristics of the left-behind objects based on the plurality of first differences comprises: identifying the maximum difference value from the plurality of first differences to obtain the height feature; calculating the variance of a plurality of the first difference values to obtain the distribution feature; Calculating a difference between first difference values of adjacent sensors to obtain a first gradient value, and calculating a spacing between adjacent sensors to obtain a second gradient value; An average of ratios of the first gradient value and the second gradient value is calculated to obtain the gradient feature.
6. The method according to claim 4, wherein The method further comprises: If the height feature matches the preset first height feature, the distribution feature matches the preset first distribution feature, and the gradient feature matches the preset first gradient feature, the type of the left-behind object is determined to be the first type; If the type of the left-behind item is the first type, a local message is sent to execute the early warning action.
7. The method according to claim 4, wherein The method further comprises: If the height feature matches the preset second height feature, the distribution feature matches the preset second distribution feature, and the gradient feature matches the preset second gradient feature, the type of the left-behind object is determined to be the second type; If the type of the left-behind item is the second type, an early warning message is sent to the mobile terminal after the left-behind item has not been taken away for a preset period of time to execute the early warning action.
8. The method according to claim 4, wherein The method further comprises: If the height feature matches the preset third height feature, the distribution feature matches the preset third distribution feature, and the gradient feature matches the preset second gradient feature, the type of the left-behind object is determined to be the third type; If the type of the left-behind item is the third type, an early warning message is sent to the mobile terminal to execute the early warning action.
9. The method according to claim 1, wherein The method further comprises: If changes in temperature and humidity are detected at the target location, temperature and humidity compensation is performed on the real-time distance sequence.
10. An object detection system, characterized in that: The object detection system is configured with the object detection method based on TOF ranging according to any one of claims 1 to 9.