CN110853366B - Method and device for detecting parking position of vehicle - Google Patents

Method and device for detecting parking position of vehicle Download PDF

Info

Publication number
CN110853366B
CN110853366B CN201911143189.9A CN201911143189A CN110853366B CN 110853366 B CN110853366 B CN 110853366B CN 201911143189 A CN201911143189 A CN 201911143189A CN 110853366 B CN110853366 B CN 110853366B
Authority
CN
China
Prior art keywords
vehicle
detected
frame
tire
parking
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911143189.9A
Other languages
Chinese (zh)
Other versions
CN110853366A (en
Inventor
程展
戴安成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN201911143189.9A priority Critical patent/CN110853366B/en
Publication of CN110853366A publication Critical patent/CN110853366A/en
Application granted granted Critical
Publication of CN110853366B publication Critical patent/CN110853366B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/017Detecting movement of traffic to be counted or controlled identifying vehicles
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/123Traffic control systems for road vehicles indicating the position of vehicles, e.g. scheduled vehicles; Managing passenger vehicles circulating according to a fixed timetable, e.g. buses, trains, trams

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Traffic Control Systems (AREA)

Abstract

The application provides a method and a device for detecting a vehicle parking position, which are used for improving the accuracy of detecting the vehicle parking position. The method comprises the following steps: obtaining a vehicle detection frame of a vehicle to be detected in an image to be detected, and obtaining tire information of the vehicle to be detected; the tire information comprises tire detection frames corresponding to all tires in the vehicle to be detected; if the number of the obtained tire detection frames is two, determining a projection point of a vehicle to be detected on the ground according to the relative position information of the two tire detection frames and the relative position information between any one of the two tire detection frames and the vehicle detection frame; and determining the parking frame where the projection point is located as the parking frame where the vehicle to be detected is located. The method determines the parking space where the vehicle is located by combining the information of the vehicle detection frame and the information of the two tire detection frames, so that the accuracy of detecting the parking position of the vehicle is improved.

Description

Method and device for detecting parking position of vehicle
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method and an apparatus for detecting a parking position of a vehicle.
Background
With the continuous development of image processing technology, the image processing technology is more and more widely applied in the field of intelligent transportation, for example, the parking condition of a vehicle can be detected by utilizing image processing.
Currently, the way of detecting the parking position of the vehicle is generally: the method comprises the steps of collecting a vehicle image, detecting a vehicle detection frame corresponding to a vehicle, taking the center point coordinate of the vehicle detection frame corresponding to the vehicle as the ground projection coordinate of the motor vehicle, and determining the parking space parking frame in which the coordinate is located. However, since the size of the vehicle detection frame is actually related to the height of the vehicle, if the vehicle is too high or too low, the detected parking space where the vehicle is parked is different from the parking space where the vehicle is actually parked, and a detection error occurs.
Disclosure of Invention
The embodiment of the application provides a method and a device for detecting a vehicle parking position, which are used for improving the accuracy of detecting vehicle parking.
In a first aspect, a method for detecting a parking position of a vehicle is provided, and the method is applied to a device for detecting a parking position of a vehicle, and comprises the following steps:
obtaining a vehicle detection frame of a vehicle to be detected in an image to be detected, and obtaining tire information of the vehicle to be detected; the tire information comprises tire detection frames corresponding to all tires in the vehicle to be detected;
if the number of the obtained tire detection frames is two, determining a projection point of the vehicle to be detected on the ground according to the relative position information of the two tire detection frames and the relative position information between any one of the two tire detection frames and the vehicle detection frame;
and determining the parking frame where the projection point is located as the parking frame where the vehicle to be detected is located.
In the embodiment of the application, the relative position information of the two tire detection frames and the relative position information between the tire detection frames and the vehicle detection frame are combined to determine the projection point of the vehicle on the ground, so that the calculated projection coordinate of the vehicle on the ground is closer to the coordinate of the target actual parking position, whether the vehicle is parked in the parking space is judged more accurately by using the information, and the accuracy of judging the vehicle driving-in and driving-out events can be improved. Furthermore, in the embodiment of the application, too many devices are not needed, so that the cost can be relatively saved, the depth map information is not needed, the accuracy of detecting the parking of the vehicle is simplified, the error caused by inaccurate depth information is reduced, the software implementation logic is simple, and the requirement on the performance of the device is low.
In a possible embodiment, if two tire detection frames are obtained, determining a projection point of the vehicle to be detected on the ground according to the relative position information of the two tire detection frames and the relative position information between any one of the two tire detection frames and the vehicle detection frame, includes:
if the number of the obtained tire detection frames is two, determining a reference point coordinate on each tire detection frame in the two tire detection frames, and determining a central point coordinate between the two reference point coordinates;
and correcting the coordinates of the central points of the two reference points according to the offset of any one of the two tire detection frames relative to the vehicle detection frame to obtain the projection point of the vehicle to be detected on the ground.
In the embodiment of the application, the center points of the reference points of the two tire detection frames can be determined based on the offset between the tire detection frame and the vehicle detection frame, so that the determined calculated vehicle ground projection coordinate is closer to the coordinate of the target actual parking position, and the accuracy of detecting the vehicle parking position is further improved.
In a possible embodiment, the correcting the coordinates of the center points of the two reference points according to the offset of any one of the two tire detection frames relative to the vehicle detection frame to obtain the projected point of the vehicle to be detected on the ground includes:
determining a distance between a reference point of a first tire detection frame and a first frame of the vehicle detection frame; the first tire detection frame and the second tire detection frame are different tire detection frames in the two tire detection frames, and the first frame is a frame which is perpendicular to a reference point coordinate of the first tire detection frame in the vehicle detection frame and is closer to one frame of the first tire detection frame than the second tire detection frame;
determining the product of a preset proportion and the distance to obtain the offset of the first tire detection frame relative to the vehicle detection frame;
and correcting the coordinates of the central points of the two reference points according to the offset to obtain the projection point of the vehicle to be detected on the ground.
In the embodiment of the application, the offset amount is determined based on the distance between the reference point of the first tire detection frame and the first frame of the vehicle detection frame, so that the accuracy of the determined projection point can be relatively improved.
In a possible embodiment, correcting the coordinates of the center points of the two reference points according to the offset to obtain the projected point of the vehicle to be detected on the ground includes:
if the coordinate value of the reference point of the first tire detection frame in the first direction is smaller than the coordinate value of the reference point of the second tire detection frame in the first direction, reducing the coordinate value of the center point coordinates of the two reference points in the first direction by the offset to obtain the projection point of the vehicle to be detected on the ground; the first direction is a direction corresponding to a frame where a reference point of the first tire detection frame is located;
if the coordinate value of the reference point of the first tire detection frame in the first direction is larger than the coordinate value of the reference point of the second tire detection frame in the first direction, the coordinate value of the center point coordinates of the two reference points in the first direction is increased by the offset, and the projection point of the vehicle to be detected on the ground is obtained.
In the embodiment of the application, the coordinates of the center points of the two tire detection frames can be adjusted according to the actual deviation condition of the coordinate values between the reference points of the two tire detection frames, so that more accurate vehicle section projection points can be obtained.
In a possible embodiment, after obtaining the vehicle detection frame of the vehicle to be detected and obtaining the tire information of the vehicle to be detected, the method includes:
if the number of the obtained tire detection frames is more than or less than two, determining whether the to-be-detected image contains the license plate of the to-be-detected vehicle;
if the image to be detected contains the license plate of the vehicle to be detected, determining a license plate detection frame corresponding to the license plate;
and determining the central point of the license plate detection frame as a projection point of the vehicle to be detected on the ground.
In the embodiment of the application, when the tire detection frame cannot be detected, the projection point of the vehicle on the ground can be determined through the central point of the license plate detection frame, so that the more accurate projection point of the vehicle to be detected on the ground can be obtained.
In a possible embodiment, after determining whether the image to be detected contains the license plate of the vehicle to be detected, the method includes:
if the image to be detected does not contain the license plate of the vehicle to be detected, determining the central point of the vehicle detection frame;
determining a reference parking frame where the central point of the vehicle detection frame is located;
obtaining vehicle parking information of each parking frame in the N parking frames adjacent to the reference parking frame, and determining at least one parking frame in the N parking frames adjacent to the reference parking frame and on which a vehicle is parked;
according to the shooting direction of the detected vehicle parking position, a forward parking frame, positioned in front of the vehicle detection frame in the shooting direction, of the at least one parking frame is determined, and the determined parking frame, positioned behind the shooting direction and attached to the forward parking frame, is determined to be the parking frame corresponding to the vehicle to be detected.
In this application embodiment, when can't detect the tire and detect the frame to and under the license plate was sheltered from the condition, can determine the parking frame of waiting to detect the vehicle based on vehicle parking information on every side, and then improved the precision of judging the parking stall.
In a second aspect, there is provided an apparatus for detecting a parking position of a vehicle, comprising:
the detection module is used for obtaining a vehicle detection frame of the vehicle to be detected in the image to be detected and obtaining tire information of the vehicle to be detected; the tire information comprises tire detection frames corresponding to all tires in the vehicle to be detected;
the determining module is used for determining a projection point of the vehicle to be detected on the ground according to the relative position information of the two tire detection frames and the relative position information between any one of the two tire detection frames and the vehicle detection frame if the number of the obtained tire detection frames is two; and determining the parking frame where the projection point is located as the parking frame where the vehicle to be detected is located.
In a possible embodiment, the determining module is specifically configured to:
if the number of the obtained tire detection frames is two, determining a reference point coordinate on each tire detection frame in the two tire detection frames, and determining a central point coordinate between the two reference point coordinates;
and correcting the coordinates of the central points of the two reference points according to the offset of any one of the two tire detection frames relative to the vehicle detection frame to obtain the projection point of the vehicle to be detected on the ground.
In a possible embodiment, the determining module is specifically configured to:
determining a distance between a reference point of a first tire detection frame and a first frame of the vehicle detection frame; the first tire detection frame and the second tire detection frame are different tire detection frames in the two tire detection frames, and the first frame is a frame which is perpendicular to a reference point coordinate of the first tire detection frame in the vehicle detection frame and is closer to one frame of the first tire detection frame than the second tire detection frame;
determining the product of a preset proportion and the distance to obtain the offset of the first tire detection frame relative to the vehicle detection frame;
and correcting the coordinates of the central points of the two reference points according to the offset to obtain the projection point of the vehicle to be detected on the ground.
In a possible embodiment, the determining module is specifically configured to:
if the coordinate value of the reference point of the first tire detection frame in the first direction is smaller than the coordinate value of the reference point of the second tire detection frame in the first direction, reducing the coordinate value of the center point coordinates of the two reference points in the first direction by the offset to obtain the projection point of the vehicle to be detected on the ground; the first direction is a direction corresponding to a frame where a reference point of the first tire detection frame is located;
if the coordinate value of the reference point of the first tire detection frame in the first direction is larger than the coordinate value of the reference point of the second tire detection frame in the first direction, the coordinate value of the center point coordinates of the two reference points in the first direction is increased by the offset, and the projection point of the vehicle to be detected on the ground is obtained.
In a possible embodiment, the detection module is further configured to determine whether the license plate of the vehicle to be detected is included in the image to be detected if more or less than two tire detection frames are obtained after obtaining a vehicle detection frame of the vehicle to be detected and obtaining tire information of the vehicle to be detected;
the determining module is further configured to determine a license plate detection frame corresponding to the license plate if the image to be detected contains the license plate of the vehicle to be detected; and determining the central point of the license plate detection frame as a projection point of the vehicle to be detected on the ground.
In a possible embodiment, the determining module is further configured to:
after determining whether the image to be detected contains the license plate of the vehicle to be detected, if the image to be detected does not contain the license plate of the vehicle to be detected, determining the central point of the vehicle detection frame;
determining a reference parking frame where the central point of the vehicle detection frame is located;
obtaining vehicle parking information of each parking frame in the N parking frames adjacent to the reference parking frame, and determining at least one parking frame in the N parking frames adjacent to the reference parking frame and on which a vehicle is parked;
according to the shooting direction of the detected vehicle parking position, a forward parking frame, positioned in front of the vehicle detection frame in the shooting direction, of the at least one parking frame is determined, and the determined parking frame, positioned behind the shooting direction and attached to the forward parking frame, is determined to be the parking frame corresponding to the vehicle to be detected.
In a third aspect, there is provided an apparatus for detecting a parking position of a vehicle, comprising:
at least one processor, and
a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the at least one processor implementing the method of any one of the first aspect by executing the instructions stored by the memory.
In a fourth aspect, a computer readable storage medium stores computer instructions which, when run on a computer, cause the computer to perform the method of any of the first aspects.
Drawings
Fig. 1 is a schematic view of an application scenario of a method for detecting a parking position of a vehicle according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for detecting a parking position of a vehicle according to an embodiment of the present application;
FIG. 3 is a schematic view of the positions of a tire testing frame distribution provided in the embodiment of the present application;
FIG. 4 is a schematic view of the positions of a tire testing frame distribution provided in the embodiments of the present application;
fig. 5 is a schematic view of a vehicle distribution of a parking space according to an embodiment of the present application;
FIG. 6 is a first schematic structural diagram of an apparatus for detecting a parking position of a vehicle according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a device for detecting a parking position of a vehicle according to an embodiment of the present application.
Detailed Description
In order to better understand the technical solutions provided by the embodiments of the present application, the following detailed description is made with reference to the drawings and specific embodiments.
With the development of image processing technology, it is gradually applied to vehicle parking position detection, for example, to detect how many parking spaces remain in a garage, or to detect whether a vehicle is normally parked, and the like.
At present, a detector is generally adopted to obtain a vehicle detection frame. And directly taking the central point of the vehicle detection frame as a projection point of the vehicle on the ground, and judging whether the projection point is positioned in the parking frame or not so as to judge the parking position of the vehicle. However, the size of the vehicle detection frame may be related to the size of the anchor frame preset by the detector itself and the size of the vehicle body, and if the vehicle body is too high, it is possible that the center point of the vehicle detection frame is located outside the parking frame, but the vehicle is actually parked in the parking frame, resulting in an inaccurate detected parking position of the vehicle.
In view of this, the present application provides a method for detecting a parking position of a vehicle, where the method is performed by an apparatus for detecting a parking position of a vehicle, and the apparatus may be implemented by a device with image processing capability, such as a camera, a personal computer, a mobile phone, a personal tablet computer, and the like, and the present application does not limit a specific implementation manner of the apparatus.
Referring to fig. 1, a schematic view of an application scenario is shown. The application scenario includes detecting a vehicle parking position device 110 and a vehicle 120. The device 110 for detecting a parking position of a vehicle is shown in fig. 1 as an example, and the implementation of the device 110 for detecting a parking position of a vehicle is not limited in practice.
When the device 110 for detecting the parking position of the vehicle detects the collected image in real time or periodically, the image to be detected is obtained. The vehicle parking position detecting device 110 detects the vehicle in the image to be detected and marks a corresponding vehicle detection frame. After obtaining the vehicle detection frame, the device for detecting a vehicle parking position 110 may detect a tire of the vehicle corresponding to the vehicle detection frame. The device 110 for detecting the parking position of the vehicle may also detect the image to be detected simultaneously to obtain the vehicle detection frame 140 and the tire detection frame 150. Since the angle of the image to be detected and the like may be changed constantly, the image to be detected may not include a tire or may include a tire, and when a tire is included, the tire detection frame 150 may be obtained.
After detecting two tire detection frames 150 (e.g., the first tire detection frame 151 and the second tire detection frame 152 in fig. 1), the device 110 for detecting a vehicle parking position may determine a projection point of the vehicle to be detected on the ground based on the relative position information of the two tire detection frames and the relative position information between the tire detection frames and the vehicle detection frames, and determine a parking frame where the projection point is located as the parking frame 130 where the vehicle to be detected is located.
It should be noted that the vehicle detection referred to in the embodiments of the present application is applicable to all vehicles, including but not limited to motor vehicles.
A method for detecting a parking position of a vehicle according to an embodiment of the present application is described below based on an application scenario of fig. 1. In the embodiment of the present application, the process of the method for determining the parking position of the vehicle by the device for detecting the parking position of the vehicle 110 is described as an example when the device for detecting the parking position of the vehicle 110 processes an image to be detected.
Referring to fig. 2, the method mainly includes two cases, which are described below.
First, two tire detection frames are detected:
and step 201, detecting the vehicle.
Specifically, as discussed above, after obtaining the image to be detected, the device for detecting a vehicle parking position 110 may perform image detection on the image to be detected, detect a vehicle in the image to be detected, and obtain position information of the vehicle, for example, obtain a vehicle detection frame, where the vehicle detection frame may be rectangular or may have any shape, and the embodiment of the present application is not limited in particular. There are many ways of image detection, such as semantic segmentation or exemplar segmentation. An example is described below.
The device for detecting a parking position of a vehicle 110 inputs an image to be detected into a vehicle detection model, and obtains a vehicle detection frame containing the vehicle.
Specifically, the vehicle detection model may be obtained by training a large number of sample images containing vehicles, and after training, the device 110 for detecting the parking position of the vehicle may be directly used to detect the vehicle, so as to obtain a vehicle detection frame in the image to be detected. The vehicle detection frame is in the form of a detection frame, but in practice the vehicle detection frame contains coordinate information of each point in the vehicle detection frame, and the vehicle detection frame corresponds to the information of the vehicle.
In a possible embodiment, the image to be detected may include a plurality of vehicles, and the device for detecting the parking position of the vehicle 110 may obtain a plurality of vehicles in the image to be detected, and hereinafter, taking processing of one vehicle detection frame (also referred to as a vehicle to be detected) in the image to be detected as an example, determine the parking position of the vehicle to be detected.
Step 202, tire testing.
Specifically, after the device 110 for detecting a vehicle parking position detects the vehicle detection frame, the tire detection may be performed on the vehicle in the vehicle detection frame to obtain the tire information. The tire information includes a tire detection frame within the vehicle detection frame. The detection method may be any image detection method. The manner of obtaining the tire detection frame may refer to the manner of obtaining the vehicle detection frame discussed above, and will not be described herein again. The vehicle to be detected may include one tire, or a plurality of tires, or may not include a tire in the image to be detected due to the shooting angle or the like of the image to be detected.
As an example, since the color of the tire is generally fixed, the tire in the image to be detected can be detected based on the color of the tire.
Step 203, whether two tires are detected.
Specifically, tire detection frames in the vehicle detection frame, that is, the number of obtained tires, may be obtained, as shown in fig. 2, if there are two tire detection frames, step 204 is performed to determine the projected point of the vehicle on the ground, and if there are not two tire detection frames, that is, less than or greater than two tire detection frames, step 206 is performed to detect whether the vehicle parking position device 110 detects the license plate.
Step 204, determining the projection point of the vehicle on the ground.
As discussed above, when there are two tire detection frames in the image to be detected, the projected point of the vehicle on the ground can be determined, and the process of determining the projected point of the vehicle on the ground will be described as an example.
An example of a way to determine the vehicle proxels is as follows:
and determining the projection point of the vehicle to be detected on the ground according to the relative position information of the two tire detection frames and the relative position information between any one of the two tire detection frames and the vehicle detection frame.
Specifically, the tires of the vehicle are all grounded and are the only components on the vehicle which are attached to the ground, and the grounding coordinates of all the tires of the vehicle really represent the coordinates of the projected ground of the vehicle target, so that the projected point of the vehicle on the ground can be determined based on the relative position between the tire detection frames detected in the foregoing.
In one possible embodiment, the reference point in each of the two tire detection frames may be directly determined, and the central point of the two reference points corresponding to the two tire detection frames is used as the projection point of the vehicle on the ground. The reference point refers to a point at a predetermined position in the tire detection frame, such as a center point in the tire detection frame, or a point on any side of the tire detection frame. The reference point determination criterion of the device for detecting a parked position of a vehicle 110 is the same, that is, the relative position of the reference point taken for each of the two tire detection frames is the same.
The center point coordinate between the two reference point coordinates is taken as a projection point of the vehicle on the ground, but the center point coordinate between the two reference point coordinates actually determined may be deviated, and thus the center point coordinate between the two reference point coordinates may be corrected based on the relative position information between the tire detection frame and the vehicle detection frame.
In one possible embodiment, the distance between the reference point of the first tire detection frame and the first frame of the vehicle detection frame is determined, the product of the preset proportion and the distance is determined, the offset of the first tire detection frame relative to the vehicle detection frame is obtained, and the coordinates of the center points of the two reference points are corrected according to the offset to obtain the projection point of the vehicle to be detected on the ground.
Specifically, the first tire detection frame and the second tire detection frame are different tire detection frames in the two tire detection frames, the first frame is perpendicular to a frame in the vehicle detection frame where the reference point coordinate of the first tire detection frame is located, and the first frame is closer to the frame of the first tire detection frame than the second tire detection frame. The preset ratio is 1/2. And correcting the center coordinates of the two reference points according to the offset to obtain the projection point of the vehicle to be detected on the ground.
The following two ways of adjusting the coordinates of the center point of the two reference points based on the offset are specifically described as follows.
The first method is as follows:
if the coordinate value of the reference point of the first tire detection frame in the first direction is smaller than the coordinate value of the reference point of the second tire detection frame in the first direction, reducing the coordinate value of the center point coordinates of the two reference points in the first direction by the offset, and obtaining the projection point of the vehicle to be detected on the ground.
Specifically, the first direction is a direction corresponding to a frame where a reference point of the first tire detection frame is located, for example, the first direction is a horizontal direction. The first tire detection frame and the second tire detection frame belong to two tire detection frames. The relative offset between the first tire detection frame and the second tire detection frame is different, if the second tire detection frame is offset towards one direction of the vehicle detection frame relative to the first tire detection frame, offset compensation is carried out on coordinate values in the direction, specifically, the coordinate values of the center points of the two reference points in the first direction are reduced by the offset, and then the projection point of the vehicle to be detected on the ground is obtained, so that the projection point of the vehicle to be detected on the ground is obtained.
For example, referring to FIG. 3, the vehicle inspection frame is illustrated as a rectangular frame in which P1-P2-P3-P4 in FIG. 3 is located, the first tire inspection frame is illustrated as a rectangular frame in which A1-B1 in FIG. 3 is located, the second tire inspection frame is illustrated as a rectangular frame in which A2-B2 in FIG. 3 is located, and the reference point is set as a center point on a frame on the first tire inspection frame. The reference point of the first tire detection frame is C, the reference point of the second tire detection frame is D, and the center point of the two reference points is E1. The coordinate value of E1 in the horizontal direction is reduced by the offset amount, so that a coordinate point of E2 is obtained, which is the projected point of the vehicle on the ground.
The second method comprises the following steps:
if the coordinate value of the reference point of the first tire detection frame in the first direction is larger than the coordinate value of the reference point of the second tire detection frame in the first direction, the coordinate value of the center point of the two reference points in the first direction is increased by the offset, and the projection point of the vehicle to be detected on the ground is obtained from the obtained projection point of the vehicle to be detected on the ground.
For example, referring to FIG. 4, the vehicle inspection frame is illustrated as a rectangular frame in P1-P2-P3-P4 in FIG. 4, the first tire inspection frame is illustrated as a rectangular frame in A1-B1 in FIG. 4, the second tire inspection frame is illustrated as a rectangular frame in A2-B2 in FIG. 4, and the reference point is set as a center point on a frame of the first tire inspection frame. The reference point of the first tire detection frame is C, the reference point of the second tire detection frame is D, and the center point of the two reference points is E1. The coordinate value of E1 in the horizontal direction is reduced by the offset amount, so that a coordinate point of E2 is obtained, which is the projected point of the vehicle on the ground.
Step 205, judging that the vehicle is parked in a parking space of several numbers.
Specifically, the device for detecting a vehicle parking position 110 may have parking frames corresponding to a plurality of parking spaces in advance, the parking frame may specifically be understood as boundary coordinate information corresponding to the parking space, and the device for detecting a vehicle parking position 110 may also obtain the parking frames of the plurality of parking spaces through a detector or the like. After the projection point of the vehicle on the ground is determined, the projection point is specifically located in which parking frame, and the parking space where the projection point is located is determined as the final parking space where the vehicle is located.
Second, a case where not two tire detection frames are detected:
as discussed above in step 203, when the parking position detecting device 110 determines that there are fewer or more than two tire detection frames detected, step 206 can be performed to determine whether a license plate is detected.
Specifically, since the license plate is located on the vehicle body, the parking space where the vehicle is located can be determined based on the license plate, and therefore, the device 110 for detecting the parking position of the vehicle determines whether the image to be detected includes the license plate or not by using an image detection technique. The image detection technique can refer to the foregoing discussion, and is not described in detail here. And if the image to be detected comprises the license plate, executing step 207, and determining the central point of the license plate detection frame as a projection point. If the license plate is not included in the image to be detected, step 208 is executed to determine the central point of the vehicle detection frame.
And step 207, determining the central point of the license plate detection frame as a projection point.
After the center point of the license plate detection frame is determined as the projection point, step 205 may be executed to determine the parking space where the projection point is located, so that the parking space where the parking space is located is used as the center point of the license plate detection frame.
In step 208, the center of the vehicle detection frame is determined.
When the image to be detected does not contain the license plate, the central point of the vehicle detection frame can be determined firstly.
And step 209, determining that the vehicle is parked in several parking spaces by using the central point of the vehicle detection frame.
Specifically, under the condition, two tires cannot be detected, and the license plate of the vehicle cannot be detected, and at the moment, the license plate of the vehicle is shielded by the front vehicle at a high probability. And taking the central point of the vehicle detection frame as a ground projection coordinate, judging that the vehicle is parked in several parking frames, and taking the determined parking frame as a reference parking frame.
And step 210, correcting the parking space in which the vehicle is parked.
Specifically, since the parking space determined based on the center point of the vehicle detection frame may be inaccurate, the device for detecting a parking position of a vehicle 110 may determine the parking frame in which the vehicle is actually located according to the determined reference parking frame. The following exemplifies a manner of correcting a parking space in which a vehicle is parked.
The means for detecting a parking position of a vehicle 110 may correct a parking space in which the vehicle is parked, based on the parking information of each of N parking frames adjacent to the reference parking frame, and the photographing direction of the detected parking position of the vehicle. The value of N may be determined according to the number of parking spaces that can be monitored by the device for detecting a parking position of the vehicle 110, and the number of parking spaces that can be monitored by the device for detecting a parking position of the vehicle 110 may be determined by the number of parking spaces included in the captured image when the image is captured once, for example, the number of parking spaces that can be monitored once by the device for detecting a parking position of the vehicle 110 may be four.
Specifically, the device for detecting a vehicle parking position 110 cannot detect information such as a license plate and a tire from the image to be detected, which indicates that the vehicle is blocked along the shooting direction of the device for detecting a vehicle parking position 110, so that the device for detecting a vehicle parking position 110 can obtain the vehicle parking information of each parking frame of N parking frames adjacent to the reference parking frame according to the vehicle parking condition of each parking frame obtained in advance, and then determine one or more parking frames in which the vehicle is parked from the N parking frames. According to the shooting direction corresponding to the vehicle parking position device, the parking frame with the vehicle is parked and the front parking frame in front of the vehicle detection frame is located, the determined front parking frame is sent back in the shooting direction and is attached to the parking frame arranged in front of the vehicle detection frame, and the parking frame for detecting the vehicle is determined.
For example, referring to fig. 5, the device 110 for detecting a parking position of a vehicle can monitor 4 parking spaces, which are sequentially the space No. 1, the space No. 2, the space No. 3 and the space No. 4. The parking spaces a and B represent vehicles that have been previously parked, and the vehicle C represents a currently-driven vehicle, i.e., a vehicle to be checked.
Several cases are specifically exemplified below.
K1:
If the device for detecting a vehicle parking position 110 detects that there is only one parking space before the vehicle C enters, the device for detecting a vehicle parking position 110 can directly determine that the vehicle C is located in the vacant parking space.
K2:
The device 110 for detecting the parking position of the vehicle has 3 parking spaces before the vehicle C drives in, and cannot detect the license plate of the vehicle C, and the vehicle C can only park in the N +1 parking spaces behind the occupied N parking spaces to cause the license plate to be shielded by the front vehicle, so that the parking space number of the vehicle C parked is corrected to be the N +1 parking space.
K3:
Before the C vehicle drives in, two free parking spaces are arranged.
1. As shown in (1) in fig. 5, the a car and the B car are parked in the parking spaces No. 4 and No. 3, respectively, and in this case, the license plate of the C car cannot be hidden and is therefore not considered.
2. As shown in fig. 5 (2), the car a is parked in the parking space No. 4, and the car B is parked in the parking space No. 2. In this case, it is determined that the parking space located in front of the car C and not free is the parking space No. 2, and therefore, the parking space number of the car C is corrected to be the parking space No. 3.
3. As shown in (3) in fig. 5, the car a is parked in the parking space No. 4, and the car B is parked in the parking space No. 1, in which case it is determined that the car a is located in front of the car C, and no empty parking space is the parking space No. 1, and therefore, the parking space number of the car C is corrected to be the parking space No. 2.
4. As shown in (4) in fig. 5, the car a is parked in the parking space No. 3, and the car B is parked in the parking space No. 2, in which case it is determined that the car a is located in front of the car C, and no empty parking space is the parking space No. 3, and therefore, the parking space number of the car C is corrected to be the parking space No. 4.
5. As shown in (5) in fig. 5, the car a is parked in the parking space No. 3, and the car B is parked in the parking space No. 1, in which case it is determined that the car a is located in front of the car C, and no empty parking space is the parking space No. 1, and therefore, the parking space number of the car C is corrected to be the parking space No. 2.
6. As shown in (6) in fig. 5, the car a is parked in the parking space No. 2, and the car B is parked in the parking space No. 1, in which case it is determined that the car a is located in front of the car C, and no empty parking space is the parking space No. 2, and therefore, the parking space number of the car C is corrected to be the parking space No. 3.
After the parking space in which the vehicle is parked is corrected, the parking space in which the vehicle is located is obtained.
As an embodiment, S206-S207, S208-210 in FIG. 2 belong to optional parts.
Based on the same inventive concept, the present application provides a device for detecting a parking position of a vehicle, which is equivalent to the device for detecting a parking position 110 discussed above, with reference to fig. 6, and the device includes:
the detection module 610 is used for obtaining a vehicle detection frame of the vehicle to be detected in the image to be detected and obtaining tire information of the vehicle to be detected; the tire information comprises tire detection frames corresponding to all tires in the vehicle to be detected;
the determining module 620 is configured to determine a projection point of the vehicle to be detected on the ground according to the relative position information of the two tire detection frames and the relative position information between any one of the two tire detection frames and the vehicle detection frame if the number of the obtained tire detection frames is two; and determining the parking frame where the projection point is located as the parking frame where the vehicle to be detected is located.
In a possible embodiment, the determining module 620 is specifically configured to:
if the number of the obtained tire detection frames is two, determining a reference point coordinate on each tire detection frame in the two tire detection frames, and determining a central point coordinate between the two reference point coordinates;
and correcting the coordinates of the central points of the two reference points according to the offset of any one of the two tire detection frames relative to the vehicle detection frame to obtain the projection point of the vehicle to be detected on the ground.
In a possible embodiment, the determining module 620 is specifically configured to:
determining a distance between a reference point of the first tire detection frame and a first frame of the vehicle detection frame; the first tire detection frame and the second tire detection frame are different tire detection frames in the two tire detection frames, the first frame is a frame which is vertical to a reference point coordinate of the first tire detection frame in the vehicle detection frame, and is closer to one frame of the first tire detection frame than the second tire detection frame;
determining the product of the preset proportion and the distance to obtain the offset of the first tire detection frame relative to the vehicle detection frame;
and correcting the coordinates of the central points of the two reference points according to the offset to obtain the projection point of the vehicle to be detected on the ground.
In a possible embodiment, the determining module 620 is specifically configured to:
if the coordinate value of the reference point of the first tire detection frame in the first direction is smaller than the coordinate value of the reference point of the second tire detection frame in the first direction, reducing the coordinate value of the center point coordinates of the two reference points in the first direction by an offset, and obtaining a projection point of the vehicle to be detected on the ground; the first direction is a direction corresponding to a frame where a reference point of the first tire detection frame is located;
if the coordinate value of the reference point of the first tire detection frame in the first direction is larger than the coordinate value of the reference point of the second tire detection frame in the first direction, the coordinate value of the center point of the two reference points in the first direction is increased by the offset, and the projection point of the vehicle to be detected on the ground is obtained.
In a possible embodiment, the detecting module 610 is further configured to, after obtaining a vehicle detecting frame of the vehicle to be detected and obtaining tire information of the vehicle to be detected, determine whether the image to be detected includes a license plate of the vehicle to be detected if more or less than two tire detecting frames are obtained;
the determining module 620 is further configured to determine a license plate detection frame corresponding to the license plate if the image to be detected includes the license plate of the vehicle to be detected; and determining the central point of the license plate detection frame as a projection point of the vehicle to be detected on the ground.
In one possible embodiment, the determining module 620 is further configured to:
after determining whether the license plate of the vehicle to be detected is contained in the image to be detected, if the license plate of the vehicle to be detected is not contained in the image to be detected, determining the central point of the vehicle detection frame;
determining a reference parking frame where the central point of the vehicle detection frame is located;
obtaining vehicle parking information of each parking frame in the N parking frames adjacent to the reference parking frame, and determining at least one parking frame in the N parking frames adjacent to the reference parking frame and on which a vehicle is parked;
according to the shooting direction of detecting the parking position of the vehicle, determining a forward parking frame which is positioned in the front of the vehicle detection frame in the shooting direction in at least one parking frame, determining the determined forward parking frame to be the parking frame corresponding to the vehicle to be detected at the rear of the shooting direction and attached to the forward parking frame.
Based on the same inventive concept, the present embodiment provides a device for detecting a parking position of a vehicle, which is equivalent to the device 110 for detecting a parking position of a vehicle discussed above, with reference to fig. 7, and the device includes:
at least one processor 710, and
a memory 720 communicatively coupled to the at least one processor 710;
wherein the memory 720 stores instructions executable by the at least one processor 710, the at least one processor 710 implements the method of detecting a parking position of a vehicle as previously discussed by executing the instructions stored by the memory 720.
Based on the same inventive concept, embodiments of the present application provide a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the method of detecting a parking position of a vehicle as discussed above.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (9)

1. A method for detecting a parking position of a vehicle, which is applied to a device for detecting a parking position of a vehicle, the method comprises the following steps:
obtaining a vehicle detection frame of a vehicle to be detected in an image to be detected, and obtaining tire information of the vehicle to be detected; the tire information comprises tire detection frames corresponding to all tires in the vehicle to be detected;
if the number of the obtained tire detection frames is two, determining a projection point of the vehicle to be detected on the ground according to the relative position information of the two tire detection frames and the relative position information between any one of the two tire detection frames and the vehicle detection frame;
if the number of the obtained tire detection frames is more than or less than two, determining whether the to-be-detected image contains the license plate of the to-be-detected vehicle;
if the image to be detected contains the license plate of the vehicle to be detected, determining a license plate detection frame corresponding to the license plate; determining the central point of the license plate detection frame as a projection point of the vehicle to be detected on the ground;
and determining the parking frame where the projection point is located as the parking frame where the vehicle to be detected is located.
2. The method according to claim 1, wherein if two tire detection frames are obtained, determining a projection point of the vehicle to be detected on the ground according to the relative position information of the two tire detection frames and the relative position information between any one of the two tire detection frames and the vehicle detection frame comprises:
if the number of the obtained tire detection frames is two, determining a reference point coordinate on each tire detection frame in the two tire detection frames, and determining a central point coordinate between the two reference point coordinates;
and correcting the coordinates of the central points of the two reference points according to the offset of any one of the two tire detection frames relative to the vehicle detection frame to obtain the projection point of the vehicle to be detected on the ground.
3. The method according to claim 2, wherein the correcting the coordinates of the center points of the two reference points according to the offset of any one of the two tire detection frames relative to the vehicle detection frame to obtain the projected point of the vehicle to be detected on the ground comprises:
determining a distance between a reference point of a first tire detection frame and a first frame of the vehicle detection frame; the first tire detection frame and the second tire detection frame are different tire detection frames in the two tire detection frames, and the first frame is a frame which is perpendicular to a reference point coordinate of the first tire detection frame in the vehicle detection frame and is closer to one frame of the first tire detection frame than the second tire detection frame;
determining the product of a preset proportion and the distance to obtain the offset of the first tire detection frame relative to the vehicle detection frame;
and correcting the coordinates of the central points of the two reference points according to the offset to obtain the projection point of the vehicle to be detected on the ground.
4. The method according to claim 3, wherein the correcting coordinates of the center points of the two reference points according to the offset to obtain the projected point of the vehicle to be detected on the ground comprises:
if the coordinate value of the reference point of the first tire detection frame in the first direction is smaller than the coordinate value of the reference point of the second tire detection frame in the first direction, reducing the coordinate value of the center point coordinates of the two reference points in the first direction by the offset to obtain the projection point of the vehicle to be detected on the ground; the first direction is a direction corresponding to a frame where a reference point of the first tire detection frame is located;
if the coordinate value of the reference point of the first tire detection frame in the first direction is larger than the coordinate value of the reference point of the second tire detection frame in the first direction, the coordinate value of the center point coordinates of the two reference points in the first direction is increased by the offset, and the projection point of the vehicle to be detected on the ground is obtained.
5. The method according to claim 1, characterized in that, after determining whether the image to be detected contains the license plate of the vehicle to be detected, it comprises:
if the image to be detected does not contain the license plate of the vehicle to be detected, determining the central point of the vehicle detection frame;
determining a reference parking frame where the central point of the vehicle detection frame is located;
obtaining vehicle parking information of each parking frame in the N parking frames adjacent to the reference parking frame, and determining at least one parking frame with a vehicle parked in the N parking frames adjacent to the reference parking frame;
according to the shooting direction of the detected vehicle parking position, a forward parking frame, positioned in front of the vehicle detection frame in the shooting direction, of the at least one parking frame is determined, and the determined parking frame, positioned behind the shooting direction and attached to the forward parking frame, is determined to be the parking frame corresponding to the vehicle to be detected.
6. An apparatus for detecting a parking position of a vehicle, comprising:
the detection module is used for obtaining a vehicle detection frame of the vehicle to be detected in the image to be detected and obtaining tire information of the vehicle to be detected; the tire information comprises tire detection frames corresponding to all tires in the vehicle to be detected;
the determining module is used for determining a projection point of the vehicle to be detected on the ground according to the relative position information of the two tire detection frames and the relative position information between any one of the two tire detection frames and the vehicle detection frame if the number of the obtained tire detection frames is two; if the number of the obtained tire detection frames is more than or less than two, determining whether the to-be-detected image contains the license plate of the to-be-detected vehicle; if the image to be detected contains the license plate of the vehicle to be detected, determining a license plate detection frame corresponding to the license plate; determining the central point of the license plate detection frame as a projection point of the vehicle to be detected on the ground; and determining the parking frame where the projection point is located as the parking frame where the vehicle to be detected is located.
7. The apparatus of claim 6, wherein the determination module is specifically configured to:
if the number of the obtained tire detection frames is two, determining a reference point coordinate on each tire detection frame in the two tire detection frames, and determining a central point coordinate between the two reference point coordinates;
and correcting the coordinates of the central points of the two reference points according to the offset of any one of the two tire detection frames relative to the vehicle detection frame to obtain the projection point of the vehicle to be detected on the ground.
8. An apparatus for detecting a parking position of a vehicle, comprising:
at least one processor, and
a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the at least one processor implementing the method of any one of claims 1-5 by executing the instructions stored by the memory.
9. A computer-readable storage medium having stored thereon computer instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1-5.
CN201911143189.9A 2019-11-20 2019-11-20 Method and device for detecting parking position of vehicle Active CN110853366B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911143189.9A CN110853366B (en) 2019-11-20 2019-11-20 Method and device for detecting parking position of vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911143189.9A CN110853366B (en) 2019-11-20 2019-11-20 Method and device for detecting parking position of vehicle

Publications (2)

Publication Number Publication Date
CN110853366A CN110853366A (en) 2020-02-28
CN110853366B true CN110853366B (en) 2021-04-16

Family

ID=69602726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911143189.9A Active CN110853366B (en) 2019-11-20 2019-11-20 Method and device for detecting parking position of vehicle

Country Status (1)

Country Link
CN (1) CN110853366B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111402329A (en) * 2020-03-24 2020-07-10 上海眼控科技股份有限公司 Vehicle line pressing detection method and device, computer equipment and storage medium
CN113874927B (en) * 2020-04-30 2023-07-18 京东方科技集团股份有限公司 Parking detection method, system, processing device and storage medium
CN111753826B (en) * 2020-05-14 2024-02-20 北京迈格威科技有限公司 Vehicle and license plate association method, device and electronic system
CN112802360B (en) * 2020-12-31 2022-04-19 金茂智慧科技(广州)有限公司 Method and device for preventing vehicle from escaping
CN114255584B (en) * 2021-12-20 2023-04-07 济南博观智能科技有限公司 Positioning method and system for parking vehicle, storage medium and electronic equipment
CN114842465A (en) * 2022-06-06 2022-08-02 阿波罗智联(北京)科技有限公司 License plate detection method and device, electronic equipment, medium and intelligent transportation equipment

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103366595A (en) * 2013-06-21 2013-10-23 上海轩华智能科技有限公司 System and method for associating vehicle license plate and parking space position information
US10078892B1 (en) * 2017-03-16 2018-09-18 GM Global Technology Operations LLC Methods and systems for vehicle tire analysis using vehicle mounted cameras
CN107180537A (en) * 2017-06-23 2017-09-19 深圳市盛路物联通讯技术有限公司 A kind of vehicles management method detected based on wireless geomagnetism and system
CN107845099A (en) * 2017-10-18 2018-03-27 安徽佳通乘用子午线轮胎有限公司 A kind of data dividing method towards tire point cloud
CN110097776B (en) * 2018-01-30 2021-05-14 杭州海康威视数字技术股份有限公司 Parking space detection method, monitoring camera and monitoring terminal
KR102077573B1 (en) * 2018-01-31 2020-02-17 엘지전자 주식회사 Autonomous parking system and vehicle
CN108647638B (en) * 2018-05-09 2021-10-12 东软睿驰汽车技术(上海)有限公司 Vehicle position detection method and device
CN108805932A (en) * 2018-06-11 2018-11-13 合肥越明交通电子科技有限公司 A kind of method that high-precision intelligent judges vehicle characteristics point geographic location
CN110176151A (en) * 2019-06-17 2019-08-27 北京精英路通科技有限公司 A kind of method, apparatus, medium and the equipment of determining parking behavior
CN110246183B (en) * 2019-06-24 2022-07-15 百度在线网络技术(北京)有限公司 Wheel grounding point detection method, device and storage medium

Also Published As

Publication number Publication date
CN110853366A (en) 2020-02-28

Similar Documents

Publication Publication Date Title
CN110853366B (en) Method and device for detecting parking position of vehicle
CN110443225B (en) Virtual and real lane line identification method and device based on feature pixel statistics
CN110758477B (en) Train positioning method and system based on two-dimensional code recognition
CN109916488B (en) Dynamic vehicle weighing method and device
CN110341621B (en) Obstacle detection method and device
CN112052807B (en) Vehicle position detection method, device, electronic equipment and storage medium
CN111444810A (en) Traffic light information identification method, device, equipment and storage medium
CN114730472A (en) Calibration method for external parameters of vehicle-mounted camera and related device
CN111386530A (en) Vehicle detection method and apparatus
CN115620518A (en) Intersection traffic conflict discrimination method based on deep learning
CN115761668A (en) Camera stain recognition method and device, vehicle and storage medium
CN114120266A (en) Vehicle lane change detection method and device, electronic equipment and storage medium
CN116863124B (en) Vehicle attitude determination method, controller and storage medium
CN111881748B (en) Lane line visual identification method and system based on VBAI platform modeling
CN115452400A (en) Robot detection method and device and robot
CN106874837B (en) Vehicle detection method based on video image processing
CN116129378A (en) Lane line detection method, device, equipment, vehicle and medium
US20190354781A1 (en) Method and system for determining an object location by using map information
CN111462243A (en) Vehicle-mounted streaming media rearview mirror calibration method, system and device
CN113513984B (en) Parking space recognition precision detection method and device, electronic equipment and storage medium
CN115965636A (en) Vehicle side view generating method and device and terminal equipment
CN112990117B (en) Installation data processing method and device based on intelligent driving system
CN115235526A (en) Method and system for automatic calibration of sensors
CN115457138A (en) Position calibration method, system and storage medium based on radar and camera
CN112598314A (en) Method, device, equipment and medium for determining perception confidence of intelligent driving automobile

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant