Method and device for measuring distance to target object

By obtaining the width and related state parameters of the image acquisition device and combining it with the state parameters of the previous moment, the relative distance is calculated and adjusted, which solves the problem of insufficient accuracy of monocular ranging and realizes high-precision ranging in autonomous driving.

CN110672074BActive Publication Date: 2025-09-09BEIJING HORIZON ROBOTICS TECH RES & DEV CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN201911015686.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-24
Publication Date
2025-09-09
Estimated Expiration
2039-10-24

AI Technical Summary

Technical Problem

In existing autonomous driving technologies, the accuracy of monocular ranging is insufficient, affecting driving safety and efficiency.

Method used

The width and related state parameters of the target object are obtained through the image acquisition device, and the relative distance is calculated by combining the state parameters at the previous moment. The relative distance is adjusted using the width difference to improve the ranging accuracy.

Benefits of technology

It achieves more accurate distance measurement in autonomous driving, ensuring driving safety and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110672074B_ABST
    Figure CN110672074B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for measuring the distance of a target object. Based on an image acquired by an image acquisition device, a first width of the target object in the image is obtained; then relevant state parameters of the target object at the previous moment are obtained; and then a first relative distance is obtained based on the relevant state parameters of the target object. Since the relevant state parameters can truly reflect the state of the target object, the true distance between two movable devices can be obtained. In addition, based on the first relative distance, a second width of the target object is obtained. Then, a relative difference is obtained based on the first width and the second width, and the first relative distance is updated to the second relative distance based on the relative difference. It can be seen that the present application adopts different methods to obtain the width of the target object, and uses the comparison result of the width to constrain the relative distance between the two mobile devices, so that the relative distance is more accurate, so as to achieve the accuracy of the distance measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of autonomous driving technology, and in particular to a method and device for measuring the distance to a target object. Background Art

[0002] With the continuous development of science and technology, autonomous driving has also been developing rapidly. Autonomous driving does not require a driver, and the entire driving process is automatically controlled by a computer.

[0003] One key area of ​​autonomous driving research is distance measurement, or measuring the distance between the preceding autonomous driving device and the current autonomous driving device. Distance measurement directly impacts driving safety and efficiency. For example, if the distance between two vehicles is inaccurately measured, the rear vehicle could easily rear-end the vehicle in front, causing a traffic accident and seriously impacting driving safety. Another example is inaccurate distance measurement between leading and trailing drones, potentially leading to collisions and crashes.

[0004] Therefore, how to improve the ranging accuracy is an urgent problem that needs to be solved. Summary of the Invention

[0005] In order to solve the above technical problems, this application is proposed.

[0006] According to one aspect of the present application, a method for measuring the distance of a target object is provided, the method comprising: obtaining a first width of the target object in an image acquired by an image acquisition device; obtaining relevant state parameters of the target object at a previous moment; obtaining a first relative distance based on the relevant state parameters of the target object at the previous moment, the first relative distance being the distance between the image acquisition device and the target object at a current moment; obtaining a second width of the target object in the image based on the first relative distance; obtaining a relative difference between the first width and the second width; and updating the first relative distance to a second relative distance based on the relative difference.

[0007] According to another aspect of the present application, a device for measuring the distance of a target object is provided, comprising:

[0008] A first acquisition module is configured to obtain a first width of the target object in the image acquired by the image acquisition device; a second acquisition module is configured to obtain relevant state parameters of the target object at a previous moment; a first processing module is configured to obtain a first relative distance based on the relevant state parameters of the target object at a previous moment, wherein the first relative distance is the distance between the image acquisition device and the target object at a current moment; a second processing module is configured to obtain a second width of the target object in the image based on the first relative distance; a comparison module is configured to obtain a relative difference between the first width and the second width; and an adjustment module is configured to update the first relative distance to a second relative distance based on the relative difference.

[0009] According to another aspect of the present application, an electronic device is provided, comprising: a processor; and a memory, wherein computer program instructions are stored in the memory, and when the computer program instructions are executed by the processor, the processor executes the method described above.

[0010] According to another aspect of the present application, a computer-readable medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor is caused to perform the method described above.

