Detection frame filtering methods, devices, equipment, media and vehicles
By obtaining the vehicle pitch angle and solving for the vanishing line, the positional relationship of the detection boxes is determined, which solves the problem of false filtering of detection boxes caused by vehicle shaking and improves the accuracy of detection box filtering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-14
- Publication Date
- 2026-03-06
AI Technical Summary
In existing technologies, the unreasonable vehicle body posture caused by violent shaking results in poor filtering effect of the detection frame, leading to false filtering.
By obtaining the pitch angle of the target vehicle at the moment of image acquisition, the vanishing line is solved based on the pitch angle. The positional relationship between the bottom edge of the detection box and the vanishing line is determined, and detection boxes higher than the vanishing line are filtered out.
It effectively avoids false filtering caused by unreasonable vehicle body posture and improves the filtering effect of the detection frame.
Smart Images

Figure CN115690723B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, and in particular to a detection box filtering method, apparatus, device, medium, and vehicle. Background Technology
[0002] Currently, target detection technologies for pedestrians, cyclists, and other objects have been widely applied in automotive systems. Time-based target detection algorithms are often used to obtain a large number of detection boxes for different categories of objects.
[0003] In related technologies, nonmaximum suppression is usually used to reduce invalid duplicate boxes in multiple detection frames. However, due to unreasonable vehicle body posture, such as violent vehicle shaking, the obtained detection frames may not be accurate, resulting in false filtering of detection frames and thus poor detection frame filtering effect. Summary of the Invention
[0004] To address the aforementioned technical problems, this disclosure provides a detection frame filtering method, apparatus, equipment, medium, and vehicle.
[0005] Firstly, this disclosure provides a detection box filtering method, including:
[0006] Obtain the vehicle pitch angle at the moment the target image is acquired;
[0007] When the vehicle pitch angle is within a preset angle range, the vanishing line is solved based on the vehicle pitch angle to obtain the target vanishing line corresponding to the target image.
[0008] Determine the positional relationship between the bottom edge of each detection box in the target image and the target vanishing line;
[0009] When the positional relationship is such that the bottom edge of the detection box is higher than the target vanishing line, the target detection box corresponding to the target positional relationship is filtered.
[0010] Secondly, this disclosure provides a detection frame filtering device, comprising:
[0011] The first acquisition module is used to acquire the vehicle pitch angle of the target vehicle at the moment the target image is acquired;
[0012] The first calculation module is used to solve the vanishing line based on the vehicle pitch angle when the vehicle pitch angle is within a preset angle range, and obtain the target vanishing line corresponding to the target image.
[0013] The position determination module is used to determine the positional relationship between the bottom edge of each detection box in the target image and the target vanishing line;
[0014] The first processing module is used to filter the target detection box corresponding to the target position relationship when the position relationship is a target position relationship in which the bottom edge of the detection box is higher than the target vanishing line.
[0015] Thirdly, this disclosure provides an electronic device, including:
[0016] processor;
[0017] Memory, used to store executable instructions;
[0018] The processor is used to read executable instructions from memory and execute the executable instructions to implement the detection box filtering method of the first aspect.
[0019] Fourthly, this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the detection box filtering method of the first aspect.
[0020] Fifthly, this disclosure provides a vehicle including the detection frame filtering device as described above.
[0021] The technical solution provided in this disclosure has the following advantages compared with the prior art:
[0022] The detection box filtering method, apparatus, device, medium, and vehicle disclosed in this embodiment can obtain the vehicle pitch angle of the target vehicle at the time of target image acquisition. When the vehicle pitch angle is within a preset angle range, a vanishing line is calculated based on the vehicle pitch angle to obtain the target vanishing line corresponding to the target image. Then, the positional relationship between the bottom edge of each detection box in the target image and the target vanishing line is determined. When the positional relationship is such that the bottom edge of the detection box is higher than the target vanishing line, the target detection box corresponding to the target positional relationship is filtered. Specifically, when the bottom edge of the detection box is higher than the target vanishing line, it indicates that the road target corresponding to the detection box is in the air, so the detection box needs to be filtered. Thus, the target vanishing line corresponding to the target image can be calculated based on the vehicle pitch angle of the target vehicle. Based on the positional relationship between the target vanishing line and the bottom edge of each detection box in the target image, it can be determined whether a detection box needs to be filtered, thereby avoiding false filtering caused by unreasonable vehicle posture. Furthermore, the vanishing line prior information is used to effectively detect each detection box, improving the detection box filtering effect. Attached Figure Description
[0023] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0024] Figure 1 A schematic flowchart of a detection box filtering method provided in an embodiment of this disclosure;
[0025] Figure 2 A schematic flowchart of another detection box filtering method provided in an embodiment of this disclosure;
[0026] Figure 3 This is a schematic diagram of the structure of a detection frame filtering device provided in an embodiment of the present disclosure;
[0027] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0028] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0029] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0030] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0031] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0032] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0033] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0034] This disclosure provides a detection frame filtering method, apparatus, device, medium, and vehicle. The following first describes the method in conjunction with... Figures 1 to 2 The detection frame filtering method provided in the embodiments of this disclosure will be described in detail.
[0035] Figure 1 A schematic flowchart of a detection box filtering method provided in an embodiment of this disclosure is shown.
[0036] In this embodiment of the disclosure, the detection box filtering method can be performed by an electronic device. The electronic device can be a device with detection box filtering functionality. Specifically, the electronic device can be, but is not limited to, mobile terminals such as mobile phones, in-vehicle devices, vehicle controllers, tablet computers, and wearable devices.
[0037] like Figure 1 As shown, the detection box filtering method may include the following steps.
[0038] S110. Obtain the vehicle pitch angle of the target vehicle at the time of target image acquisition.
[0039] In this embodiment of the disclosure, after acquiring the target image, the electronic device can acquire the vehicle pitch angle of the target vehicle at the time the target image is acquired.
[0040] Optionally, the target vehicle can be a vehicle containing electronic devices.
[0041] Optionally, the target image can be the image to be processed.
[0042] Optionally, the vehicle pitch angle can be an angle representing the degree of pitch of the target vehicle. The vehicle pitch angle can be obtained through pitch angle detection equipment, such as an inertial measurement unit (IMU) or a vertical gyroscope; no specific limitation is made here.
[0043] For example, a Cartesian coordinate system can be formed by taking the center of the vehicle's rear axle as the origin of the coordinate system, the direction of the line connecting the front of the vehicle and the center of the rear axle on the horizontal plane as the abscissa direction, and the direction perpendicular to the abscissa as the ordinate direction. The vehicle pitch angle can be the angle between the direction of the line connecting the front of the vehicle and the center of the rear axle in this Cartesian coordinate system and the abscissa direction; it can also be a Cartesian coordinate system formed based on any point on the vehicle, etc., without limitation here.
[0044] Optionally, the acquisition time can be the time when the target image is acquired by the acquisition device.
[0045] Specifically, after acquiring the target image, the electronic device can determine the acquisition time of the target image and detect the vehicle pitch angle of the target vehicle at that acquisition time using a pitch angle detection device.
[0046] S120. When the vehicle pitch angle is within a preset angle range, the vanishing line is solved based on the vehicle pitch angle to obtain the target vanishing line corresponding to the target image.
[0047] In this embodiment of the disclosure, after acquiring the vehicle pitch angle, the electronic device can determine the vehicle pitch angle, and if the vehicle pitch angle is within a preset angle range, it can solve for the vanishing line based on the vehicle pitch angle to obtain the target vanishing line corresponding to the target image.
[0048] Optionally, the preset angle range can be a predefined angle range. For example, the preset angle range can be "-20°≤θ≤+20°", "-15°≤θ≤+15°", etc., and there is no limitation here.
[0049] Alternatively, the vanishing line can be a line segment between the vanishing point and the vanishing line in perspective.
[0050] Alternatively, the target vanishing line can be a vanishing line projected onto the target image.
[0051] Specifically, after acquiring the vehicle pitch angle, the electronic device can first determine the vehicle pitch angle. If the vehicle pitch angle is within a preset angle range, the electronic device can solve for the vanishing line based on the vehicle pitch angle, thereby obtaining the target vanishing line projected onto the target image.
[0052] For example, electronic devices can calculate the coordinate parameters of the vanishing line in the target image based on the vehicle's pitch angle, thereby obtaining the corresponding target vanishing line.
[0053] S130. Determine the positional relationship between the bottom edge of each detection box in the target image and the target vanishing line.
[0054] In this embodiment of the disclosure, after obtaining the target vanishing line corresponding to the target image, the electronic device can determine the positional relationship between the bottom edge of each detection box in the target image and the target vanishing line.
[0055] Optionally, the detection box can be a bounding box formed by detecting road targets. These road targets can be pedestrians, cyclists, obstacles, lane lines, etc., and are not limited here.
[0056] Optionally, the positional relationship can be a relative relationship between two objects.
[0057] Specifically, after obtaining the target vanishing line corresponding to the target image, the electronic device can determine the position of the bottom edge of each detection box in the target image and the position of the target vanishing line, thereby obtaining the positional relationship between the bottom edge of each detection box and the target vanishing line.
[0058] S140. When the positional relationship is a target positional relationship in which the bottom edge of the detection box is higher than the target vanishing line, filter the target detection box corresponding to the target positional relationship.
[0059] In this embodiment of the disclosure, after obtaining the positional relationship between the bottom edge of each detection box and the target vanishing line, the electronic device filters the target detection boxes if there are detection boxes corresponding to the target positional relationship.
[0060] Optionally, the target position relationship can be the relationship that the bottom edge of the detection box is higher than the target vanishing line.
[0061] Optionally, the target detection box can be a detection box with a target positional relationship.
[0062] Specifically, after obtaining the positional relationship between the bottom edge of each detection box and the target vanishing line, the electronic device checks whether there is a target positional relationship among the positional relationships, that is, whether there is a target detection box whose bottom edge is higher than the target vanishing line. If such a target detection box exists, it is filtered out.
[0063] Therefore, in this embodiment, the vehicle pitch angle of the target vehicle at the time of target image acquisition can be obtained. When the vehicle pitch angle is within a preset angle range, the vanishing line is solved based on the vehicle pitch angle to obtain the target vanishing line corresponding to the target image. Then, the positional relationship between the bottom edge of each detection box in the target image and the target vanishing line is determined. If there is a target detection box corresponding to the target positional relationship, the target detection box is filtered. The target positional relationship is that the bottom edge of the detection box is higher than the target vanishing line. Thus, the target vanishing line corresponding to the target image can be solved based on the vehicle pitch angle of the target vehicle. Based on the positional relationship between the target vanishing line and the bottom edge of each detection box in the target image, it can be determined whether the detection box needs to be filtered, thereby avoiding false filtering caused by unreasonable vehicle body posture. Furthermore, the vanishing line prior information is used to effectively detect each detection box, improving the detection box filtering effect.
[0064] Optionally, before S110, the detection box filtering method may further include: acquiring a target image in front of the target vehicle; performing road target detection processing on the target image to obtain each detection box in the target image.
[0065] In this embodiment of the disclosure, the electronic device may also acquire a target image in front of the target vehicle before acquiring the vehicle pitch angle.
[0066] Optionally, the target image can be an image of the front of the target vehicle. The target image can be acquired by a data acquisition device on the target vehicle. For example, the acquisition device can be a vehicle-mounted camera, vehicle-mounted camera, etc., without limitation.
[0067] Specifically, electronic devices can acquire images of the front of the target vehicle captured by the acquisition devices on the target vehicle, i.e., acquire target images.
[0068] Furthermore, after acquiring the target image, the electronic device can perform road target detection processing on the target image to obtain various detection boxes in the target image.
[0069] Optionally, road target detection processing can be used to detect road targets in an image.
[0070] For example, the target image can be input into a pre-trained convolutional neural network model, such as the LeNet model or the LeNet-5 model, so that the convolutional neural network model can perform road target detection processing on the target image.
[0071] Specifically, after acquiring the target image, the electronic device can perform road target detection processing on the target image, such as inputting the target image into a pre-trained convolutional neural network model, so that the convolutional neural network model can perform road target detection processing on the target image, thereby obtaining the various detection boxes in the target image output by the convolutional neural network model.
[0072] Therefore, in this embodiment of the disclosure, each detection box in the target image can be obtained, which is beneficial for subsequent detection and filtering of each detection box.
[0073] Optionally, S120 may specifically include: acquiring the calibration parameters of the acquisition device corresponding to the target image; and performing inverse perspective transformation calculation based on the acquisition device calibration parameters and the vehicle pitch angle to obtain the target vanishing line.
[0074] In this embodiment of the disclosure, when the vehicle pitch angle is within a preset angle range, the electronic device can acquire the calibration parameters of the acquisition device corresponding to the target image.
[0075] Optionally, the calibration parameters of the acquisition device may include intrinsic parameters and extrinsic parameters. For example, intrinsic parameters may include focal length, pixels, etc., while extrinsic parameters may include position, rotation direction, etc.
[0076] Specifically, when the vehicle's pitch angle is within a preset range, the electronic device can obtain the calibration parameters of the acquisition device corresponding to the target image stored in the database, that is, the calibration parameters of the acquisition device that acquired the target image. For example, the electronic device can obtain the calibration parameters of the corresponding vehicle camera, including the vehicle camera's focal length, pixels, positional relationship with the target vehicle, rotation direction, etc.
[0077] Furthermore, after acquiring the calibration parameters of the acquisition device, the electronic device can perform inverse perspective transformation calculations based on the calibration parameters of the acquisition device and the vehicle pitch angle to obtain the vanishing line of the target.
[0078] Alternatively, the inverse perspective transformation calculation can be a calculation method used to calculate the vanishing line of the target.
[0079] Specifically, after acquiring the calibration parameters of the acquisition device, the electronic device can perform inverse perspective transformation calculation on the calibration parameters of the acquisition device and the vehicle pitch angle to obtain the vanishing line of the target image. The specific calculation method can be the existing inverse perspective transformation method, which will not be elaborated here.
[0080] Therefore, in this embodiment of the disclosure, an accurate target vanishing line can be calculated based on the calibration parameters of the acquisition device and the vehicle pitch angle, thereby avoiding false filtering caused by unreasonable vehicle body posture, and using the vanishing line prior information to effectively detect each detection box, thus improving the detection box filtering effect.
[0081] Optionally, after S110, the detection box filtering method may further include: when the vehicle pitch angle is less than a preset angle range, using the preset vanishing line as the target vanishing line.
[0082] In this embodiment of the disclosure, after obtaining the vehicle pitch angle, if the vehicle pitch angle is less than a preset angle range, the electronic device can use the preset vanishing line as the target vanishing line.
[0083] Optionally, the vanishing line can be a pre-calculated vanishing line.
[0084] Specifically, after acquiring the vehicle pitch angle, the electronic device can determine whether the vehicle pitch angle is less than a preset angle range. If the vehicle pitch angle is less than the preset angle range, the electronic device can use the preset vanishing line as the target vanishing line corresponding to the target image.
[0085] Furthermore, after obtaining the vehicle pitch angle, if the vehicle pitch angle is greater than a preset angle range, the electronic device will not calculate the target vanishing line.
[0086] Therefore, in this embodiment of the present disclosure, when the vehicle pitch angle is less than a preset angle range, the electronic device can directly use the preset vanishing line as the target vanishing line, reducing the amount of calculation and improving the filtering efficiency of the detection box.
[0087] Optionally, using a preset vanishing line as the target vanishing line may specifically include: obtaining the calibration parameters of the acquisition device corresponding to the target image; performing inverse perspective transformation calculation based on the acquisition device calibration parameters and a preset pitch angle to obtain the preset vanishing line; and using the preset vanishing line as the target vanishing line.
[0088] In this embodiment of the disclosure, the electronic device can obtain the calibration parameters of the acquisition device corresponding to the target image. The specific acquisition method is described above and will not be repeated here.
[0089] Furthermore, after acquiring the calibration parameters of the acquisition device, the electronic device can perform inverse perspective transformation calculations based on the calibration parameters of the acquisition device and the preset pitch angle to obtain the preset vanishing line.
[0090] Optionally, the preset pitch angle can be a pre-defined angle. For example, the preset pitch angle can be 0°, 1°, etc., and there is no limitation here.
[0091] Specifically, after acquiring the calibration parameters of the acquisition device, the electronic device can perform inverse perspective transformation calculation on the calibration parameters of the acquisition device and the preset pitch angle to obtain the preset vanishing line. The specific calculation method can be the existing inverse perspective transformation method, which will not be elaborated here.
[0092] Furthermore, when the vehicle pitch angle is less than a preset angle range, the electronic equipment can use the preset vanishing line as the target vanishing line.
[0093] Therefore, in this embodiment of the present disclosure, when the vehicle pitch angle is less than a preset angle range, the electronic device can directly use the preset vanishing line as the target vanishing line, reducing the amount of calculation and improving the filtering efficiency of the detection box.
[0094] Optionally, before S130, the detection box filtering method may further include: obtaining the pitch angle change of the target vehicle within a preset time; if the pitch angle change is greater than a preset change threshold, moving the vertical coordinate of the target vanishing line upward by a preset distance; if the pitch angle change is less than or equal to the preset change threshold, keeping the target vanishing line unchanged.
[0095] In this embodiment of the disclosure, after obtaining the target vanishing line corresponding to the target image, the electronic device can obtain the pitch angle change of the target vehicle within a preset time.
[0096] Optionally, the preset time can be a pre-set time. For example, the preset time can be 2 seconds, 3 seconds, etc., and there is no limitation here.
[0097] Optionally, the pitch angle change can be the degree of pitch angle change over a preset time period. For example, the pitch angle change can be the pitch angle change rate, pitch angle variance, etc., which are not limited here.
[0098] Specifically, after obtaining the vanishing line corresponding to the target image, the electronic device can obtain the change in pitch angle of the target vehicle within a preset time using a pitch angle detection device.
[0099] In some embodiments, after acquiring the pitch angle change of the target vehicle within a preset time, the electronic device can determine the pitch angle change. If the pitch angle change is greater than a preset change threshold, the vertical coordinate of the target vanishing line is moved upward by a preset distance.
[0100] Optionally, the preset change threshold can be a pre-defined change threshold. For example, the preset change threshold can be 2°, 3°, etc., and there is no limitation here.
[0101] Optionally, the preset distance can be a pre-defined distance. For example, the preset distance can be 1m, 2m, etc., and there is no limitation here.
[0102] Specifically, after acquiring the pitch angle change of the target vehicle within a preset time, the electronic device can compare the pitch angle change with a preset change threshold. If the pitch angle change is greater than the preset change threshold, the electronic device will move the vertical coordinate of the target vanishing line upward by a preset distance.
[0103] In other embodiments, after acquiring the pitch angle change of the target vehicle within a preset time, the electronic device can determine the pitch angle change and keep the target vanishing line unchanged if the pitch angle change is less than or equal to a preset change threshold.
[0104] Specifically, after acquiring the pitch angle change of the target vehicle within a preset time, the electronic device can compare the pitch angle change with a preset change threshold. If the pitch angle change is less than or equal to the preset change threshold, the electronic device will keep the target vanishing line unchanged.
[0105] Therefore, in this embodiment of the present disclosure, the electronic device can dynamically adjust the position of the target vanishing line according to the pitch angle change, thereby avoiding false filtering caused by unreasonable vehicle body posture, and using the vanishing line prior information to effectively detect each detection box, thus improving the detection box filtering effect.
[0106] Optionally, S130 may specifically include: determining the positional relationship between the bottom edge of each target detection box and the target vanishing line according to the order of each detection box in the detection box queue, wherein the detection box queue is used to store each detection box in the target image.
[0107] In this embodiment of the disclosure, after obtaining the target vanishing line, the electronic device can sequentially determine the positional relationship between the bottom edge of each target detection box and the target vanishing line according to the arrangement order of each detection box in the detection box queue.
[0108] Optionally, the detection box queue can be a queue used to store individual detection boxes in the target image.
[0109] Optionally, the sorting order can be the positional order of each detection box in the target image. For example, the detection boxes can be sorted by the coordinates of their top-left corners, i.e., the smaller the x-coordinate of the top-left corner, the earlier the corresponding detection box appears. For detection boxes with the same x-coordinate, the y-coordinate of the top-left corner is then considered, and the smaller the y-coordinate, the earlier the corresponding detection box appears. This is not limited here.
[0110] Specifically, after obtaining the target vanishing line, the electronic device can determine the positional relationship between the bottom edge of each target detection box and the target vanishing line according to the arrangement order of each detection box stored in the detection box queue, thereby obtaining the positional relationship between the bottom edge of each detection box and the target vanishing line.
[0111] Therefore, in this embodiment of the disclosure, each detection box can be judged sequentially according to its arrangement order, thereby achieving fast and effective detection of each detection box and improving the detection box filtering effect.
[0112] The following is combined Figure 2 The filtering method for this detection box is described in detail.
[0113] Figure 2 A flowchart illustrating another detection box filtering method provided in an embodiment of this disclosure is shown.
[0114] like Figure 2 As shown, the detection box filtering method may include the following steps.
[0115] S201. Obtain the vehicle pitch angle at the moment the target image is acquired.
[0116] S201 is similar to S101, so it will not be described in detail here.
[0117] S202. Determine whether the vehicle pitch angle is within the preset angle range.
[0118] In this embodiment of the disclosure, after acquiring the vehicle pitch angle, the electronic device can determine whether the vehicle pitch angle is within a preset angle range.
[0119] Specifically, the electronic device can determine whether the vehicle pitch angle is within a preset angle range. If the vehicle pitch angle is within the preset angle range, S204 is executed; if the vehicle pitch angle is less than the preset angle range, S203 is executed.
[0120] S203. Use the preset vanishing line as the target vanishing line.
[0121] In this embodiment of the disclosure, after obtaining the vehicle pitch angle, if the vehicle pitch angle is less than a preset angle range, the electronic device can use the preset vanishing line as the target vanishing line.
[0122] Specifically, after acquiring the vehicle pitch angle, the electronic device can determine whether the vehicle pitch angle is less than a preset angle range. If the vehicle pitch angle is less than the preset angle range, the electronic device can use the preset vanishing line as the target vanishing line corresponding to the target image.
[0123] Furthermore, after obtaining the vehicle pitch angle, if the vehicle pitch angle is greater than a preset angle range, the electronic device will not calculate the target vanishing line.
[0124] S204. Solve for the vanishing line based on the vehicle pitch angle to obtain the target vanishing line corresponding to the target image.
[0125] In this embodiment of the disclosure, after acquiring the vehicle pitch angle, the electronic device can determine the vehicle pitch angle, and if the vehicle pitch angle is within a preset angle range, it can solve for the vanishing line based on the vehicle pitch angle to obtain the target vanishing line corresponding to the target image.
[0126] Specifically, after acquiring the vehicle pitch angle, the electronic device can first determine the vehicle pitch angle. If the vehicle pitch angle is within a preset angle range, the electronic device can solve for the vanishing line based on the vehicle pitch angle, thereby obtaining the target vanishing line projected onto the target image.
[0127] For example, electronic devices can calculate the coordinate parameters of the vanishing line in the target image based on the vehicle's pitch angle, thereby obtaining the corresponding target vanishing line.
[0128] S205. Determine whether the change in pitch angle is greater than the preset change threshold.
[0129] In this embodiment of the present disclosure, after obtaining the target vanishing line corresponding to the target image, the electronic device can obtain the pitch angle change of the target vehicle within a preset time period, and judge the pitch angle change to determine whether the pitch angle change is greater than a preset change threshold.
[0130] Specifically, the electronic device can determine the change in pitch angle. If the change in pitch angle is greater than a preset change threshold, S207 is executed; if the change in pitch angle is less than or equal to the preset change threshold, S206 is executed.
[0131] S206. Keep the target vanishing line unchanged.
[0132] In this embodiment of the disclosure, if the change in pitch angle is greater than a preset change threshold, the ordinate of the vanishing line of the target is moved upward by a preset distance.
[0133] Specifically, after acquiring the pitch angle change of the target vehicle within a preset time, the electronic device can compare the pitch angle change with a preset change threshold. If the pitch angle change is greater than the preset change threshold, the electronic device will move the vertical coordinate of the target vanishing line upward by a preset distance.
[0134] S207. Move the vertical coordinate of the target vanishing line upwards by a preset distance.
[0135] In this embodiment of the disclosure, the target vanishing line remains unchanged when the pitch angle change is less than or equal to a preset change threshold.
[0136] Specifically, after acquiring the pitch angle change of the target vehicle within a preset time, the electronic device can compare the pitch angle change with a preset change threshold. If the pitch angle change is less than or equal to the preset change threshold, the electronic device will keep the target vanishing line unchanged.
[0137] S208. Determine whether the bottom edge of each detection box is higher than the target vanishing line.
[0138] In this embodiment of the disclosure, after obtaining the target vanishing line, the electronic device can sequentially determine the positional relationship between the bottom edge of each target detection box and the target vanishing line according to the arrangement order of each detection box in the detection box queue, and determine whether the bottom edge of each detection box is higher than the target vanishing line.
[0139] Specifically, the electronic device can determine whether the bottom edge of each detection box is higher than the target vanishing line. If the bottom edge of the detection box is higher than the target vanishing line, S210 is executed; if the bottom edge of the detection box is lower than or equal to the target vanishing line, S209 is executed.
[0140] S209. Retain the target detection bounding box.
[0141] In this embodiment of the disclosure, the bottom edge of the retained detection box is lower than or equal to the target detection box corresponding to the target vanishing line.
[0142] S210, Filter target detection box.
[0143] In this embodiment of the disclosure, the bottom edge of the filter detection box is higher than the target detection box corresponding to the target vanishing line.
[0144] Therefore, in this embodiment, the vehicle pitch angle of the target vehicle at the time of target image acquisition can be obtained. When the vehicle pitch angle is within a preset angle range, the vanishing line is solved based on the vehicle pitch angle to obtain the target vanishing line corresponding to the target image. Then, the positional relationship between the bottom edge of each detection box in the target image and the target vanishing line is determined. When the positional relationship is that the bottom edge of the detection box is higher than the target vanishing line, the target detection box corresponding to the target positional relationship is filtered. Thus, the target vanishing line corresponding to the target image can be solved based on the vehicle pitch angle of the target vehicle. Based on the positional relationship between the target vanishing line and the bottom edge of each detection box in the target image, it can be determined whether the detection box needs to be filtered, thereby avoiding false filtering caused by unreasonable vehicle body posture. Furthermore, the vanishing line prior information is used to effectively detect each detection box, improving the detection box filtering effect.
[0145] Figure 3 A schematic diagram of the structure of a detection frame filtering device provided in an embodiment of this disclosure is shown.
[0146] In some embodiments of this disclosure, Figure 3 The detection frame filtering device shown can be installed within an electronic device. Specifically, the electronic device can include, but is not limited to, mobile terminals such as mobile phones, in-vehicle equipment, vehicle controllers, tablets, and wearable devices.
[0147] like Figure 3 As shown, the detection frame filtering device 300 may include a first acquisition module 310, a first calculation module 320, a position determination module 330, and a first processing module 340.
[0148] The first acquisition module 310 can be used to acquire the vehicle pitch angle of the target vehicle at the time of acquisition of the target image.
[0149] The first calculation module 320 can be used to solve for the vanishing line based on the vehicle pitch angle when the vehicle pitch angle is within a preset angle range, and obtain the target vanishing line corresponding to the target image.
[0150] The position determination module 330 can be used to determine the positional relationship between the bottom edge of each detection box in the target image and the target vanishing line.
[0151] The first processing module 340 can be used to filter the target detection box corresponding to the target position relationship when the position relationship is a target position relationship in which the bottom edge of the detection box is higher than the target vanishing line.
[0152] In this embodiment, the vehicle pitch angle of the target vehicle at the moment the target image is acquired can be obtained. When the vehicle pitch angle is within a preset angle range, the vanishing line is solved based on the vehicle pitch angle to obtain the target vanishing line corresponding to the target image. Then, the positional relationship between the bottom edge of each detection box in the target image and the target vanishing line is determined. If there is a target detection box corresponding to the target positional relationship, the target detection box is filtered. The target positional relationship is that the bottom edge of the detection box is higher than the target vanishing line. Thus, the target vanishing line corresponding to the target image can be solved based on the vehicle pitch angle of the target vehicle. Based on the positional relationship between the target vanishing line and the bottom edge of each detection box in the target image, it can be determined whether the detection box needs to be filtered, thereby avoiding false filtering caused by unreasonable vehicle body posture. Furthermore, the vanishing line prior information is used to effectively detect each detection box, improving the detection box filtering effect.
[0153] In some embodiments of this disclosure, the detection frame filtering device 300 may further include a second acquisition module and a second processing module.
[0154] The second acquisition module can be used to acquire a target image in front of the target vehicle before acquiring the vehicle pitch angle at the time of target image acquisition.
[0155] The second processing module can be used to perform road target detection processing on the target image to obtain various detection boxes in the target image.
[0156] In some embodiments of this disclosure, the first calculation module 320 may include a first acquisition unit and a first calculation unit.
[0157] The first acquisition unit can be used to acquire the calibration parameters of the acquisition device corresponding to the target image.
[0158] The first calculation unit can be used to perform inverse perspective transformation calculations based on the calibration parameters of the acquisition equipment and the vehicle pitch angle to obtain the target vanishing line.
[0159] In some embodiments of this disclosure, the detection frame filtering device 300 may further include a third processing module.
[0160] The third processing module can be used to take the preset vanishing line as the target vanishing line after obtaining the vehicle pitch angle of the target vehicle at the time of acquisition of the target image, if the vehicle pitch angle is less than a preset angle range.
[0161] In some embodiments of this disclosure, the third processing module may include a second acquisition unit, a second calculation unit, and a vanishing line determination unit.
[0162] The second acquisition unit can be used to acquire the calibration parameters of the acquisition device corresponding to the target image.
[0163] The second calculation unit can be used to perform inverse perspective transformation calculations based on the calibration parameters of the acquisition device and the preset pitch angle to obtain the preset vanishing line.
[0164] This vanishing line determination unit can be used to use a preset vanishing line as the target vanishing line.
[0165] In some embodiments of this disclosure, the detection frame filtering device 300 may further include a third acquisition module, a fourth processing module, and a fifth processing module.
[0166] The third acquisition module can be used to acquire the pitch angle change of the target vehicle within a preset time before determining the positional relationship between the bottom edge of each detection box in the target image and the target vanishing line.
[0167] The fourth processing module can be used to move the vertical coordinate of the target vanishing line upward by a preset distance when the pitch angle change is greater than a preset change threshold.
[0168] This fifth processing module can be used to keep the target vanishing line unchanged when the pitch angle change is less than or equal to a preset change threshold.
[0169] In some embodiments of this disclosure, the position determination module 330 can be specifically used to determine the positional relationship between the bottom edge of each target detection box and the target vanishing line according to the arrangement order of each detection box in the detection box queue. The detection box queue is used to store each detection box in the target image.
[0170] It should be noted that, Figure 3 The detection frame filtering device 300 shown can perform... Figure 1 and Figure 2 The various steps in the method embodiment shown are implemented. Figure 1 and Figure 2 The processes and effects in the method embodiments shown are not described in detail here.
[0171] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure is shown.
[0172] In some embodiments of this disclosure, Figure 4 The electronic device shown can be a device with a detection frame filtering function. Specifically, the electronic device can be, but is not limited to, mobile terminals such as mobile phones, in-vehicle equipment, vehicle controllers, tablets, and wearable devices.
[0173] like Figure 4 As shown, the electronic device may include a processor 401 and a memory 402 storing computer program instructions.
[0174] Specifically, the processor 401 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0175] Memory 402 may include a large-capacity storage for information or instructions. For example, and not limitingly, memory 402 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 402 may include removable or non-removable (or fixed) media. Where appropriate, memory 402 may be internal or external to the integrated gateway device. In a particular embodiment, memory 402 is a non-volatile solid-state memory. In a particular embodiment, memory 402 includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (Electrically Programmable ROM, EPROM), an electrically erasable programmable PROM (EEPROM), an electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0176] The processor 401 reads and executes computer program instructions stored in the memory 402 to perform the steps of the detection box filtering method provided in the embodiments of this disclosure.
[0177] In one example, the electronic device may also include a transceiver 403 and a bus 404. Wherein, as... Figure 4 As shown, the processor 401, memory 402 and transceiver 403 are connected via bus 404 and communicate with each other.
[0178] Bus 404 includes hardware, software, or both. For example, and not limitingly, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 404 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.
[0179] This disclosure also provides a computer-readable storage medium that can store a computer program. When the computer program is executed by a processor, the processor implements the detection box filtering method provided in this disclosure.
[0180] The aforementioned storage medium may, for example, include a memory 402 containing computer program instructions, which can be executed by a processor 401 of an electronic device to complete the detection frame filtering method provided in this embodiment. Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), compact disc ROM (CD-ROM), magnetic tape, floppy disk, and optical data storage device.
[0181] This disclosure also provides a vehicle including the detection frame filtering device as described above. It is understood that the vehicle may also include a processor, a memory, and a computer program. The computer program is stored in the memory and configured to be executed by the processor to implement the detection frame filtering method provided in this disclosure. The processor and memory are already... Figure 4 The parts of the illustrated embodiments will not be repeated here.
[0182] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.
[0183] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A bounding box filtering method, characterized in that, The method comprises the following steps: obtaining the vehicle pitch angle of the target vehicle at the capturing time of the target image; in the case that the vehicle pitch angle is within a preset angle range, solving the vanishing line based on the vehicle pitch angle to obtain the target vanishing line corresponding to the target image; judging the positional relationship between the bottom edge of each bounding box in the target image and the target vanishing line; when the positional relationship is a target positional relationship in which the bottom edge of the bounding box is higher than the target vanishing line, filtering the target bounding box corresponding to the target positional relationship; wherein, the solving of the vanishing line based on the vehicle pitch angle to obtain the target vanishing line corresponding to the target image comprises: obtaining the capturing device calibration parameters corresponding to the target image; performing inverse perspective transformation calculation based on the capturing device calibration parameters and the vehicle pitch angle to obtain the target vanishing line.
2. The method of claim 1, wherein, Before the step of obtaining the vehicle pitch angle of the target vehicle at the capturing time of the target image, the method further comprises: obtaining the target image in front of the target vehicle; performing road target detection processing on the target image to obtain each bounding box in the target image.
3. The method of claim 1, wherein, After the step of obtaining the vehicle pitch angle of the target vehicle at the capturing time of the target image, the method further comprises: in the case that the vehicle pitch angle is less than the preset angle range, taking a preset vanishing line as the target vanishing line.
4. The method of claim 3, wherein, The step of taking the preset vanishing line as the target vanishing line comprises: obtaining the capturing device calibration parameters corresponding to the target image; performing inverse perspective transformation calculation based on the capturing device calibration parameters and the preset pitch angle to obtain the preset vanishing line; taking the preset vanishing line as the target vanishing line.
5. The method of claim 1, wherein, Before the step of judging the positional relationship between the bottom edge of each bounding box in the target image and the target vanishing line, the method further comprises: obtaining the pitch angle variation of the target vehicle within a preset time; in the case that the pitch angle variation is greater than a preset variation threshold, moving the longitudinal coordinate of the target vanishing line upward by a preset distance; in the case that the pitch angle variation is less than or equal to the preset variation threshold, keeping the target vanishing line unchanged.
6. The method of claim 1, wherein, The step of judging the positional relationship between the bottom edge of each bounding box in the target image and the target vanishing line comprises: judging the positional relationship between the bottom edge of each target bounding box and the target vanishing line in turn according to the arrangement order of each bounding box in a bounding box queue, wherein the bounding box queue is used to store each bounding box in the target image.
7. A detection frame filtering device, characterized by, The method comprises the following steps: a first obtaining module is configured to obtain the vehicle pitch angle of the target vehicle at the capturing time of the target image; a first calculation module is configured to, in the case that the vehicle pitch angle is within a preset angle range, solve the vanishing line based on the vehicle pitch angle to obtain the target vanishing line corresponding to the target image; a position judging module is configured to judge the positional relationship between the bottom edge of each bounding box in the target image and the target vanishing line; a first processing module is configured to, when the positional relationship is a target positional relationship in which the bottom edge of the bounding box is higher than the target vanishing line, filter the target bounding box corresponding to the target positional relationship; The first computing module comprises: A first acquisition unit configured to acquire a collection device calibration parameter corresponding to the target image; A first computing unit configured to perform inverse perspective transformation calculation based on the collection device calibration parameter and the vehicle pitch angle to obtain the target vanishing line.
8. An electronic device, comprising: The method comprises: A processor; A memory configured to store executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the bounding box filtering method according to any one of the preceding claims 1-6.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by the processor, the processor implements the bounding box filtering method according to any one of the preceding claims 1-6.
10. A vehicle characterized by comprising: The bounding box filtering device according to claim 7.
Citation Information
Patent Citations
Measuring method of vehicle distance at curves
CN103196418A
Systems and methods for identifying available parking spaces using connected vehicles
US20210319697A1