CN117935568B - Parking lot vehicle identification method and device - Google Patents
Parking lot vehicle identification method and device Download PDFInfo
- Publication number
- CN117935568B CN117935568B CN202410315896.6A CN202410315896A CN117935568B CN 117935568 B CN117935568 B CN 117935568B CN 202410315896 A CN202410315896 A CN 202410315896A CN 117935568 B CN117935568 B CN 117935568B
- Authority
- CN
- China
- Prior art keywords
- icon
- corner
- parking lot
- icons
- distance
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 230000008859 change Effects 0.000 claims description 24
- 238000012545 processing Methods 0.000 claims description 20
- 238000001514 detection method Methods 0.000 claims description 17
- 238000009434 installation Methods 0.000 abstract description 11
- 238000010276 construction Methods 0.000 abstract description 9
- 230000006870 function Effects 0.000 description 25
- 238000010586 diagram Methods 0.000 description 19
- 230000004888 barrier function Effects 0.000 description 10
- 238000013461 design Methods 0.000 description 8
- 238000004590 computer program Methods 0.000 description 7
- 239000003550 marker Substances 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/017—Detecting movement of traffic to be counted or controlled identifying vehicles
- G08G1/0175—Detecting movement of traffic to be counted or controlled identifying vehicles by photographing vehicles, e.g. when violating traffic rules
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/52—Surveillance or monitoring of activities, e.g. for recognising suspicious objects
- G06V20/54—Surveillance or monitoring of activities, e.g. for recognising suspicious objects of traffic, e.g. cars on the road, trains or boats
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07B—TICKET-ISSUING APPARATUS; FARE-REGISTERING APPARATUS; FRANKING APPARATUS
- G07B15/00—Arrangements or apparatus for collecting fares, tolls or entrance fees at one or more control points
- G07B15/02—Arrangements or apparatus for collecting fares, tolls or entrance fees at one or more control points taking into account a variable factor such as distance or time, e.g. for passenger transport, parking systems or car rental systems
- G07B15/04—Arrangements or apparatus for collecting fares, tolls or entrance fees at one or more control points taking into account a variable factor such as distance or time, e.g. for passenger transport, parking systems or car rental systems comprising devices to free a barrier, turnstile, or the like
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/61—Control of cameras or camera modules based on recognised objects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/695—Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Finance (AREA)
- Traffic Control Systems (AREA)
Abstract
The embodiment of the invention discloses a method and a device for identifying vehicles in a parking lot, wherein the method comprises the following steps: the method comprises the steps of setting a plurality of icons on the ground of a parking lot entrance, marking the icon at the last row as a first icon, marking the icon at the forefront row as a second icon, detecting the icon at the parking lot entrance, starting a vehicle identification function when the first icon is not detected, and tracking the first current vehicle based on the first icon and the second icon if the first current vehicle is identified, so as to identify whether the first current vehicle enters the parking lot. According to the method, the condition of the vehicle entering is identified through the icons, ground construction is not needed in the arrangement of the icons, the installation is simple, the installation complexity is greatly simplified, the cost is reduced, and secondly, the vehicle identification function is started to identify the vehicle when the first icon is not detected, so that the starting of the long-time vehicle identification function can be avoided, and resources can be effectively saved.
Description
Technical Field
The invention relates to the technical field of vehicle identification, in particular to a method and a device for identifying vehicles in a parking lot.
Background
When a vehicle enters a toll parking area, the vehicle is identified to enter or exit through a license plate identification technology and a vehicle detection technology, the vehicle is recorded, and the common processing mode at present is as follows: and in the stopping position of the vehicle, the construction and installation sense is matched with license plate recognition and vehicle detection technology to accurately judge the state of the vehicle. Although the ground feel can accurately judge the driving-in and driving-out of the vehicle, the construction difficulty is high, the ground construction needs to be excavated, and meanwhile, the construction and ground feel cost is high and the construction period is long.
Therefore, a new method is needed to solve the problems, so as to achieve the purposes of no need of ground construction, simple installation and cost reduction.
Disclosure of Invention
The invention mainly aims to provide a vehicle identification method, device, computer equipment and storage medium for a parking lot, which can solve the problems of high vehicle identification cost and large engineering in the prior art.
In order to achieve the above object, a first aspect of the present invention provides a method for identifying a vehicle in a parking lot, wherein a plurality of icons are provided on a parking lot entrance ground, a camera is provided right above the icons, a rear-most row of icons among the plurality of icons on the parking lot entrance ground is marked as a first icon, and a front-most row of icons among the plurality of icons on the parking lot entrance ground is marked as a second icon, the method comprising:
Detecting an icon of the parking lot entrance, and when the first icon is not detected, starting a vehicle identification function to identify whether a first current vehicle shielding the first icon exists or not;
And if the first current vehicle is identified, tracking the first current vehicle based on the first icon and the second icon to identify whether the first current vehicle enters a parking lot.
With reference to the first aspect, in one possible implementation manner, the tracking the first current vehicle based on the first icon and the second icon to identify whether the first current vehicle enters a parking lot includes: when the second icon is not recognized, calculating the distance between the head of the first current vehicle and a first mark line to obtain a first distance; wherein the first marking line is positioned behind the first icon and is parallel to the first icon; when the second icon is not recognized, calculating the distance between the tail of the first current vehicle and the first mark line to obtain a second distance;
If the first distance is greater than a first preset distance and the second distance is greater than the first preset distance, determining that the first current vehicle is driven into the parking lot; the first preset distance is a distance between the second icon and the first mark line.
With reference to the first aspect, in one possible implementation manner, the detecting the icon of the parking lot entrance includes: acquiring a first RGB color image of a first processing area, identifying icons contained in the first RGB color image according to the first RGB color image, and respectively acquiring first midpoint coordinates of the identified icons to obtain a first coordinate set; the first processing area is an area containing all icons on the ground of the entrance of the parking lot; judging whether a first target coordinate which cannot be matched with a first midpoint coordinate in a first preset target coordinate set exists or not, wherein the first target coordinate set comprises first target coordinates of all icons at a preset parking lot entrance, and the first target coordinates are midpoint coordinates of the icons at the parking lot entrance; if a first target coordinate which cannot be matched with a first midpoint coordinate in the first coordinate set exists in a preset first target coordinate set, determining that an icon corresponding to the first target coordinate is not recognized.
With reference to the first aspect, in one possible implementation manner, the identifying, according to the first RGB color image, the icon included in the first RGB color image, and obtaining first midpoint coordinates of the identified icon, to obtain a first coordinate set, includes: identifying the corner points of the icons according to the first RGB color image, and determining the corner points of the same icon according to the azimuth relation of each corner point; and respectively acquiring first midpoint coordinates of the closed loop areas connected by the corner points of the same icon to obtain a first coordinate set.
With reference to the first aspect, in one possible implementation manner, the icon includes a first color and a second color, where a pixel value of the first color is greater than a pixel value of the second color, a first color area frames a second color area, and identifying a corner point of the icon according to the first RGB color image includes: extracting a first color component gray scale image from the first RGB color image to obtain a target image containing the first color component gray scale image; acquiring a gradient image of the first color component gray level image in the target image; the gradient image is used for identifying the intersection edge of the first color region and the second color region; and identifying the gradient image by adopting an angular point detection algorithm to obtain the angular point of the icon.
With reference to the first aspect, in one possible implementation manner, the icon is square, and the determining the corner point of the same icon according to the azimuth relation of each corner point includes: determining the attribute of each corner according to the pixel value change degree around the corner, wherein the attribute comprises a first corner, a second corner, a third corner and a fourth corner, the parking lot entrance is taken as the right upper side, the first corner is the corner of the lower right corner of the corner in the area with the surrounding pixel value change degree reaching the preset degree, the second corner is the corner of the lower left corner of the corner in the area with the surrounding pixel value change degree reaching the preset degree, the third corner is the corner of the upper left corner of the corner in the area with the surrounding pixel value change degree reaching the preset degree, and the fourth corner is the corner of the upper right corner of the corner in the area with the surrounding pixel value change degree reaching the preset degree; traversing the first corner, and for the traversed target corner, acquiring second corner points closest to the target corner and positioned on the right side of the first corner from all second corner points, acquiring third corner points closest to the target corner and positioned below the first corner from all third corner points, and acquiring fourth corner points closest to the target corner and positioned on the right side of the first corner and positioned below the first corner from all fourth corner points; and determining the target corner point and the second corner point, the third focus point and the fourth corner point corresponding to the target corner point as corner points of the same icon.
With reference to the first aspect, in one possible implementation manner, a plurality of icons are disposed on a parking lot exit ground, a rearmost row of icons in the plurality of icons on the parking lot exit ground is marked as a third icon, and a frontmost row of icons in the plurality of icons on the parking lot exit ground is marked as a fourth icon, with a direction of exiting the parking lot as a forward direction, and the method further includes: detecting an icon at the exit of the parking lot, and when the third icon is not detected, starting a vehicle identification function to identify whether a second current vehicle shielding the third icon exists or not; and if the second current vehicle is identified, tracking the second current vehicle based on the third icon and the fourth icon to identify whether the second current vehicle exits the parking lot.
With reference to the first aspect, in one possible implementation manner, the tracking the second current vehicle based on the third icon and the fourth icon to identify whether the second current vehicle exits the parking lot includes: when the fourth icon is not recognized, calculating the distance between the head of the second current vehicle and the second mark line to obtain a third distance; wherein the second marking line is positioned behind the third icon and is parallel to the third icon; when the fourth icon is not recognized, calculating the distance between the tail of the second current vehicle and the second mark line to obtain a fourth distance;
If the third distance is greater than a second preset distance and the fourth distance is greater than the second preset distance, determining that the second current vehicle exits the parking lot; the second preset distance is a distance between the fourth icon and the second mark line.
With reference to the first aspect, in one possible implementation manner, the detecting the icon of the parking lot exit includes: acquiring a second RGB color image of a second processing area, identifying icons contained in the second RGB color image according to the second RGB color image, and respectively acquiring second midpoint coordinates of the identified icons to obtain a second coordinate set, wherein the second processing area is an area containing all icons on the ground of a parking lot exit; judging whether a second target coordinate which cannot be matched with a second midpoint coordinate in a second coordinate set exists in the preset second target coordinate set or not, wherein the second target coordinate set comprises second target coordinates of all icons at a preset parking lot exit, and the second target coordinates are midpoint coordinates of the icons at the parking lot exit; if a second target coordinate which cannot be matched with a second midpoint coordinate in the second coordinate set exists in the preset second target coordinate set, determining that an icon corresponding to the second target coordinate which cannot be matched with the first midpoint coordinate in the second coordinate set is not recognized.
In order to achieve the above object, a second aspect of the present invention provides a vehicle recognition device for a parking lot, in which a plurality of icons are provided on a parking lot entrance ground, a camera is provided right above the icons, a rearmost row of icons among the plurality of icons on the parking lot entrance ground is marked as a first icon, and a foremost row of icons among the plurality of icons on the parking lot entrance ground is marked as a second icon, the device comprising:
Icon detection module: the icon is used for detecting the parking lot entrance, and when the first icon is not detected, a vehicle identification function is started to identify whether a first current vehicle shielding the first icon exists or not;
Vehicle identification module: and if the first current vehicle is identified, tracking the first current vehicle based on the first icon and the second icon to identify whether the first current vehicle enters a parking lot.
To achieve the above object, a third aspect of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
Detecting an icon of the parking lot entrance, and when the first icon is not detected, starting a vehicle identification function to identify whether a first current vehicle shielding the first icon exists or not;
And if the first current vehicle is identified, tracking the first current vehicle based on the first icon and the second icon to identify whether the first current vehicle enters a parking lot.
To achieve the above object, a fourth aspect of the present invention provides a computer device including a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
Detecting an icon of the parking lot entrance, and when the first icon is not detected, starting a vehicle identification function to identify whether a first current vehicle shielding the first icon exists or not;
And if the first current vehicle is identified, tracking the first current vehicle based on the first icon and the second icon to identify whether the first current vehicle enters a parking lot.
The embodiment of the invention has the following beneficial effects:
the invention provides a vehicle identification method for a parking lot, which is characterized in that a plurality of icons are arranged on the ground of a parking lot entrance, the direction of entering the parking lot is taken as the forward direction, the rearmost row of icons in the plurality of icons on the ground of the parking lot entrance is marked as a first icon, the foremost row of icons in the plurality of icons on the ground of the parking lot entrance is marked as a second icon, the icons of the parking lot entrance are detected, when the first icon is not detected, a vehicle identification function is started, and after the vehicle identification function is started, if a first current vehicle is identified, the first current vehicle is tracked based on the first icon and the second icon, so that whether the first current vehicle enters the parking lot is identified. According to the invention, the state of the vehicle is identified by adopting the icon, the installation sense is not needed, the icon and the vehicle are identified by only shooting by the camera, the ground construction is not needed, the installation is simple, the installation complexity is greatly simplified, and the cost is reduced. And secondly, when the first icon is not detected, the vehicle identification function is started to identify the vehicle, so that the starting of the long-time vehicle identification function can be avoided, resources can be effectively saved, and the effective utilization rate of the vehicle identification function is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Wherein:
Fig. 1 is a schematic flow chart of a first embodiment of a method for identifying vehicles in a parking lot according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a parking lot entry icon arrangement according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating the placement of icons when a parking lot entrance includes a barrier according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an icon in an embodiment of the invention;
FIG. 5 is a schematic diagram of a target image according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a gradient image according to an embodiment of the present invention;
FIG. 7 is a flowchart of a second embodiment of a method for identifying vehicles in a parking lot according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of an icon at an exit of a parking lot according to an embodiment of the present invention;
FIG. 9 is a schematic diagram illustrating the placement of icons when the parking lot exit includes a barrier according to an embodiment of the present invention;
FIG. 10 is a block diagram of a vehicle identification device for a parking lot according to an embodiment of the present invention;
Fig. 11 is a block diagram showing the structure of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The embodiment of the invention provides a vehicle identification method for a parking lot, referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of the vehicle identification method for the parking lot, as shown in fig. 1, and the method specifically includes steps S101 to S102 as follows:
And step S101, detecting an icon at the entrance of the parking lot, and when the first icon is not detected, starting a vehicle identification function to identify whether a first current vehicle shielding the first icon exists or not.
Step S102, if the first current vehicle is identified, tracking the first current vehicle based on the first icon and the second icon to identify whether the first current vehicle enters a parking lot.
In one possible implementation manner, a plurality of icons with preset sizes are arranged on the ground of a preset range of the parking lot entrance, the direction perpendicular to the entering direction of the parking lot entrance is taken as a horizontal direction, at least two icons can be arranged in a row in a parallel mode, each row of adjacent icons can be set at a first preset value interval, and each adjacent row of icons can be set at a second preset value interval. In order to reduce the cost and the installation time, 4 icons can be arranged, and each row of 2 icons. In order to improve the icon recognition efficiency, the set icon may have a light-reflecting function.
The parking lot is mainly used for identifying the automobile, in order to ensure that the automobile can cover a row of icons completely and simultaneously, the distance between the outermost periphery of the leftmost icon and the outermost periphery of the rightmost icon in the row of icons is not more than the distance between the leftmost periphery and the rightmost periphery of the automobile, the minimum width of the icons in the parallel direction with the entrance of the parking lot is preferably larger than the width of the automobile tire, and the maximum width of the icons in the perpendicular direction with the entrance of the parking lot is preferably smaller than the diameter of the automobile tire, but because the object is to identify the automobile, the size of the icons cannot be too small, and the specific size can be set according to requirements. Since the vehicle is assumed to be driven into the parking lot when the vehicle completely enters from the entrance, in this embodiment, in order to improve the effectiveness of vehicle tracking, a plurality of icons are set on the ground within a preset range of the entrance of the parking lot, and referring to fig. 2, fig. 2 is a schematic diagram of setting icons for the entrance of the parking lot according to this embodiment.
The icons used for shooting the ground and the cameras of the vehicles are arranged at the entrance of the parking lot, and in order to more comprehensively shoot the icons and the vehicles, the cameras are arranged right above the icons, so that all the icons can be shot. In this embodiment, with the direction of entering the parking lot as the forward direction, a row of icons located at the rearmost position among the plurality of icons on the entrance ground of the parking lot is marked as a first icon, and a row of icons located at the foremost position among the plurality of icons on the entrance ground of the parking lot is marked as a second icon, and fig. 2 may refer to fig. 2, in which the positional relationship of the icons is shown. When the automobile enters the parking lot, the first icon is firstly shielded, the second icon is shielded after the automobile slowly enters, and finally the second icon is not shielded after the automobile continues to enter, so that the automobile can be judged to completely enter the parking lot.
The method can be used for a terminal device or a server, wherein the terminal device can be an electronic device such as a computer with a communication function, in one possible implementation manner, the terminal device or the server can be in communication connection with a camera to receive image data from the camera, the terminal device or the server can identify an icon and a vehicle based on the image data, and the terminal device or the server has a vehicle identification function, and the vehicle identification function can be used for positioning the vehicle.
Firstly, a video camera shoots video frames of a first processing area in real time to obtain a video stream of the first processing area, wherein the first processing area is an area containing all icons on the ground of a parking lot entrance, the shot video stream is transmitted to a terminal device or a server, the terminal device or the server processes the video frames in the video stream, the icons of the parking lot entrance are detected, and when the first icons are not detected, the terminal device or the server starts a vehicle recognition function to recognize whether a first current vehicle shielding the first icons exists or not according to the received video stream, wherein the first current vehicle is a vehicle shielding all the first icons. In order to save resources, the initial state of the vehicle identification function is the off state.
If the first current vehicle is identified, tracking the first current vehicle based on the first icon and the second icon to identify whether the first current vehicle is driving into the parking lot, specifically as described in step S201-step S202:
Step S201, when the second icon is not identified, calculating the distance between the head of the first current vehicle and a first mark line to obtain a first distance; and when the second icon is not recognized, calculating the distance between the tail of the first current vehicle and the first mark line to obtain a second distance.
The first mark line is positioned behind the first icon and parallel to the first icon.
Step S202, if the first distance is greater than a first preset distance and the second distance is greater than the first preset distance, determining that the first current vehicle is driven into the parking lot.
The first preset distance is the distance between the second icon and the first mark line.
In this embodiment, a first mark line with a preset length is disposed, where the first mark line is parallel to the horizontal direction, that is, parallel to the first icon and is located behind the first icon, and referring to fig. 2, the first mark line may also be made of a reflective material, so as to improve recognition effectiveness. When the automobile continues to drive into the parking lot, the second icon is hidden, and if the automobile hides the second icon, the automobile head is farther from the first mark line than the icon, so that the distance between the automobile head and the first mark line is larger than the distance between the icon and the first mark line. If the car is driven into the parking lot after the second icon is covered, the second icon is recognized again, and the tail of the car is farther from the first mark line than the icon, so that the distance between the tail of the car and the first mark line is larger than the distance between the icon and the entrance of the parking lot.
In order to improve the tracking effectiveness of the vehicle, the distance between the head of the first current vehicle and the first mark line is calculated to obtain the first distance when the second icon is not recognized, and the reverse interference phenomenon of the vehicle is also possible when the second icon is recognized again after the second icon is not recognized, so that the misleading of the interference phenomenon is avoided, and the distance between the tail of the first current vehicle and the first mark line is calculated to obtain the second distance when the second icon is recognized again after the second icon is not recognized. In one possible implementation manner, the first distance may be a linear distance between a midpoint coordinate of a head of the first current vehicle and the first marking line, and the second distance may be a linear distance between a midpoint coordinate of a tail of the first current vehicle and the first marking line. And if the first distance is greater than the first preset distance and the second distance is greater than the first preset distance, determining that the first current vehicle is driven into the parking lot. The first preset distance is a distance between the second icon and the first mark line, which can be understood as a linear distance between the second icon and the first mark line, and the first preset distance can be preset because the second icon and the first mark line are both fixed.
When the first current vehicle is identified as driving into the parking lot, the license plate number of the first current vehicle may be recorded.
In a possible implementation manner, the parking lot entrance may include a gate (including a gate of a landing rod), and the parking lot entrance may include the gate in a preset range, and the parking lot entrance may include a first icon disposed behind the gate and a second icon disposed in front of the gate, where the parking lot entrance includes the gate according to the embodiment of the present invention, and fig. 3 is a schematic diagram of placement of the icons. In one possible implementation manner, when the first current vehicle is identified, the lifting rod of the barrier gate can be controlled to lift so that the first current vehicle smoothly enters the parking lot, and when the first distance is identified to be greater than the first preset distance and the second distance is identified to be greater than the first preset distance, the first current vehicle enters the parking lot at the moment, and then the lifting rod of the barrier gate is controlled to fall.
The above description describes how to identify the vehicle completely entering the parking lot, and how to detect whether the parking lot entrance icon is covered, specifically as described in step S301-step S303:
Step 301, a first RGB color image of a first processing area is acquired, icons included in the first RGB color image are identified according to the first RGB color image, and first midpoint coordinates of the identified icons are respectively acquired to obtain a first coordinate set.
Step S302, judging whether a first target coordinate which cannot be matched with a first midpoint coordinate in a first coordinate set exists in a preset first target coordinate set.
The first target coordinate set comprises first target coordinates of each icon at the entrance of the preset parking lot, and the first target coordinates are midpoint coordinates of the icons at the entrance of the parking lot.
Step 303, if there is a first target coordinate in the preset first target coordinate set, which cannot be matched with the first midpoint coordinate in the first coordinate set, determining that the icon corresponding to the first target coordinate is not recognized.
The first RGB color image of the first processing area is acquired, the icons contained in the first RGB color image are identified according to the first RGB color image, and when the icons are covered, the icons are not displayed in the first RGB color image, so that the icons which are not identified, and further confirmation is needed.
In this embodiment, the unrecognized icon is determined by comparing the midpoint coordinates of each icon, which are preset, with the midpoint coordinates of the recognized icon. If the preset midpoint coordinates are not matched with the midpoint coordinates of the identified icons, the fact that the preset midpoint coordinates do not exist in the midpoint coordinates of the identified icons is indicated, and the fact that the icons corresponding to the preset midpoint coordinates are not identified is indicated.
Specifically, first midpoint coordinates of the identified icons are respectively obtained to obtain a first coordinate set, whether a first target coordinate which cannot be matched with the first midpoint coordinates in the first coordinate set exists in a preset first target coordinate set is judged, and if the first target coordinate which cannot be matched with the first midpoint coordinates in the first coordinate set exists in the preset first target coordinate set, the icons corresponding to the first target coordinate are determined to be unrecognized. The first target coordinate set comprises first target coordinates of each icon at the entrance of the preset parking lot, and the first target coordinates are midpoint coordinates of the icons at the entrance of the parking lot. Since the icon on the ground is fixed after being installed, the first target coordinates of the icon may be set in advance.
For example, the icons on the entrance ground of the parking lot comprise two first icons and two second icons, and the first target coordinates of the two first icons and the two second icons are respectively、/>、/>、/>Then the first set of target coordinates includes/>、/>、/>、/>The obtained first coordinate set comprises、/>If/>And/>Matching,/>And/>Matching, namely the first target coordinate matching to the first midpoint coordinate is/>、/>Then/>、/>The icon for which is not recognized, i.e. the two second icons are not recognized.
In one possible implementation manner, due to the influence of the camera and other interference factors, the first midpoint coordinate is not necessarily completely consistent with the preset first target coordinate to a certain extent, and there may be a certain deviation in numerical value, so, in order to ensure the validity of icon identification, the matching of the first midpoint coordinate and the first target coordinate may be defined as that the difference between the x-axis coordinate value of the first midpoint coordinate and the x-axis coordinate value of the first target coordinate is not greater than the coordinate difference threshold, and the difference between the y-axis coordinate value of the first midpoint coordinate and the y-axis coordinate value of the first target coordinate is not greater than the coordinate difference threshold, that is, when the difference between the x-axis coordinate value of the first midpoint coordinate and the x-axis coordinate value of the first target coordinate is not greater than the coordinate difference threshold, the matching of the first midpoint coordinate and the first target coordinate is determined. For example, the coordinate difference threshold is set to 3, the first midpoint coordinate is (1, 2), the first target coordinate is (2, 1), the x difference between the first midpoint coordinate and the first target coordinate is 1, and the y difference between the first midpoint coordinate and the first target coordinate is 1,1 is less than 3, so that the first midpoint coordinate (1, 2) matches the first target coordinate (2, 1).
In one possible implementation manner, the shape of the icon is an angular regular shape, and the embodiment of the invention provides a method for identifying the angular regular shape icon, such as square (square, rectangle, etc.), parallelogram, etc. The method for obtaining the first coordinate set may be as described in step S401 to step S402:
step S401, identifying the corner points of the icon according to the first RGB color image, and determining the corner point of the same icon according to the azimuth relation of each corner point.
Step S402, respectively obtaining first midpoint coordinates of closed loop areas connected by corner points of the same icon, to obtain a first coordinate set.
In this embodiment, in order to better extract the corner points, the icon includes a first color and a second color, where the pixel value of the first color is greater than that of the second color, and the first color region frames the second color region, and this embodiment proposes a corner point identification method, which may be as described in step S501-step S503:
step S501, extracting a first color component gray scale image from a first RGB color image, to obtain a target image containing the first color component gray scale image.
Step S502, acquiring a gradient image of the first color component gray scale image in the target image.
The gradient image is used to identify the intersection edge of the first color region and the second color region.
And step S503, identifying the gradient image by adopting an angular point detection algorithm to obtain the angular point of the icon.
In order to better identify the icon, the pixel value of the first color may be different from the pixel value of the second color by a larger amount, in a possible implementation manner, the first color may be green, the second color may be red, referring to fig. 4, fig. 4 is a schematic diagram of an icon provided in an embodiment of the present invention, where a gray area in fig. 4 represents a first color area, a black area represents a second color area, the first color component gray image is extracted from the first RGB color image, and a target image including the first color component gray image is obtained, for example, if the first color may be green, the first color component gray image may be a G component (green component) gray image, referring to fig. 5, fig. 5 is a schematic diagram of a target image provided in an embodiment of the present invention, a gradient image of the first color component gray image is obtained, and the gradient image is used to identify a junction edge between the first color area and the second color area, specifically, the gradient is calculated, and after calculating the gradient is calculated, the outer edge disappears, and the junction edge of the first color component gray image is left behind the junction edge. Referring to fig. 6, fig. 6 is a schematic diagram of a gradient image according to an embodiment of the present invention, so that an angular point detection algorithm is used to identify a gradient image, and an angular point of an icon can be obtained.
If the icons are square, the specific method for determining the corner points of the same icon according to the azimuth relation of each corner point is as follows in step S601-step S602:
and step S601, determining the attribute of each corner according to the pixel value variation degree around the corner, wherein the attribute comprises a first corner, a second corner, a third corner and a fourth corner.
Step S602, traversing the first corner, and for the traversed target corner, acquiring second corner points closest to the target corner and positioned on the right side of the first corner from all second corner points, acquiring third corner points closest to the target corner and positioned below the first corner from all third corner points, and acquiring fourth corner points closest to the target corner and positioned on the right side of the first corner and positioned below the first corner from all fourth corner points; and determining the target corner point and the second corner point, the third focus point and the fourth corner point corresponding to the target corner point as corner points of the same icon.
Determining the attribute of each corner according to the pixel value change degree around the corner, wherein the attribute comprises a first corner, a second corner, a third corner and a fourth corner, the parking lot entrance is taken as the right upper side, the first corner is the corner of the lower right corner of the corner in the region with the surrounding pixel value change degree reaching the preset degree, the second corner is the corner of the lower left corner of the corner in the region with the surrounding pixel value change degree reaching the preset degree, the third corner is the corner of the upper left corner of the corner in the region with the surrounding pixel value change degree reaching the preset degree, and the fourth corner is the corner of the upper right corner of the corner in the region with the surrounding pixel value change degree reaching the preset degree.
With the parking lot entrance directly above, for the first corner, the second corner of the same icon is located to its right, the third corner of the same icon is located to its lower side, and the fourth corner of the same icon is located to its lower right (i.e., to its right and below). Traversing the first corner, for the traversed target corner, acquiring the second corner closest to the target corner and positioned on the right side of the first corner from all the second corners, acquiring the third corner closest to the target corner and positioned below the first corner from all the third corners, and acquiring the fourth corner closest to the target corner and positioned on the right side of the first corner and positioned below the first corner from all the fourth corners, and determining the target corner and the second corner, the third focus and the fourth corner corresponding to the target corner as the corner of the same icon, wherein one icon can be determined by the four corners. The azimuth relation between the angular points can be determined according to the angular point coordinates, which is a common technical means in the field, and the invention is not further limited and described.
In one possible case, when two corners are exposed by the icon, all the corners cannot be identified for one icon, and then it is possible that the nearest second corner, third focal point and fourth corner are possibly corner points of other icons for the target corner, in order to prevent the error icon from being identified according to the angular orientation relationship, in this embodiment, the first corner is traversed, for the traversed target corner, the second corner closest to the target corner and located on the right side of the first corner is acquired from all the second corners within the preset range, the third corner closest to the target corner and located below the first corner is acquired from all the third corners within the preset range, and the fourth corner closest to the target corner and located on the right side of the first corner and located below the first corner is acquired from all the fourth corners within the preset range, and the second corner, the third focal point and the fourth corner corresponding to the target corner are determined as one corner of the same icon.
After the corner points of the same icon are determined, first midpoint coordinates of closed loop areas connected by the corner points of the same icon are respectively obtained, and a first coordinate set is obtained.
The above description describes a vehicle entrance recognition method for a parking lot entrance, similar to the above-mentioned vehicle entrance recognition principle, and the following description describes a vehicle exit recognition method for a parking lot exit, referring to fig. 7, fig. 7 is a schematic flow chart of a second embodiment of the vehicle entrance recognition method for a parking lot according to the embodiment of the present invention, as shown in fig. 7, the vehicle exit recognition method for a parking lot exit specifically includes steps S701 to S702:
and step 701, detecting an icon at the exit of the parking lot, and when the third icon is not detected, starting a vehicle identification function to identify whether a second current vehicle shielding the third icon exists.
Step S702, if the second current vehicle is identified, tracking the second current vehicle based on the third icon and the fourth icon to identify whether the second current vehicle exits the parking lot.
In this embodiment, a vertical direction of the parking lot exit is used as a horizontal direction, and a method for setting the parking lot exit icon is similar to a method for setting the parking lot entrance icon, which is not repeated here. Referring to fig. 8, fig. 8 is a schematic diagram illustrating an icon arrangement at an exit of a parking lot according to an embodiment of the present invention. And the direction of exiting the parking lot is taken as the forward direction, the rearmost row of icons in the plurality of icons on the exit floor of the parking lot is marked as a third icon, and the foremost row of icons in the plurality of icons on the exit floor of the parking lot is marked as a fourth icon.
And detecting icons at the exit of the parking lot, and when the third icon is not detected, starting a vehicle identification function to identify whether a second current vehicle which shields the third icon exists or not, wherein the second current vehicle is a vehicle which shields all the third icons. If the second current vehicle is identified, tracking the second current vehicle based on the third icon and the fourth icon to identify whether the second current vehicle exits the parking lot, which may be specifically shown in step S801 to step S802:
Step S801, when the fourth icon is not recognized, calculating the distance between the head of the second current vehicle and the second mark line to obtain a third distance; and when the fourth icon is not recognized, calculating the distance between the tail of the second current vehicle and the second mark line to obtain a fourth distance.
The second mark line is positioned behind the third icon and parallel to the third icon.
Step S802, if the third distance is greater than a second preset distance and the fourth distance is greater than the second preset distance, determining that the second current vehicle exits the parking lot.
The second preset distance is the distance between the fourth icon and the second mark line.
In this embodiment, a second mark line with a preset length is disposed behind the third icon and parallel to the horizontal direction, i.e. parallel to the third icon, and the second mark line may also be made of a reflective material, so as to improve recognition effectiveness. When the fourth icon is not recognized, if the fourth icon is blocked for the second current vehicle at the moment, the head of the second current vehicle is farther from the second mark line than the fourth icon, and when the fourth icon is recognized after the fourth icon is not recognized, if the second current vehicle is further driven out, the tail of the second current vehicle is farther from the second mark line than the fourth icon. In this embodiment, when the fourth icon is not recognized, a distance between the head of the second current vehicle and the second marker line is calculated to obtain a third distance, and when the fourth icon is not recognized, a distance between the tail of the second current vehicle and the second marker line is calculated to obtain a fourth distance. If the third distance is greater than the second preset distance and the fourth distance is greater than the second preset distance, determining that the second current vehicle exits the parking lot, wherein the second preset distance is the distance between the fourth icon and the second mark line. In one possible implementation, the third distance may be a linear distance between a midpoint coordinate of a tail of the second current vehicle and the second marker line, and the fourth distance may be a linear distance between a midpoint coordinate of a tail of the second current vehicle and the second marker line.
In a possible implementation manner, the preset range of the parking lot exit may include a barrier, the direction of exiting the parking lot is taken as the forward direction, the third icon may be disposed at the rear of the barrier, the fourth icon may be disposed at the front of the barrier, and referring to fig. 9, fig. 9 is a schematic diagram of the placement of the icons when the parking lot exit includes the barrier according to the embodiment of the present invention. In one possible implementation manner, when the second current vehicle is identified, the lifting rod of the barrier gate can be controlled to lift so that the second current vehicle smoothly exits the parking lot, and when the third distance is greater than the second preset distance and the fourth distance is greater than the second preset distance, the second current vehicle completely exits the parking lot at this time, and then the lifting rod of the barrier gate is controlled to fall.
According to the embodiment, the in-out situation of the vehicle can be effectively identified through the icon, and the situation of smashing the vehicle can be effectively avoided.
In this embodiment, the method for detecting the icon at the exit of the parking lot is specifically shown in step S901 to step S903:
step S901, acquiring a second RGB color image of a second processing area, identifying icons included in the second RGB color image according to the second RGB color image, and respectively acquiring second midpoint coordinates of the identified icons to obtain a second coordinate set.
The second processing area is an area containing all icons on the ground of the exit of the parking lot.
Step S902, determining whether a second target coordinate that fails to match with a second midpoint coordinate in a second set of coordinates exists in a preset second set of target coordinates.
The second target coordinate set comprises second target coordinates of each icon at the preset parking lot exit, and the second target coordinates are midpoint coordinates of the icons at the parking lot exit.
Step 903, if there is a second target coordinate in the preset second target coordinate set, which cannot be matched with the second midpoint coordinate in the second coordinate set, determining that the icon corresponding to the second target coordinate, which cannot be matched with the first midpoint coordinate in the second coordinate set, is not recognized.
The second midpoint coordinate is matched with the second target coordinate, and the difference value between the x-axis coordinate value of the second midpoint coordinate and the x-axis coordinate value of the second target coordinate is defined as not more than a coordinate difference threshold value, and the difference value between the y-axis coordinate value of the second midpoint coordinate and the y-axis coordinate value of the second target coordinate is not more than a coordinate difference threshold value.
The second coordinate set obtaining method is similar to the first coordinate set obtaining method, specifically, as described in step S110-step S120:
and step S110, identifying the corner points of the icons according to the second RGB color image, and determining the corner points of the same icon according to the azimuth relation of each corner point.
And step 120, respectively obtaining second midpoint coordinates of the closed loop areas connected by the corner points of the same icon to obtain a second coordinate set.
The icon comprises a first color and a second color, wherein the pixel value of the first color is larger than the pixel value of the second color, the first color area frames the second color area, and the method for identifying the corner point of the icon according to the second RGB color image is similar to the method for identifying the corner point of the icon according to the first RGB color image, as described in step S1101-step S1103:
Step S1101, extracting a first color component gray scale image from the second RGB color image, to obtain a target image containing the first color component gray scale image.
Step S1102, acquiring a gradient image of the first color component gray scale image in the target image.
The gradient image is used to identify an intersection edge of the first color region and the second color region.
And step S1103, identifying the gradient image by adopting an angular point detection algorithm to obtain the angular point of the icon.
If the icons are square, the specific method for determining the corner points of the same icon according to the azimuth relation of each corner point is as follows in step S210-step S220:
And S210, determining the attribute of each corner according to the pixel value variation degree around the corner, wherein the attribute comprises a first corner, a second corner, a third corner and a fourth corner.
The parking lot exit is taken as the right upper corner, a first corner is the corner point of the lower right corner of the corner point in the area with the surrounding pixel value change degree reaching the preset degree, a second corner is the corner point of the lower left corner of the corner point in the area with the surrounding pixel value change degree reaching the preset degree, a third corner is the corner point of the upper left corner of the corner point in the area with the surrounding pixel value change degree reaching the preset degree, and a fourth corner is the corner point of the upper right corner of the corner point in the area with the surrounding pixel value change degree reaching the preset degree.
Step S220, traversing the first corner points, and for the traversed target corner points, acquiring second corner points closest to the target corner points and positioned on the right side of the first corner points from all second corner points, acquiring third corner points closest to the target corner points and positioned below the first corner points from all third corner points, and acquiring fourth corner points closest to the target corner points and positioned on the right side of the first corner points and positioned below the first corner points from all fourth corner points; and determining the target corner point and the second corner point, the third focus point and the fourth corner point corresponding to the target corner point as corner points of the same icon.
In another possible implementation manner, traversing the first corner, for the traversed target corner, acquiring the second corner closest to the target corner and located on the right side of the first corner from all the second corners within a preset range, acquiring the third corner closest to the target corner and located below the first corner from all the third corners within the preset range, and acquiring the fourth corner closest to the target corner and located on the right side of the first corner and located below the first corner from all the fourth corners within the preset range, and determining the target corner and the second corner, the third focus and the fourth corner corresponding to the target corner as the corner of the same icon, so that one icon can be determined by the four corners.
The method is based on the method, the situation of false recognition caused by interference factors can be effectively avoided through icon and vehicle positioning, the situation of vehicle entering and exiting is recognized through icon and vehicle positioning, and the effectiveness of vehicle recognition can be improved. In addition, the state of the vehicle is identified by adopting the icon, the installation sense is not needed, the icon and the vehicle identification only need to be shot by the camera for image identification, the ground construction is not needed, the installation is simple, the installation complexity is greatly simplified, and the cost is reduced. And secondly, when the first icon is not detected, the vehicle identification function is started to identify the vehicle, so that the starting of the long-time vehicle identification function can be avoided, resources can be effectively saved, and the effective utilization rate of the vehicle identification function is improved.
In order to better implement the method, the embodiment of the present invention provides a vehicle identification device for a parking lot, which can perform the relevant functions of all the steps of the foregoing method, referring to fig. 10, fig. 10 is a block diagram of a vehicle identification device for a parking lot, provided in the embodiment of the present invention, as shown in fig. 10, the device 80 specifically includes:
Icon detection module 801: and the icon is used for detecting the parking lot entrance, and when the first icon is not detected, a vehicle identification function is started to identify whether a first current vehicle shielding the first icon exists or not.
Vehicle identification module 802: and if the first current vehicle is identified, tracking the first current vehicle based on the first icon and the second icon to identify whether the first current vehicle enters a parking lot.
In one possible design, the icon detection module 801 is specifically configured to: acquiring a first RGB color image of a first processing area, identifying icons contained in the first RGB color image according to the first RGB color image, and respectively acquiring first midpoint coordinates of the identified icons to obtain a first coordinate set; the first processing area is an area containing all icons on the ground of the entrance of the parking lot; judging whether a first target coordinate which cannot be matched with a first midpoint coordinate in a first preset target coordinate set exists or not, wherein the first target coordinate set comprises first target coordinates of all icons at a preset parking lot entrance, and the first target coordinates are midpoint coordinates of the icons at the parking lot entrance; if a first target coordinate which cannot be matched with a first midpoint coordinate in the first coordinate set exists in a preset first target coordinate set, determining that an icon corresponding to the first target coordinate is not recognized.
In one possible design, the icon detection module 801 is specifically configured to: identifying the corner points of the icons according to the first RGB color image, and determining the corner points of the same icon according to the azimuth relation of each corner point;
and respectively acquiring first midpoint coordinates of the closed loop areas connected by the corner points of the same icon to obtain a first coordinate set.
In one possible design, the icon detection module 801 is specifically configured to: extracting a first color component gray scale image from the first RGB color image to obtain a target image containing the first color component gray scale image; acquiring a gradient image of the first color component gray level image in the target image; the gradient image is used for identifying the intersection edge of the first color region and the second color region; and identifying the gradient image by adopting an angular point detection algorithm to obtain the angular point of the icon.
In one possible design, the icon detection module 801 is specifically configured to: determining the attribute of each corner according to the pixel value change degree around the corner, wherein the attribute comprises a first corner, a second corner, a third corner and a fourth corner, the parking lot entrance is taken as the right upper side, the first corner is the corner of the lower right corner of the corner in the area with the surrounding pixel value change degree reaching the preset degree, the second corner is the corner of the lower left corner of the corner in the area with the surrounding pixel value change degree reaching the preset degree, the third corner is the corner of the upper left corner of the corner in the area with the surrounding pixel value change degree reaching the preset degree, and the fourth corner is the corner of the upper right corner of the corner in the area with the surrounding pixel value change degree reaching the preset degree; traversing the first corner, and for the traversed target corner, acquiring second corner points closest to the target corner and positioned on the right side of the first corner from all second corner points, acquiring third corner points closest to the target corner and positioned below the first corner from all third corner points, and acquiring fourth corner points closest to the target corner and positioned on the right side of the first corner and positioned below the first corner from all fourth corner points; and determining the target corner point and the second corner point, the third focus point and the fourth corner point corresponding to the target corner point as corner points of the same icon.
In one possible design, the vehicle identification module 802 is specifically configured to: when the second icon is not recognized, calculating the distance between the head of the first current vehicle and a first mark line to obtain a first distance; wherein the first marking line is positioned behind the first icon and is parallel to the first icon; when the second icon is not recognized, calculating the distance between the tail of the first current vehicle and the first mark line to obtain a second distance; if the first distance is greater than a first preset distance and the second distance is greater than the first preset distance, determining that the first current vehicle is driven into the parking lot; the first preset distance is a distance between the second icon and the first mark line.
In one possible design, the icon detection module 801 is further configured to detect an icon at the exit of the parking lot, and when the third icon is not detected, turn on a vehicle identification function to identify whether a second current vehicle that obscures the third icon exists. The vehicle identification module 802 is further configured to track the second current vehicle based on the third icon and the fourth icon to identify whether the second current vehicle exits the parking lot if the second current vehicle is identified.
In one possible design, the icon detection module 801 is also to: acquiring a second RGB color image of a second processing area, identifying icons contained in the second RGB color image according to the second RGB color image, and respectively acquiring second midpoint coordinates of the identified icons to obtain a second coordinate set, wherein the second processing area is an area containing all icons on the ground of a parking lot exit; judging whether a second target coordinate which cannot be matched with a second midpoint coordinate in a second coordinate set exists in the preset second target coordinate set or not, wherein the second target coordinate set comprises second target coordinates of all icons at a preset parking lot exit, and the second target coordinates are midpoint coordinates of the icons at the parking lot exit; if a second target coordinate which cannot be matched with a second midpoint coordinate in the second coordinate set exists in the preset second target coordinate set, determining that an icon corresponding to the second target coordinate which cannot be matched with the first midpoint coordinate in the second coordinate set is not recognized.
In one possible design, the vehicle identification module 802 is also to: when the fourth icon is not recognized, calculating the distance between the head of the second current vehicle and the second mark line to obtain a third distance; wherein the second marking line is positioned behind the third icon and is parallel to the third icon; when the fourth icon is not recognized, calculating the distance between the tail of the second current vehicle and the second mark line to obtain a fourth distance; if the third distance is greater than a second preset distance and the fourth distance is greater than the second preset distance, determining that the second current vehicle exits the parking lot; the second preset distance is a distance between the fourth icon and the second mark line.
Based on the device, the situation of the vehicle entering and exiting can be effectively identified through the combination of the icon and the vehicle positioning.
FIG. 11 illustrates an internal block diagram of a computer device in one embodiment. The computer device may specifically be a terminal or a server. As shown in fig. 11, the computer device includes a processor, a memory, and a network interface connected by a system bus. The memory includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program which, when executed by a processor, causes the processor to carry out all the steps of the above-described method. The internal memory may also have stored therein a computer program which, when executed by a processor, causes the processor to perform all the steps of the method described above. It will be appreciated by those skilled in the art that the structure shown in FIG. 11 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is presented comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the aforementioned method.
In one embodiment, a computer-readable storage medium is provided, storing a computer program which, when executed by a processor, causes the processor to perform the steps of the aforementioned method.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.
Claims (9)
1. A method for recognizing a vehicle in a parking lot, characterized in that a plurality of icons are provided on the ground of an entrance of the parking lot, a camera is provided right above the icons, a rear-most row of the plurality of icons on the ground of the entrance of the parking lot is marked as a first icon, and a front-most row of the plurality of icons on the ground of the entrance of the parking lot is marked as a second icon, the method comprising:
Detecting an icon of the parking lot entrance, and when the first icon is not detected, starting a vehicle identification function to identify whether a first current vehicle shielding the first icon exists or not;
if the first current vehicle is identified, tracking the first current vehicle based on the first icon and the second icon to identify whether the first current vehicle enters a parking lot;
The tracking the first current vehicle based on the first icon and the second icon to identify whether the first current vehicle is driving into a parking lot, including:
When the second icon is not recognized, calculating the distance between the head of the first current vehicle and a first mark line to obtain a first distance; wherein the first marking line is positioned behind the first icon and is parallel to the first icon; when the second icon is not recognized, calculating the distance between the tail of the first current vehicle and the first mark line to obtain a second distance;
If the first distance is greater than a first preset distance and the second distance is greater than the first preset distance, determining that the first current vehicle is driven into the parking lot; the first preset distance is a distance between the second icon and the first mark line.
2. The method of claim 1, wherein the detecting the icon of the parking lot entrance comprises:
Acquiring a first RGB color image of a first processing area, identifying icons contained in the first RGB color image according to the first RGB color image, and respectively acquiring first midpoint coordinates of the identified icons to obtain a first coordinate set; the first processing area is an area containing all icons on the ground of the entrance of the parking lot;
Judging whether a first target coordinate which cannot be matched with a first midpoint coordinate in a first preset target coordinate set exists or not, wherein the first target coordinate set comprises first target coordinates of all icons at a preset parking lot entrance, and the first target coordinates are midpoint coordinates of the icons at the parking lot entrance;
If a first target coordinate which cannot be matched with a first midpoint coordinate in the first coordinate set exists in a preset first target coordinate set, determining that an icon corresponding to the first target coordinate is not recognized.
3. The method according to claim 2, wherein the identifying the icons included in the first RGB color image according to the first RGB color image, and obtaining the first midpoint coordinates of the identified icons, respectively, to obtain a first coordinate set, includes:
identifying the corner points of the icons according to the first RGB color image, and determining the corner points of the same icon according to the azimuth relation of each corner point;
and respectively acquiring first midpoint coordinates of the closed loop areas connected by the corner points of the same icon to obtain a first coordinate set.
4. A method according to claim 3, wherein the icon comprises a first color and a second color, wherein the pixel values of the first color are greater than the pixel values of the second color, the first color region frames the second color region, the identifying the corner point of the icon from the first RGB color image comprises:
Extracting a first color component gray scale image from the first RGB color image to obtain a target image containing the first color component gray scale image;
Acquiring a gradient image of the first color component gray level image in the target image; the gradient image is used for identifying the intersection edge of the first color region and the second color region;
and identifying the gradient image by adopting an angular point detection algorithm to obtain the angular point of the icon.
5. A method according to claim 3, wherein the icons are square, and the determining the corner points of the same icon according to the azimuth relation of the corner points comprises:
Determining the attribute of each corner according to the pixel value change degree around the corner, wherein the attribute comprises a first corner, a second corner, a third corner and a fourth corner, the parking lot entrance is taken as the right upper side, the first corner is the corner of the lower right corner of the corner in the area with the surrounding pixel value change degree reaching the preset degree, the second corner is the corner of the lower left corner of the corner in the area with the surrounding pixel value change degree reaching the preset degree, the third corner is the corner of the upper left corner of the corner in the area with the surrounding pixel value change degree reaching the preset degree, and the fourth corner is the corner of the upper right corner of the corner in the area with the surrounding pixel value change degree reaching the preset degree;
Traversing the first corner, and for the traversed target corner, acquiring second corner points closest to the target corner and positioned on the right side of the first corner from all second corner points, acquiring third corner points closest to the target corner and positioned below the first corner from all third corner points, and acquiring fourth corner points closest to the target corner and positioned on the right side of the first corner and positioned below the first corner from all fourth corner points; and determining the target corner point and the second corner point, the third focus point and the fourth corner point corresponding to the target corner point as corner points of the same icon.
6. The method of claim 1, wherein a plurality of icons are disposed on the exit floor of the parking lot, wherein a rearmost row of the plurality of icons on the exit floor of the parking lot is marked as a third icon, and wherein a frontmost row of the plurality of icons on the exit floor of the parking lot is marked as a fourth icon, the method further comprising:
Detecting an icon at the exit of the parking lot, and when the third icon is not detected, starting a vehicle identification function to identify whether a second current vehicle shielding the third icon exists or not;
And if the second current vehicle is identified, tracking the second current vehicle based on the third icon and the fourth icon to identify whether the second current vehicle exits the parking lot.
7. The method of claim 6, wherein tracking the second current vehicle based on the third icon and the fourth icon to identify whether the second current vehicle is driving out of the parking lot comprises:
When the fourth icon is not recognized, calculating the distance between the head of the second current vehicle and the second mark line to obtain a third distance; wherein the second marking line is positioned behind the third icon and is parallel to the third icon; when the fourth icon is not recognized, calculating the distance between the tail of the second current vehicle and the second mark line to obtain a fourth distance;
If the third distance is greater than a second preset distance and the fourth distance is greater than the second preset distance, determining that the second current vehicle exits the parking lot; the second preset distance is a distance between the fourth icon and the second mark line.
8. The method of claim 6, wherein detecting the icon of the parking lot exit comprises:
Acquiring a second RGB color image of a second processing area, identifying icons contained in the second RGB color image according to the second RGB color image, and respectively acquiring second midpoint coordinates of the identified icons to obtain a second coordinate set, wherein the second processing area is an area containing all icons on the ground of a parking lot exit;
Judging whether a second target coordinate which cannot be matched with a second midpoint coordinate in a second coordinate set exists in the preset second target coordinate set or not, wherein the second target coordinate set comprises second target coordinates of all icons at a preset parking lot exit, and the second target coordinates are midpoint coordinates of the icons at the parking lot exit;
If a second target coordinate which cannot be matched with a second midpoint coordinate in the second coordinate set exists in the preset second target coordinate set, determining that an icon corresponding to the second target coordinate which cannot be matched with the first midpoint coordinate in the second coordinate set is not recognized.
9. A vehicle recognition device for a parking lot, characterized in that a plurality of icons are provided on the ground of an entrance of the parking lot, a camera is provided right above the icons, a front row of icons among the plurality of icons on the ground of the entrance of the parking lot is marked as a first icon, and a rear row of icons among the plurality of icons on the ground of the entrance of the parking lot is marked as a second icon, the device comprising:
Icon detection module: the icon is used for detecting the parking lot entrance, and when the first icon is not detected, a vehicle identification function is started to identify whether a first current vehicle shielding the first icon exists or not;
Vehicle identification module: if the first current vehicle is identified, tracking the first current vehicle based on the first icon and the second icon to identify whether the first current vehicle enters a parking lot; when the second icon is not recognized, calculating the distance between the head of the first current vehicle and a first mark line to obtain a first distance; wherein the first marking line is positioned behind the first icon and is parallel to the first icon; when the second icon is not recognized, calculating the distance between the tail of the first current vehicle and the first mark line to obtain a second distance; if the first distance is greater than a first preset distance and the second distance is greater than the first preset distance, determining that the first current vehicle is driven into the parking lot; the first preset distance is a distance between the second icon and the first mark line.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410315896.6A CN117935568B (en) | 2024-03-20 | 2024-03-20 | Parking lot vehicle identification method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410315896.6A CN117935568B (en) | 2024-03-20 | 2024-03-20 | Parking lot vehicle identification method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117935568A CN117935568A (en) | 2024-04-26 |
CN117935568B true CN117935568B (en) | 2024-05-24 |
Family
ID=90755999
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410315896.6A Active CN117935568B (en) | 2024-03-20 | 2024-03-20 | Parking lot vehicle identification method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117935568B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201532704U (en) * | 2009-08-25 | 2010-07-21 | 厦门市路桥信息工程有限公司 | Park management system free from taking cards |
WO2023191542A1 (en) * | 2022-03-30 | 2023-10-05 | 라이트비전 주식회사 | Parking management system accurately identifying vehicles or using identifier without causing congestion |
CN117173904A (en) * | 2023-08-30 | 2023-12-05 | 深圳市捷顺科技实业股份有限公司 | Method, device, medium and equipment for identifying reverse traffic of vehicles in parking lot |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8139115B2 (en) * | 2006-10-30 | 2012-03-20 | International Business Machines Corporation | Method and apparatus for managing parking lots |
-
2024
- 2024-03-20 CN CN202410315896.6A patent/CN117935568B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201532704U (en) * | 2009-08-25 | 2010-07-21 | 厦门市路桥信息工程有限公司 | Park management system free from taking cards |
WO2023191542A1 (en) * | 2022-03-30 | 2023-10-05 | 라이트비전 주식회사 | Parking management system accurately identifying vehicles or using identifier without causing congestion |
CN117173904A (en) * | 2023-08-30 | 2023-12-05 | 深圳市捷顺科技实业股份有限公司 | Method, device, medium and equipment for identifying reverse traffic of vehicles in parking lot |
Non-Patent Citations (1)
Title |
---|
室内停车场预约与导引系统;汪迎;郝冉;冯家慧;张航铭;杜笑笑;万露;陈晨辉;;科技展望;20161010(28);第 125-127页 * |
Also Published As
Publication number | Publication date |
---|---|
CN117935568A (en) | 2024-04-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112509364B (en) | Method and device for determining parking state of vehicle, computer equipment and storage medium | |
US9773176B2 (en) | Image processing apparatus and image processing method | |
CN111028534B (en) | Parking space detection method and device | |
CN111891061B (en) | Vehicle collision detection method and device and computer equipment | |
KR101968203B1 (en) | Parking lot management system | |
US9747507B2 (en) | Ground plane detection | |
CN111753639B (en) | Perception map generation method, device, computer equipment and storage medium | |
CN112002131A (en) | In-road parking behavior detection method and device | |
CN114067295A (en) | Method and device for determining vehicle loading rate and vehicle management system | |
CN117935568B (en) | Parking lot vehicle identification method and device | |
CN112614375B (en) | Parking guidance method and system based on vehicle driving state | |
CN104601942B (en) | Parking area tracking device and its method | |
CN114078324B (en) | Vehicle jamming behavior detection method and device, road side equipment and storage medium | |
CN116824549B (en) | Target detection method and device based on multi-detection network fusion and vehicle | |
WO2015014882A1 (en) | Method for detecting a target object by clustering of characteristic features of an image, camera system and motor vehicle | |
US20230394848A1 (en) | Parking space detection method and device,vehicle, and storage medium | |
CN111401135A (en) | Door opening anti-collision method and device, computer equipment and storage medium | |
CN107844749B (en) | Road surface detection method and device, electronic device and storage medium | |
KR20130036806A (en) | System for deciding accident using black box and driving method thereof | |
JP5493705B2 (en) | Vehicle position detection device, vehicle position detection method, and vehicle position detection program | |
CN113538924B (en) | Vehicle snapshot method and device, electronic equipment and computer readable storage medium | |
CN112183413B (en) | Parking space detection method and device, storage medium and vehicle | |
JP4333683B2 (en) | Windshield range detection device, method and program | |
Bachtiar et al. | Parking management by means of computer vision | |
KR20090074927A (en) | Detection method of road vehicles |
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 |