[0011] Compared with the prior art, the method of the present application obtains the first width of the target object in the image based on the image acquired by the image acquisition device; then obtains the relevant state parameters of the target object at the previous moment; and then obtains the first relative distance based on the relevant state parameters of the target object. Since the relevant state parameters can truly reflect the state of the target object, the true distance between the two movable devices can be obtained. In addition, based on the first relative distance, the second width of the target object in the image is obtained. Then, the relative difference is obtained based on the first width and the second width, and the first relative distance is updated to the second relative distance based on the relative difference. It can be seen that the present application adopts a different method to obtain the width of the target object, and uses the comparison result of the width to constrain the relative distance between the two mobile devices, so that the relative distance is more accurate, so as to achieve the accuracy of the distance measurement.

[0012] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The above and other purposes, features, and advantages of the present application will become more apparent through a more detailed description of the embodiments of the present application in conjunction with the accompanying drawings. The accompanying drawings are intended to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the drawings, the same reference numerals generally represent the same components or steps.

[0014] Figure 1 3 is a flow chart of a method for measuring the distance of a target object in a video provided by an exemplary embodiment of the present application.

[0015] Figure 2 is a schematic diagram of an unmanned vehicle provided by another exemplary embodiment of the present application.

[0016] Figure 3 It is a flowchart of obtaining a first relative distance provided by an exemplary embodiment of the present application.

[0017] Figure 4 It is a projection relationship diagram for determining the current frame image provided by an exemplary embodiment of the present application.

[0018] Figure 5 This is a flowchart of a method for adjusting a first relative distance to a second relative distance according to a relative difference, provided by an exemplary embodiment of the present application.

[0019] Figure 6 FIG. 1 is a schematic diagram of a device for measuring the distance to a target object provided by an exemplary embodiment of the present application.

[0020] Figure 7 It is an example block diagram of the first processing module 630 provided by an exemplary embodiment of the present application.

[0021] Figure 8 It is an example block diagram of the adjustment module 660 provided by an exemplary embodiment of the present application.

[0022] Figure 9 It is a structural diagram of an electronic device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0023] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described herein.

[0024] Application Overview

[0025] Currently, ranging methods are generally categorized into monocular ranging, binocular ranging, and trinocular ranging, based on the number of image acquisition devices. For example, monocular ranging involves a single image acquisition device (in the rear movable device) measuring the distance between the rear movable device and the front movable device (also referred to herein as the "target object").

[0026] In monocular distance measurement, the accuracy of distance measurement directly affects driving safety and efficiency. If the distance measurement is inaccurate, it will seriously affect driving safety.

[0027] Taking the above problems into consideration, the present application aims to study how to improve the accuracy of distance measurement in monocular ranging. Based on this purpose, the present application has developed a method for measuring the distance of a target object. Based on the image captured by the image acquisition device, the first width of the target object in the image is obtained; then the relevant state parameters of the target object at the previous moment are obtained; then, based on the relevant state parameters of the target object at the previous moment, a first relative distance is obtained. Since the relevant state parameters can truly reflect the state of the target object, the true distance between the two movable devices can be obtained. In addition, based on the first relative distance, the second width of the target object in the image is obtained. Then, a relative difference is obtained based on the first width and the second width, and the first relative distance is updated to the second relative distance based on the relative difference. Therefore, the present application adopts different methods to obtain the width of the target object, and uses the width comparison result to constrain the relative distance between the two mobile devices, making the relative distance more accurate to achieve the accuracy of ranging.

[0028] Exemplary Methods

[0029] Figure 1 The figure is a flow chart of a method for measuring the distance to a target object provided by an exemplary embodiment of the present application. This embodiment can be applied to mobile devices. The mobile devices of this embodiment include autonomously movable devices such as unmanned vehicles, drones, robotic arms, and mobile robots.

[0030] This embodiment is applied to monocular ranging. When two movable devices are driving relative to each other, the rear movable device measures the distance between itself and the leading movable device (target object). It is worth noting that the rear movable device uses an image acquisition device to capture images for ranging. Therefore, the distance between the image acquisition device and the target object is equivalent to the distance between the rear movable device and the target object.

[0031] The distance measurement method of the target object described in one or more embodiments of the present application is as follows: Figure 1 As shown, the following steps are included:

[0032] Step 101: Obtain a first width of a target object in an image according to an image acquired by an image acquisition device.

[0033] Among them, the image acquisition device of this embodiment can be a camera, an infrared camera, etc., of course, its specific type is not limited, and any device with an image acquisition function should be included in the protection scope of this embodiment.

[0034] The image obtained in this embodiment contains the following information: the width of the target object in the image (which can be regarded as a virtual width), the form of the target object (shape, state and appearance, etc.). In addition, the image acquisition device has a focal length, which is set in advance.

[0035] The first width of the target object in the image refers to the virtual width of the target object in the image. After the image is captured, since the image contains the target object, the virtual width of the target object in the image can be obtained by recognizing the image. Figure 2 , is an image of the front vehicle's rear end captured by the rear vehicle. By recognizing the image, the front vehicle's virtual width in that image can be determined. It's worth noting that the virtual width of the front vehicle in the image can also be determined under extreme conditions (e.g., when the front vehicle is turning or driving close to the lane).

[0036] Step 102: Obtain relevant state parameters of the target object at the previous moment.

[0037] Specifically, the relevant state parameters can reflect the actual state of the target object during the driving process. Since the relevant state parameters presented by the target object at each moment in the driving process may be different, the relevant state parameters of the target object at each moment include: relevant distance parameters, relevant speed parameters, and process noise. Furthermore, the process noise includes: speed noise and distance noise. Furthermore, the "relevant state parameters of the previous moment" referred to in this embodiment refer to the relevant state parameters of the target object at the previous moment based on the current moment. Since the relevant state parameters of the target object at the previous moment have been presented when the target object runs to the current moment, they can be obtained through a specific implementation method. This will be introduced in detail later and will not be repeated here.

[0038] The relevant speed parameter refers to the target object's driving speed. The relevant speed parameter at each moment is related to its relevant state parameter at the previous moment. The relevant speed at the previous moment affects the relevant speed at the subsequent moment. For example, the current moment's relevant speed parameter is related to the relevant speed parameter at the previous moment, as well as the current moment's speed noise.

[0039] The relevant distance parameter refers to the distance between the image acquisition device and the target object. The relevant distance parameter at each moment is related to its relevant state parameter at the previous moment. For example, the current moment's relevant distance parameter is related to the relevant distance parameter at the previous moment, the relevant speed parameter at the previous moment, the time difference between the previous moment and the current moment, and other factors such as distance noise.

[0040] The speed noise at each moment is used to affect the speed at each moment. The distance noise at each moment is used to affect the distance at each moment. Both are adjustable parameters.

[0041] Furthermore, the relevant state parameters of the target object may vary at each moment during the driving process, and the relevant state parameters of the target object at the previous moment may affect the relevant state parameters of the target object at the current moment. Therefore, it is necessary to obtain the relevant state parameters at the previous moment as the basis for determining the first relative distance. The specific implementation process will be described later and will not be repeated here.

[0042] Step 103: Obtain a first relative distance based on relevant state parameters of the target object at a previous moment.

[0043] Specifically, the first relative distance is the distance between the image acquisition device and the target object at the current moment.

[0044] Since the obtained relevant state parameters can reflect the actual state of the target object during driving, the first relative distance obtained from the relevant state parameters can truly and accurately reflect the relative distance between the image acquisition device and the target object.

[0045] Step 104: Obtain a second width of the target object according to the first relative distance.

[0046] The second width represents the width of the target object in the image and is obtained based on the first relative distance. The first width is obtained by identifying the target object in the image. The second width is obtained by mapping the target object's actual state parameters into the image. The two widths have different sources.

[0047] Step 105: Obtain a relative difference based on the first width and the second width. Comparing the two widths yields a relative difference. If the relative difference is small (e.g., less than a preset threshold), both widths are relatively accurate. If the relative difference is large (e.g., above a preset threshold), the measured first relative distance is biased and requires further adjustment.

[0048] Step 106: Update the first relative distance to a second relative distance according to the relative difference.

[0049] The adjustment method varies depending on the relative difference. This embodiment uses the relative difference as the adjustment standard, which can further optimize the relative distance to the target object.

[0050] Through the above analysis, the embodiment of the present invention determines the first width of the target object based on the image captured by the image acquisition device; then obtains the relevant state parameters of the target object at the previous moment; and obtains the first relative distance based on the relevant state parameters. Since the relevant state parameters can truly reflect the actual state of the target object during driving, the distance between the image acquisition device and the target object at the current moment can be obtained. In addition, based on the first relative distance, the second width of the target object in the image is obtained. Then, the relative difference is obtained based on the first width and the second width, and the first relative distance is adjusted to the second relative distance based on the relative difference. It can be seen that the present application uses different methods to obtain the width of the target object, and then uses the width comparison result to constrain and adjust the relative distance between the two movable devices, thereby making the relative distance between the two more accurate, which can improve the accuracy of the distance measurement to ensure driving safety.

[0051] In the above Figure 1 On the basis of the illustrated embodiment, as an optional implementation of this embodiment, during step 102, relevant distance parameters of the target object at the previous moment, relevant speed parameters at the previous moment, and noise error at the previous moment are obtained.

[0052] This step is implemented because, during driving, the relevant state parameters of the target object at the previous moment can affect its relevant state parameters at the current moment. For example, if the leading vehicle decelerates at the previous moment, while the driving conditions of the following vehicle remain unchanged, the distance between the two vehicles at the current moment will decrease. Taking the actual influence of the relevant state parameters at the previous moment into account and using them as a basis for calculating the first relative distance at the current moment can improve the accuracy of the first relative distance.

[0053] On the basis of obtaining the relevant state parameters, as an optional implementation of this embodiment, during step 103, the following operation is performed: a first relative distance is obtained according to the relevant distance parameter at the previous moment and the relevant speed parameter at the previous moment.

[0054] More specifically, see Figure 3 , the above implementation process includes the following specific steps:

[0055] Step 301: Obtain the time difference between the current moment and the previous moment.

[0056] The time difference between the previous moment and the current moment may be expressed in milliseconds, and the time difference may be any value, such as 2ms, 5ms, etc.

[0057] Step 302: Obtain the relative moving distance at the current moment according to the time difference and the relevant speed parameters at the previous moment.

[0058] Since process noise can be divided into distance noise and velocity noise at each moment, the distance noise at each moment can be used to control the distance accuracy at each moment, and the velocity noise at each moment can be used to control the velocity accuracy at each moment.

[0059] In addition, since the relevant state parameters at each moment will affect the relevant state parameters at the next moment, in the process of calculating the relevant speed parameters at the previous moment, it is necessary to refer to the speed noise at the previous moment and the relevant speed parameters at the next moment before the previous moment. Specifically, the relevant speed parameters at the previous moment and the speed noise at the previous moment can be summed to obtain the relevant speed parameters at the previous moment. For ease of understanding, the formula V can be used. k-1 =V k-2 +W vk-1 Where k-1 represents the previous moment, V k-1 Represents the relevant speed parameter of the previous moment, W vk-1 represents the velocity noise of the previous moment, k-2 represents the moment immediately before the previous moment (also called the moment before the previous moment), V k-2 Indicates the relevant speed parameter at the moment immediately before the previous moment.

[0060] In the implementation process of obtaining the relative moving distance at the current moment based on the time difference and the relevant speed parameter at the previous moment, the product of the time difference and the relevant speed parameter at the previous moment can be used as the relative moving distance at the current moment. Continuing with the above example, the relative moving distance at the current moment is V k-1 *Δt, where Δt represents the time difference between the current moment and the previous moment.

[0061] In the above operation, the relevant state parameters of the previous moment (the relevant speed parameters of the previous moment, time difference, etc.) are combined to obtain the relative moving distance, so the influence of the change of the relevant state parameters of the previous moment on the relative moving distance can be comprehensively considered, and the accuracy of the relative moving distance at the current moment can be improved.

[0062] Step 303 : Obtain a first relative distance based on the relative distance parameter at the previous moment, the relative moving distance at the current moment, and the distance noise at the current moment.

[0063] Specifically, the relative distance parameter at the previous moment is used to represent the distance between the target object and the image acquisition device. The relative movement distance between the previous moment and the current moment is used to represent the movement distance of the target object relative to the image acquisition device during the time difference. Therefore, the first relative distance can be obtained by summing the relative distance parameter at the previous moment, the relative movement distance at the current moment, and the distance noise at the current moment.

[0064] Furthermore, the distance noise at the current moment is obtained by the following steps: obtaining the relevant speed parameters of the previous moment; obtaining the distance noise at the current moment based on the relevant speed parameters of the previous moment, the time difference and the scale factor. Specifically, the time difference refers to the time difference between the previous moment and the current moment, and the scale factor is a constant. If we take the symbol as an example, W sk1 =V k-1 *Δt*s. Where, W sk1 Represents the distance noise at the current moment, V k-1 represents the relevant speed parameter of the previous moment, Δt represents the time difference between the current moment and the previous moment, and s is the scale coefficient.

[0065] For ease of understanding, combined with the above-given formula symbols, the first relative distance obtained in this embodiment is specifically expressed as follows: S k =S k-1 +V k-1 *Δt+W sk1 , where k represents the current moment, S k Indicates the first relative distance at the current moment, S k-1 Represents the relative distance parameter at the previous moment, V k-1 *Δt represents the relative moving distance at the current moment, W sk1 Represents the distance noise at the current moment.

[0066] It can be seen that in the above operation, the relevant state parameters of the previous moment (relative distance parameters of the previous moment, relative moving distance, etc.) and the distance noise of the current moment are combined to obtain the first relative distance. Therefore, the influence of the change of the relevant state parameters of the previous moment on the relative moving distance can be comprehensively considered, and the accuracy of the first relative distance at the current moment can be improved.

[0067] From the above analysis, it can be seen that in the implementation process of the first relative distance, the relevant state parameters of the previous moment and various parameters of the current moment are comprehensively considered. These parameters can comprehensively reflect the real-time driving status of the target object. Therefore, using these parameters as the basis to obtain the first relative distance can accurately reflect the relative position relationship between the target object and the image acquisition device, achieve the accuracy of distance measurement, and further ensure driving safety.

[0068] In the above Figure 1On the basis of the illustrated embodiment, as an optional implementation of this embodiment, the above step 104 specifically includes the following operations: obtaining the second width based on the projection relationship and the first relative distance.

[0069] The projection relationship includes a mapping relationship between a preset reference surface and the image, and also includes a reduction ratio, which is determined according to the focal length of the image acquisition device and the first relative distance. The second width is the calculated width of the target object in the image.

[0070] For the sake of convenience, the following description uses symbols.

[0071] The second width of the image acquisition device at the target object is p, and the first relative distance between the target object and the image acquisition device is S k The focal length of the image acquisition device is f, which is pre-set. The reduction ratio can be calculated based on the distance and focal length: S / f. Furthermore, the actual width D of the target object is obtained. To obtain the actual width of the target object, the image is input into a preset model, which identifies the morphology (shape, state, appearance, etc.) of the target object in the image and determines the type of the target object. Based on the type of the target object, the actual width of the target object is obtained.

[0072] The target object in the target image will exhibit its own form, such as shape, state, and appearance. Because different target objects may have different appearances, specific shapes, or their own brand logos, after the image is input into the preset model, the preset model can determine the type of the target object based on its form.

[0073] In the process of determining the type of the target object, a large number of sample forms and sample types of related objects are used in advance to constrain the basic model (such as CNN, RNN and other neural network models) to obtain the preset model. Then the image is input into the preset model, the form of the target object in the image is processed according to the preset model, and the type of the target object is output. The type of the target object can determine the actual width of the target object. Taking an unmanned vehicle as an example, the type of the unmanned vehicle refers to the type of the unmanned vehicle, for example Figure 2 If the unmanned vehicle in the figure is model A of a certain brand, then its actual vehicle width is fixed.

[0074] Then the initial width D of the target object is reduced according to the reduction ratio S / f, and the result is: Transformed into:

[0075] See Figure 4 ,The actual width of the target object can be reduced into the image according to the reduction ratio.,Specifically, the preset reference surface can be set to the ground.

[0076] See Figure 5 , in the above Figure 1 Based on the embodiment shown, as an optional implementation of this embodiment, the above step 106 specifically includes the following operations:

[0077] Step 501: determine whether the relative difference is less than a preset threshold.

[0078] Specifically, the specific value of the preset threshold needs to be adjusted based on experience and actual conditions, and is not limited in this embodiment.

[0079] After the judgment is executed, the judgment result may be one of the following two results:

[0080] First, if the relative difference is less than a preset threshold, it means that the first width and the second width are close to each other, and step 502 can be executed.

[0081] Second, if the relative difference is greater than or equal to a preset threshold, it indicates that there may be a deviation in the first relative distance, and step 503 is executed.

[0082] Step 502: If yes, determine the first relative distance as the second relative distance.

[0083] The second relative distance represents the distance between the target object and the image acquisition device at the current moment. The second relative distance serves as fundamental data for subsequent driving operations, so its accuracy is critical. The higher the accuracy of the second relative distance, the more it ensures driving safety and efficiency. If the relative difference is less than a preset threshold, the first relative distance is highly accurate and can be directly determined as the second relative distance.

[0084] Therefore, the relative difference between the first width and the second width and the preset threshold are used to constrain the first relative distance between the two mobile devices to obtain the second relative distance. This can enable the obtained second relative distance to more accurately characterize the relative position relationship between the target object and the image acquisition device, achieve the accuracy of the distance measurement, and further ensure driving safety.

[0085] If not, step 503 , adjust the distance noise at the current moment according to the relative difference, and obtain a second relative distance according to the adjusted distance noise at the current moment and relevant state parameters of the target object.

[0086] The difference between the third width obtained by the second relative distance and the first width is smaller than a preset threshold.

[0087] Specifically, the relative difference and the distance noise have a mapping relationship. The corresponding distance noise is obtained from the mapping relationship based on the obtained relative difference, and then the distance noise at the current moment is adjusted based on the distance noise. For example, the distance noise Wsk1 at the current moment is adjusted to the adjusted distance noise Wsk2.

[0088] After adjustment, the second relative distance can be obtained using the same method as the first relative distance. Specifically, the second relative distance is obtained by summing the relative distance parameter at the previous moment, the relative movement distance at the current moment, and the adjusted distance noise. Continuing with the above formula, the second relative distance Sk' = Sk-1 + Vk*Δt + Wsk2. Sk' represents the second relative distance, and Wsk1 represents the adjusted distance noise at the current moment.

[0089] Furthermore, the focal length of the image acquisition device is obtained; the focal length, the width of the target object in the image, and the second relative distance are processed to obtain a third width. The third width also refers to the width of the target object in the image. In this embodiment, the difference between the third width and the first width is less than a preset threshold. In other words, this embodiment uses the difference between the third width and the first width being less than a preset threshold as a constraint condition to constrain the second relative distance. This enables the obtained second relative distance to more accurately represent the relative positional relationship between the target object and the image acquisition device, thereby achieving distance measurement accuracy and further ensuring driving safety.

[0090] It is worth noting that in order to obtain the second relative distance more accurately, the difference between the third width and the first width can be less than a preset threshold as a constraint condition, and the distance noise is adjusted to perform the above steps multiple times until the constraint condition is met.

[0091] Exemplary devices

[0092] Figure 6 FIG. 6 illustrates a block diagram of an apparatus 600 for measuring a distance to a target object according to an embodiment of the present application.

[0093] like Figure 6As shown, the device 600 for measuring the distance of a target object in an embodiment of the present application includes: a first obtaining module 600, used to obtain a first width of the target object in the image based on the image obtained by the image acquisition device; a second obtaining module 610, used to obtain relevant state parameters of the target object at a previous moment; a first processing module 630, used to obtain a first relative distance based on the relevant state parameters of the target object at a previous moment, wherein the first relative distance is the distance between the image acquisition device and the target object at a current moment; a second processing module 640, used to obtain a second width of the target object in the image based on the first relative distance; a comparison module 650, used to obtain a relative difference based on the first width and the second width; and an adjustment module 660, used to update the first relative distance to a second relative distance based on the relative difference.

[0094] In one example, acquiring relevant state parameters of the target object at a previous moment includes acquiring relevant distance parameters and relevant speed parameters of the target object at a previous moment.

[0095] In an example, the first processing module 630 is specifically configured to obtain the first relative distance according to the relevant distance parameter at the previous moment and the relevant speed parameter at the previous moment.

[0096] Figure 7 FIG. 6 illustrates an example block diagram of the first processing module 630 according to an embodiment of the present application. Figure 7 As shown, in one example, the first processing module 630 specifically includes: a third obtaining module 710, used to obtain the time difference between the previous moment and the current moment; a fourth obtaining module 720, used to obtain the relative moving distance at the current moment based on the time difference and the relevant speed parameters at the previous moment; and a fifth obtaining module 730, used to obtain the first relative distance based on the relative distance parameter at the previous moment, the relative moving distance at the current moment, and the distance noise at the current moment.

[0097] In one example, the distance noise at the current moment is obtained by the following steps: obtaining the distance noise at the current moment according to relevant speed parameters, time difference and scale coefficient at the previous moment.

[0098] In one example, the second processing module 640 is specifically configured to obtain the second width based on a projection relationship and the first relative distance, wherein the projection relationship includes a mapping relationship between a preset reference plane and an image.

[0099] Figure 8 FIG. 6 illustrates an example block diagram of the adjustment module 660 according to an embodiment of the present application. Figure 8As shown, in one example, the adjustment module 660 includes: a judgment module 810, used to determine whether the relative difference is less than a preset threshold; a first adjustment submodule 820, used to, if so, determine the first relative distance as the second relative distance; a second adjustment submodule 830, used to, if not, adjust the distance noise at the current moment according to the relative difference, and obtain the second relative distance according to the adjusted distance noise at the current moment and the relevant state parameters of the target object; wherein the difference between the third width obtained by the second relative distance and the first width satisfies the preset difference range.

[0100] Exemplary electronic devices

[0101] Below, the electronic device of the embodiment of the present application can be any one or both of the first device 120 and the second device 121, or a stand-alone device independent of them, and the stand-alone device can communicate with the first device and the second device to receive the collected input signals from them.

[0102] Figure 9 A block diagram of an electronic device according to an embodiment of the present application is illustrated.

[0103] like Figure 9 As shown, the electronic device 10 includes one or more processors 11 and a memory 12 .

[0104] The processor 11 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 10 to perform desired functions.

[0105] The memory 12 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may execute the program instructions to implement the method for measuring the distance to the target object and / or other desired functions of the various embodiments of the present application described above. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.

[0106] In one example, the electronic device 10 may further include an input device 13 and an output device 14 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0107] For example, when the electronic device is the first device 100 or the second device 200, the input device 13 may be the microphone or microphone array described above, for capturing input signals from a sound source. When the electronic device is a standalone device, the input device 13 may be a communication network connector, for receiving collected input signals from the first device 100 and the second device 200.

[0108] In addition, the input device 13 may also include, for example, a keyboard, a mouse, and the like.

[0109] The output device 14 can output various information to the outside, including determined distance information, direction information, etc. The output device 14 can include, for example, a display, a speaker, a printer, a communication network and its connected remote output device, etc.

[0110] Of course, to simplify, Figure 9 Only some of the components related to the present application in the electronic device 10 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device 10 may further include any other appropriate components according to specific application scenarios.

[0111] Exemplary computer program products and computer-readable storage media

[0112] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the target object posture tracking method according to various embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.

[0113] The computer program product may be written in any combination of one or more programming languages ​​to implement the program code for performing the operations of the embodiments of the present application, including object-oriented programming languages ​​such as Java, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0114] In addition, an embodiment of the present application may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enable the processor to execute the steps of the target object posture tracking method according to various embodiments of the present application described in the above "Exemplary Method" section of this specification.

[0115] The computer-readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can, for example, include but is not limited to a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0116] The basic principles of the present application have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, and effects mentioned in this application are merely illustrative and not restrictive, and it should not be assumed that these advantages, strengths, and effects are required of each embodiment of this application. In addition, the specific details disclosed above are merely illustrative and facilitating understanding, and are not restrictive. The above details do not limit this application to necessarily being implemented using the above specific details.

[0117] The block diagrams of the devices, devices, equipment, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, or configured in any manner. Words such as "include," "comprise," "have," and the like are open-ended words, meaning "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or" and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.

[0118] It should also be noted that in the apparatus, device, and method of the present application, each component or each step can be decomposed and / or recombined, and such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0119] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0120] The above description has been provided for the purpose of illustration and description. Furthermore, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A method for measuring the distance of a target object, the method comprising: Obtaining a first width of the target object in the image according to the image acquired by the image acquisition device; Acquiring relevant state parameters of the target object at a previous moment, wherein the relevant state parameters are used to reflect the actual state of the target object during driving, and the relevant state parameters include relevant distance parameters and relevant speed parameters; Obtaining a first relative distance based on relevant state parameters of the target object at a previous moment, comprising: obtaining the first relative distance based on relevant distance parameters and relevant speed parameters at the previous moment, wherein the first relative distance is the distance between the image acquisition device and the target object at a current moment; Obtaining a second width of the target object in the image according to the first relative distance, comprising: obtaining the second width based on a projection relationship and the first relative distance, wherein the projection relationship includes a mapping relationship between a preset reference surface and the image, and also includes a reduction ratio, wherein the reduction ratio is determined according to a focal length of an image acquisition device and the first relative distance; obtaining a relative difference according to the first width and the second width; Updating the first relative distance to a second relative distance based on the relative difference includes: determining whether the relative difference is less than a preset threshold; if so, determining the first relative distance as the second relative distance; if not, adjusting the distance noise at a current moment based on the relative difference, and obtaining the second relative distance based on the adjusted distance noise at the current moment and relevant state parameters of the target object; wherein a difference between a third width obtained by the second relative distance and the first width satisfies a preset threshold.

2. The method according to claim 1, wherein The obtaining of the first relative distance according to the relevant distance parameter at the previous moment and the relevant speed parameter at the previous moment includes: Obtaining a time difference between the previous moment and the current moment; Obtaining the relative movement distance at the current moment according to the time difference and the relevant speed parameter at the previous moment; The first relative distance is obtained according to the relative distance parameter at the previous moment, the relative moving distance at the current moment, and the distance noise at the current moment.

3. The method according to claim 2, wherein: The distance noise at the current moment is obtained by the following steps: The distance noise at the current moment is obtained according to the relevant speed parameter, time difference and scale coefficient at the previous moment.

4. A device for measuring the distance of a target object, comprising: A first obtaining module, configured to obtain a first width of the target object in the image based on the image acquired by the image acquisition device; a second obtaining module, configured to obtain relevant state parameters of the target object at a previous moment, wherein the relevant state parameters are used to reflect the actual state of the target object during driving, and the relevant state parameters include relevant distance parameters and relevant speed parameters; a first processing module, configured to obtain a first relative distance based on relevant state parameters of the target object at a previous moment, wherein the first relative distance is the distance between the image acquisition device and the target object at a current moment; wherein obtaining the first relative distance based on the relevant state parameters of the target object comprises: obtaining the first relative distance based on the relevant distance parameters at the previous moment and the relevant speed parameters at the previous moment; a second processing module, configured to obtain a second width of the target object in the image based on the first relative distance; wherein obtaining the second width of the target object in the image based on the first relative distance comprises: obtaining the second width based on a projection relationship and the first relative distance, wherein the projection relationship comprises a mapping relationship between a preset reference plane and the image, and also comprises a reduction ratio, wherein the reduction ratio is determined based on a focal length of an image acquisition device and the first relative distance; a comparison module, configured to obtain a relative difference according to the first width and the second width; an adjusting module, configured to update the first relative distance to a second relative distance according to the relative difference; The adjustment module includes: a judgment module, configured to judge whether the relative difference is less than a preset threshold; a first adjustment submodule, configured to, if so, determine the first relative distance as the second relative distance; and a second adjustment submodule, configured to, if not, adjust the distance noise at the current moment according to the relative difference, and obtain the second relative distance according to the adjusted distance noise at the current moment and relevant state parameters of the target object; wherein the difference between the third width obtained by the second relative distance and the first width satisfies the preset threshold.

5. An electronic device comprising: processor; as well as A memory, wherein computer program instructions are stored in the memory, and when the computer program instructions are executed by the processor, the processor is caused to perform the method according to any one of claims 1 to 3.

6. A computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Automobile cruise control method based on monocular vision and implement system thereof

    CN101234601A

  • Method for detecting and tracking obstacles in front of vehicle

    CN102508246A

  • Image distance measurement method based on marker

    CN104197901A

  • Positioning method and device

    CN106610294A

  • Vehicle-mounted millimeter wave radar filter estimation method and device for target tracking and storage medium

    CN108872975A