A vehicle entry and exit identification method and system for nested parking lots

By block processing and building vehicle models in nested parking lots, analyzing feature vectors and calculating cosine similarity, the accuracy problem of the vehicle recognition system under different camera perspectives is solved, and efficient and accurate vehicle recognition is achieved.

CN119314121BActive Publication Date: 2025-03-28东莞市杰瑞智能科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411854120.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-03-28
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

In nested parking lots, the existing vehicle identification system reduces the accuracy of video matching due to the difference in camera shooting angle and vehicle entry angle, which affects the accuracy of vehicle recognition.

Method used

By obtaining the video of the vehicle passing through each gate, pre-processing is performed to obtain the vehicle area, process it in blocks and build an initial vehicle model, analyze the window and block feature vectors, calculate the cosine similarity, perform block matching and model improvement.

Benefits of technology

It improves the efficiency and accuracy of vehicle video matching, ensures the accuracy and real-timeness of vehicle recognition in complex scenarios, and improves the vehicle recognition accuracy of multiple gates in nested parking lots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119314121B_ABST
    Figure CN119314121B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of video image recognition, and specifically to a vehicle entry and exit recognition method and system for a nested parking lot. The present invention obtains video data when a vehicle passes through each barrier, extracts a vehicle area for each frame of image, removes the background, and reduces the interference of irrelevant information; performs block analysis on the vehicle area, constructs an initial vehicle model with vehicle feature information, and establishes a unique vehicle identifier; when the vehicle subsequently passes through other barriers, extracts feature areas that did not appear in the previous video frames of the vehicle by comparing video key frames with regional features in the initial vehicle model; and accurately matches feature areas of the vehicle at different viewing angles by calculating the degree of feature matching, thereby avoiding recognition deviations caused by different camera positions, improving matching accuracy, and adapting to complex nested parking lot environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of video image recognition, and in particular to a vehicle entry and exit recognition method and system for a nested parking lot. Background Art

[0002] As the number of vehicles in cities increases, parking lot management requirements are becoming increasingly complex. Nested parking lots are particularly complex in structure, usually divided into multiple levels of parking areas, requiring vehicles to enter and exit between multiple associated gates, which makes vehicle identification and management more difficult.

[0003] Although the existing vehicle recognition system can identify vehicles, there are challenges in video matching in nested parking lots. For example, the camera shooting angles of different gates and the angles at which vehicles enter are different, resulting in different angles and details of the vehicle area in the video of each gate, which reduces the accuracy of video matching and affects the accuracy of vehicle recognition.

[0004] Therefore, a method is needed to effectively match the videos of vehicles between various gates to improve recognition accuracy and meet the management needs of nested parking lots. Summary of the invention

[0005] In order to solve the above technical problems, an object of the present invention is to provide a vehicle entry and exit identification method and system for a nested parking lot.

[0006] According to a first aspect of an embodiment of the present invention, a vehicle entry and exit identification method for a nested parking lot is provided, and the technical solution adopted is specifically as follows:

[0007] Obtaining a vehicle video when the vehicle passes through each barrier, and preprocessing the vehicle video to obtain a vehicle area;

[0008] The vehicle area is processed into blocks, and an initial vehicle model is constructed according to the block information of the vehicle area in the first frame of the vehicle video obtained when the vehicle passes through the first barrier;

[0009] Constructing a window in the initial vehicle model, analyzing a first grayscale feature of the window, and obtaining a window feature vector;

[0010] Analyze the second grayscale feature of each block of the vehicle area in each frame image of the subsequent vehicle video to obtain a block feature vector;

[0011] Analyzing the cosine similarity between each block of the vehicle area in each frame image of the subsequent vehicle video and each window in the initial vehicle model according to the window feature vector and the block feature vector, to obtain a reference model window of the block;

[0012] Analyzing the matching degree between the block and the reference model window corresponding to the block within the eight neighborhoods of the block and the reference model window;

[0013] Based on the matching degree, block matching and improvement of the initial vehicle model are performed.

[0014] In some embodiments of the present invention, constructing a window in the initial vehicle model, analyzing the first grayscale feature of the window, and obtaining a window feature vector includes:

[0015] In the initial vehicle model, a window is constructed with each pixel point as the starting position of the upper left corner, and the window size is the same as the block size;

[0016] A window feature vector is obtained according to the grayscale value of a pixel in the initial vehicle model and the mean and standard deviation of the grayscale values ​​of all pixels in the window corresponding to the pixel.

[0017] In some embodiments of the present invention, analyzing the second grayscale feature of each block of the vehicle area in each frame image of the subsequent vehicle video to obtain the block feature vector includes:

[0018] The grayscale value of the pixel at the upper left corner starting position of each block of the vehicle area in each frame image of the subsequent vehicle video, as well as the mean and standard deviation of the grayscale values ​​of all pixels in the block, are analyzed to obtain a block feature vector.

[0019] In some embodiments of the present invention, according to the window feature vector and the block feature vector, the cosine similarity between each block of the vehicle area in each frame image of the subsequent vehicle video and each window in the initial vehicle model is analyzed to obtain the reference model window of the block, including:

[0020] According to the window feature vector and the block feature vector, a cosine similarity between each block of the vehicle area in each frame image of the subsequent vehicle video and each window in the initial vehicle model is obtained;

[0021] Set similarity threshold;

[0022] The window corresponding to the block whose cosine similarity is greater than the similarity threshold is used as the reference model window of the block.

[0023] In some embodiments of the present invention, analyzing the matching degree between the block and the reference model window corresponding to the block within the eight neighborhoods of the block and the reference model window includes:

[0024] The block and its corresponding eight-neighborhood block, the reference model window corresponding to the block and the eight-neighborhood window corresponding to the reference model window form a block-window combination;

[0025] The grayscale similarity of all corresponding pixels in the block-window combination is analyzed to obtain the matching degree between the block and its corresponding reference model window.

[0026] In some embodiments of the present invention, based on the matching degree, block matching is performed to complete the improvement of the initial vehicle model, including:

[0027] Obtaining the maximum value of the matching degree between the block and its corresponding reference model window as the maximum matching degree of the block;

[0028] Set the matching degree threshold;

[0029] Obtaining the historical matching degree between the block and the block at the same position in the monitoring historical time;

[0030] The relationship between the maximum matching degree and the historical matching degree is analyzed, and combined with the relationship between the maximum matching degree and the matching degree threshold, it is determined whether the block is added to the database to complete the improvement of the initial vehicle model.

[0031] In some embodiments of the present invention, analyzing the relationship between the maximum matching degree and the historical matching degree, and combining the relationship between the maximum matching degree and the matching degree threshold, determining whether the block is added to the database includes:

[0032] If the maximum matching degree is not less than the historical matching degree and the maximum matching degree is greater than the matching degree threshold, the block is not added to the database;

[0033] The maximum matching degree is not less than the historical matching degree, but the maximum matching degree is not greater than the matching degree threshold, and the block is added to the database;

[0034] If the maximum matching degree is lower than the historical matching degree, the block will not be added to the database.

[0035] In some embodiments of the present invention, preprocessing the vehicle video to obtain the vehicle area includes:

[0036] By using semantic segmentation technology, each frame image of the vehicle video is segmented to obtain the vehicle area corresponding to each frame image.

[0037] According to a second aspect of an embodiment of the present invention, a vehicle entry and exit identification system for a nested parking lot is provided, comprising: a memory and a processor, wherein:

[0038] The memory is used to store program code;

[0039] The processor is used to read the program code stored in the memory and execute the method described in the first aspect of the embodiment of the present invention.

[0040] In some embodiments of the present invention, the processor comprises:

[0041] A vehicle area acquisition module is used to acquire a vehicle video when the vehicle passes through each gate, and pre-process the vehicle video to obtain a vehicle area;

[0042] A vehicle data model building module, used for performing block processing on the vehicle area, and building an initial vehicle model according to the block information of the vehicle area in the first frame of vehicle video obtained when the vehicle passes through the first barrier;

[0043] A feature vector analysis module, used for constructing a window in the initial vehicle model, analyzing a first grayscale feature of the window, and obtaining a window feature vector; and for analyzing a second grayscale feature of each block of a vehicle region in each frame of a subsequent vehicle video, and obtaining a block feature vector;

[0044] A matching degree analysis module is used to analyze the cosine similarity between each block of the vehicle area in each frame image of the subsequent vehicle video and each window in the initial vehicle model according to the window feature vector and the block feature vector, so as to obtain the reference model window of the block; and then analyze the matching degree of the block and its corresponding reference model window within the eight neighborhoods of the block and the reference model window;

[0045] The vehicle data model improvement module is used to perform block matching and improve the initial vehicle model based on the matching degree.

[0046] Compared with the prior art, the vehicle entry and exit identification method and system for nested parking lots provided by the present invention have the following beneficial effects:

[0047] 1. The present invention improves the efficiency of subsequent video matching by gradually constructing a feature model of the vehicle, ensures the accuracy and real-time performance of vehicle recognition in complex scenes, and improves the vehicle recognition accuracy of multiple gates in nested parking lots.

[0048] 2. The present invention processes the vehicle video when the vehicle passes through each barrier, separates the vehicle area and the background area in each frame image in the vehicle video, removes the background information interference, obtains the vehicle area, and only analyzes the vehicle area, thereby improving the analysis efficiency.

[0049] 3. The present invention divides the vehicle area into blocks and constructs an initial vehicle model based on the block information of the vehicle area in the first frame of the vehicle video obtained when the vehicle passes through the first barrier. This initial vehicle model records the key feature areas of the vehicle between different barriers and establishes a unique vehicle identifier to facilitate subsequent analysis and storage of vehicle video data.

[0050] 4. The present invention obtains a reference model window of the block by analyzing the cosine similarity between the window feature vector of the window in the initial vehicle model and the block feature vector of each block of the vehicle area in each frame image of the subsequent vehicle video, thereby realizing preliminary screening of the window in the initial vehicle model and reducing the amount of calculation during comparison.

[0051] 5. The present invention further reduces the matching error of a single block by analyzing the matching degree between the block and the reference model window within the eight neighborhoods of the block and the reference model window, and obtains a more accurate matching degree between the block and the reference model window. By calculating the feature matching degree, the feature areas of the vehicle at different viewing angles are accurately matched, avoiding recognition deviations caused by different camera positions and improving matching accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0053] Figure 1 A basic flow chart of a vehicle entry and exit identification method for a nested parking lot provided by an embodiment of the present invention;

[0054] Figure 2 A schematic diagram of the basic components of a vehicle entry and exit identification system for a nested parking lot provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0055] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the vehicle entry and exit identification method and system for nested parking lots proposed by the present invention, its specific implementation, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. Terms such as "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a circuit structure, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such article or device. In the absence of further restrictions, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the article or device including the element.

[0057] Since there are multiple barriers and complex structures in the nested parking lot, when a vehicle enters different barriers, the camera installation angles and shooting angles of the different barrier video acquisition systems are different, and thus the angles and details of the vehicle area obtained at each barrier are different, which may cause the vehicle feature area matching errors obtained by different barriers. Therefore, the present invention aims to solve the problem of vehicle recognition accuracy caused by differences in camera viewing angles in nested parking lots. By comparing the key feature areas of the vehicle in different barrier videos, the accuracy and efficiency of vehicle entry and exit recognition are improved, the recognition error is reduced, and the overall intelligent level of parking lot management is improved.

[0058] A specific solution of a vehicle entry and exit identification method for a nested parking lot provided by the present invention is described in detail below with reference to the accompanying drawings.

[0059] See also Figure 1 , which shows the basic process of a vehicle entry and exit identification method for a nested parking lot provided by an embodiment of the present invention.

[0060] like Figure 1 As shown, an embodiment of the present invention provides a vehicle entry and exit identification method for a nested parking lot, specifically comprising:

[0061] S100: Obtain vehicle videos when the vehicle passes through each barrier, and pre-process the vehicle videos to obtain vehicle areas.

[0062] In a nested parking lot, because it has multiple levels of parking areas and multiple interrelated barriers, the management of vehicle entry and exit becomes complicated. When a vehicle enters the parking lot, the video acquisition system installed on the barrier is used to obtain real-time vehicle video when the vehicle passes through each barrier. The video encoding format is H.264.

[0063] Then, the vehicle video is preprocessed to obtain the vehicle area. Since the position of the video acquisition system on the parking lot gate is fixed on the gate, the background in the vehicle video it captures hardly changes or changes very little. Therefore, semantic segmentation technology can be used to segment each frame of the vehicle video, separate the vehicle area and background area in each frame, remove background information interference, and obtain the vehicle area corresponding to each frame.

[0064] S200: The vehicle area is divided into blocks, and an initial vehicle model is constructed according to the block information of the vehicle area in the first frame of vehicle video obtained when the vehicle passes through the first barrier.

[0065] The process of obtaining the vehicle video of each vehicle passing through each gate is as follows: after the vehicle is identified, the video of the period before and after is analyzed and processed and then stored. In the traditional video compression process, the video is processed through intra-frame compression and inter-frame prediction. Although this method has a good effect on video compression, for nested parking lots, since a key frame is stored every once in a while during video recording, there is still a large time redundancy for the video storage of nested parking lots using traditional video compression methods. Most of the data stored in its multiple key frames are still redundant. Therefore, the video compression method needs to be improved again. By jointly analyzing and storing the videos of each vehicle passing through multiple gates, a data model of each vehicle is constructed, and it is used as the corresponding key frame to further compress the video.

[0066] Based on the above analysis, this embodiment first performs block processing on the vehicle area. Specifically, the vehicle area in each frame of the vehicle video of any vehicle entering each gate of the nested parking lot is blocked, and it is divided into several blocks, the size of which can be determined according to actual needs, including 16*16, 8*8, and 4*4. The smaller the block size, the richer the details obtained in the final video, but relatively speaking, the larger the storage space it occupies; here, 8*8 blocks are taken as an example.

[0067] In the first frame of the vehicle video recorded by the first gate when the vehicle enters the parking lot for the first time, all blocks in the vehicle area are recorded as the initial vehicle information key blocks, which are stored together with the position information of each block at the position corresponding to the vehicle in the database to facilitate re-storage when the vehicle appears in subsequent videos.

[0068] For the blocks of the vehicle area in the first frame of the vehicle video obtained when the vehicle passes through the first barrier and stored in the database, the initial vehicle model is constructed based on the position information of each block. The initial vehicle model includes the information of each pixel point in each block of the vehicle and the information of each pixel point in the adjacent blocks of each block, which is convenient for subsequent analysis.

[0069] S300: constructing a window in the initial vehicle model, analyzing the first grayscale feature of the window, and obtaining a window feature vector.

[0070] After obtaining the initial vehicle model, the subsequent vehicle video analysis is no longer performed in a block-by-block manner. This is because if the subsequent vehicle video analysis is continued in a block-by-block manner, when the vehicle video is subsequently compared, the starting position of the obtained block (the starting position here is the pixel point in the upper left corner of each block as an example) may not be the same as the starting position of the data block stored in the database, and there may be deviations, resulting in deviations in the matching degree obtained when performing data comparison. Therefore, it is necessary to integrate the blocks according to their position information in the database.

[0071] Based on the above analysis, a window is first constructed in the initial vehicle model. Specifically, in the initial vehicle model, a window is constructed with each pixel as the starting position of the upper left corner, and the window size is the same as the block size, that is, an 8*8 window is constructed.

[0072] When the blocks of the vehicle area corresponding to each frame image in the subsequent vehicle video are compared with the window information in the database, the initial vehicle model in the database is constantly expanding, and the amount of data in the database will continue to expand with the improvement of vehicle information. The time spent on the comparison is also increasing. Therefore, it is not possible to traverse each data point, and it is necessary to perform a screening in advance when comparing each block. The features can be extracted by obtaining each pixel point of the initial vehicle model in the database and all the pixels in the window it represents, and the features that pass can be screened when performing the comparison.

[0073] Based on the above analysis, this embodiment obtains the window feature vector by analyzing the first grayscale feature of the window. Further, the window feature vector is obtained according to the grayscale value of the pixel in the initial vehicle model and the mean and standard deviation of the grayscale values ​​of all pixels in the window corresponding to the pixel. The mathematical expression of the window feature vector is:

[0074]

[0075] In the formula, The initial vehicle model The pixel corresponds to the mean gray value of all pixels in the window; The initial vehicle model The pixel point corresponds to the The gray value of each pixel; The initial vehicle model The standard deviation of the grayscale values ​​of all pixels in the window corresponding to each pixel; The initial vehicle model The gray value of the pixel; 64 represents the gray value of the initial vehicle model The number of pixels corresponding to the 8*8 window; The initial vehicle model The window feature vector of the window corresponding to the pixels.

[0076] Through the feature vector It can simultaneously describe the brightness in the window and the amplitude of the brightness change, and filter by the grayscale value of the window starting point, so as to effectively summarize the image information in the window.

[0077] Then, the window feature vectors of the windows corresponding to all pixels of the initial vehicle model are obtained.

[0078] S400: Analyze the second grayscale feature of each block of the vehicle area in each frame image of the subsequent vehicle video to obtain a block feature vector.

[0079] Since the initial vehicle model cannot be completely constructed only by the information in the first frame image, each frame image needs to be analyzed in the subsequent vehicle video to improve the initial vehicle model and match all blocks of each frame image in the subsequent vehicle video with the initial vehicle model. If they can match, it means that the block already exists in the initial vehicle model. This is reflected in the actual vehicle video as the vehicle moves forward over time, while a part of the vehicle moves in the recorded video. However, since the vehicle has not changed, it is the same as or very different from the previous block and can no longer be stored. Instead, it can be replaced by the previously stored data block.

[0080] Therefore, for each block obtained in the vehicle area in each frame of the subsequent vehicle video, its corresponding feature vector needs to be analyzed. This embodiment obtains a block feature vector by analyzing the second grayscale feature of each block in the vehicle area in each frame of the subsequent vehicle video. Further, the grayscale value of the pixel point at the starting position of the upper left corner of each block in the vehicle area in each frame of the subsequent vehicle video, as well as the mean and standard deviation of the grayscale values ​​of all pixels in the block, are analyzed to obtain a block feature vector. The mathematical expression of the block feature vector is:

[0081]

[0082] In the formula, The first frame image representing the vehicle area in the subsequent vehicle video The mean gray value of all pixels in a block; Indicates In the block The gray value of each pixel; Indicates The standard deviation of the grayscale values ​​of all pixels in a block; Indicates The gray value of the pixel starting at the upper left corner of the block; 64 represents the gray value of the pixel starting at the upper left corner of the block; The number of pixels in an 8*8 block; Indicates The block feature vector of the blocks.

[0083] Similarly, through the feature vector It can simultaneously describe the brightness and brightness variation in the block, and filter by the grayscale value of the starting point of the block, so as to effectively summarize the image information in the block.

[0084] S500: Analyze the cosine similarity between each block of the vehicle area in each frame image of the subsequent vehicle video and each window in the initial vehicle model according to the window feature vector and the block feature vector, and obtain a reference model window of the block.

[0085] According to the window feature vector and the block feature vector, the cosine similarity between each block of the vehicle area in each frame of the subsequent vehicle video and each window in the initial vehicle model is analyzed to obtain the reference model window of the block. Further, it includes: according to the window feature vector and the block feature vector, the cosine similarity between each block of the vehicle area in each frame of the subsequent vehicle video and each window in the initial vehicle model is obtained; a similarity threshold is set; and the window corresponding to the block whose cosine similarity is greater than the similarity threshold is used as the reference model window of the block.

[0086] Construct the first frame of the vehicle area in the subsequent vehicle video The first block of the initial vehicle model The mathematical expression of the cosine similarity between the corresponding windows of pixels is:

[0087]

[0088] In the formula, The first frame image representing the vehicle area in the subsequent vehicle video The first block of the initial vehicle model The cosine similarity between the corresponding windows of pixels; The first frame image representing the vehicle area in the subsequent vehicle video The block feature vector of the blocks; The initial vehicle model The window feature vector of the window corresponding to the pixels.

[0089] Set the similarity threshold to 0.9, and record several windows corresponding to the pixel points in the initial vehicle model whose cosine similarity corresponding to the block is greater than 0.9 as the reference model windows of the block in the subsequent vehicle video. Obtain the reference model window of each block in the vehicle area in each frame of the subsequent vehicle video to perform preliminary screening of the windows in the initial vehicle model, reducing the amount of calculation during comparison. It should be noted that each block may have no reference model window or one or more reference model windows. For blocks without reference model windows, they do not belong to the area in the initial vehicle model and may be background areas. The blocks are not stored in the initial vehicle model. Continue to perform block matching analysis for blocks with one or more reference model windows.

[0090] S600: Analyze the matching degree between the block and the reference model window corresponding to the block within the eight neighborhoods of the block and the reference model window.

[0091] After obtaining the reference model window of each block, it is necessary to calculate the matching degree between the block and the reference model window according to the similarity between the grayscale value of each pixel in the block and the grayscale value of the pixel at the corresponding position in each reference model window. Since the information of a single block may not be sufficient to fully represent the overall shape of the vehicle, it is necessary to jointly analyze the block and its eight neighborhoods. In this way, the matching error of a single block is further reduced, and a more accurate matching degree between the block and its reference model window is obtained.

[0092] Therefore, the embodiment of the present application analyzes the matching degree between the block and the reference model window within the eight neighborhoods of the block and the reference model window. Further, it includes: forming a block-window combination with the block and its corresponding eight neighborhood blocks, the reference model window corresponding to the block and the eight neighborhood windows corresponding to the reference model window; analyzing the grayscale similarity of all corresponding pixels in the block-window combination to obtain the matching degree between the block and its corresponding reference model window.

[0093] The formula for calculating the matching degree between the building block and its corresponding reference model window is:

[0094]

[0095] In the formula, Indicates the matching degree between the block and its corresponding reference model window; Represents the number of block-window combinations consisting of a block and its corresponding eight-neighborhood block, the reference model window corresponding to the block, and the eight-neighborhood window corresponding to the reference model window. The maximum value is 9 (some neighborhood windows may be missing at the boundary, in which case the number may be less than 9); Indicates the number of corresponding pixel pairs in each group of block-window (8*8 block and 8*8 window) combination; Indicates The first block in the group block-window combination The gray value of each pixel; Indicates The first window in the component block-window combination The gray value of each pixel; This is to prevent the denominator from being 0.

[0096] For the The average difference in the grayscale values ​​of all corresponding pixels in the block-window combination is used to measure the grayscale similarity of the corresponding blocks-windows; This means that by increasing neighborhood information, the error in calculating a single block can be reduced. When a block is not completely consistent with the reference model window in the initial vehicle model, the information of the surrounding adjacent blocks can provide more clues to enhance the overall matching accuracy.

[0097] At this point, the matching degree between each block and its corresponding reference model window is obtained.

[0098] S700: Based on the matching degree, perform block matching and improve the initial vehicle model.

[0099] After obtaining the degree of match between each block and its corresponding reference model window, the blocks need to be matched. At this time, it is necessary to determine whether to add each block to the database based on the degree of match between each block and the block at the same position in the monitoring history time and the degree of match between the block and the corresponding reference model window.

[0100] Therefore, based on the matching degree, the block matching and the initial vehicle model are improved, which further includes: obtaining the maximum value of the matching degree between the block and its corresponding reference model window as the maximum matching degree of the block; setting a matching degree threshold, which can be set to 0.95; obtaining the historical matching degree between the block and the block at the same position in the monitoring history time, wherein "the block at the same position in the monitoring history time" refers to the block images of the same position (such as the previous and next frames) of the vehicle passing through the vehicle at different times after entering the parking lot, and these blocks are located in the same spatial position in the database storage; the historical matching degree is to compare whether the vehicle has moved between the two frames, resulting in the disappearance of a part of the area and the appearance of a new part, which can be judged by the optical flow method, and the optical flow calculation is performed on the selected area to obtain the motion vector of each pixel in the area; the motion vector is used to calculate the moving position of the area in the new frame; the pixel ratio of the pixel overlap part of the new position after the movement and the original area is calculated, that is, the historical matching degree between the block and the block at the same position in the monitoring history time; the relationship between the maximum matching degree and the historical matching degree is analyzed, and the relationship between the maximum matching degree and the matching degree threshold is combined to determine whether the block is added to the database to complete the improvement of the initial vehicle model.

[0101] Furthermore, the relationship between the maximum matching degree and the historical matching degree is analyzed, and the relationship between the maximum matching degree and the matching degree threshold is combined to determine whether the block is added to the database, including: the maximum matching degree is not lower than the historical matching degree, and the maximum matching degree is greater than the matching degree threshold, indicating that the block image obtained at this time already exists in the initial vehicle model and is a repeated area of ​​the vehicle, so the block is not added to the database; the maximum matching degree is not lower than the historical matching degree, but the maximum matching degree is not greater than the matching degree threshold, indicating that the block image obtained at this time already exists in the initial vehicle model, but only a part of it exists, and the existing part is a new feature area of ​​the vehicle, so the block needs to be added to the database; the maximum matching degree is lower than the historical matching degree, which means that the block is not an area in the initial vehicle model and may be a background area, so the block is not added to the database.

[0102] When the initial vehicle model in the database is subsequently updated, the newly extracted areas (such as the vehicle feature areas that first appear in the frame image of the vehicle video) are added to the database to improve the vehicle model. In the subsequent comparison, the key frames in the vehicle video are matched with the initial vehicle model, and the feature information of different areas of the vehicle in the vehicle video is automatically extracted to further enhance the accuracy and efficiency of vehicle recognition matching.

[0103] In particular, if there is a relevant need, the image of the main feature area of ​​the vehicle (such as the license plate and the main driving area) should be retained at a high clarity to ensure that it is accurate enough when manual recognition is required later.

[0104] Based on the same inventive concept as the above method, this embodiment also provides a vehicle entry and exit identification system for nested parking lots.

[0105] See also Figure 2 , which shows the basic composition of a vehicle entry and exit identification system for a nested parking lot provided by an embodiment of the present invention.

[0106] like Figure 2 As shown, a vehicle entry and exit recognition system for a nested parking lot includes: a memory 10 and a processor 20, wherein:

[0107] A memory 10, used for storing program codes;

[0108] The processor 20 is used to read the program code stored in the memory 10, and execute the acquisition of the vehicle video when the vehicle passes through each gate, and pre-process the vehicle video to obtain the vehicle area; block the vehicle area, and build an initial vehicle model according to the block information of the vehicle area in the first frame of the vehicle video acquired when the vehicle passes through the first gate; build a window in the initial vehicle model, analyze the first grayscale feature of the window, and obtain the window feature vector; analyze the second grayscale feature of each block of the vehicle area in each frame image of the subsequent vehicle video to obtain the block feature vector; analyze the cosine similarity between each block of the vehicle area in each frame image of the subsequent vehicle video and each window in the initial vehicle model according to the window feature vector and the block feature vector to obtain the reference model window of the block; analyze the matching degree between the block and its corresponding reference model window within the eight neighborhoods of the block and the reference model window; and perform block matching and improve the initial vehicle model based on the matching degree.

[0109] Furthermore, the processor 20 includes a vehicle region acquisition module 21, a vehicle data model construction module 22, a feature vector analysis module 23, a matching degree analysis module 24 and a vehicle data model improvement module 25. Among them:

[0110] The vehicle area acquisition module 21 is used to acquire the vehicle video when the vehicle passes through each gate, and pre-process the vehicle video to obtain the vehicle area;

[0111] The vehicle data model building module 22 is used to perform block processing on the vehicle area and build an initial vehicle model according to the block information of the vehicle area in the first frame of vehicle video obtained when the vehicle passes through the first gate;

[0112] A feature vector analysis module 23 is used to construct a window in the initial vehicle model, analyze the first grayscale feature of the window, and obtain the window feature vector; and to analyze the second grayscale feature of each block of the vehicle area in each frame image of the subsequent vehicle video to obtain the block feature vector;

[0113] The matching degree analysis module 24 is used to analyze the cosine similarity between each block of the vehicle area in each frame image of the subsequent vehicle video and each window in the initial vehicle model according to the window feature vector and the block feature vector, and obtain the reference model window of the block; then, within the eight neighborhoods of the block and the reference model window, analyze the matching degree of the block and its corresponding reference model window;

[0114] The vehicle data model improvement module 25 is used to perform block matching and improve the initial vehicle model based on the matching degree.

[0115] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0116] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A vehicle entry and exit recognition method for a nested parking lot, characterized in that: The method comprises: Obtaining a vehicle video when the vehicle passes through each barrier, and preprocessing the vehicle video to obtain a vehicle area; The vehicle area is processed into blocks, and an initial vehicle model is constructed according to the block information of the vehicle area in the first frame of the vehicle video obtained when the vehicle passes through the first barrier; Constructing a window in the initial vehicle model, analyzing a first grayscale feature of the window, and obtaining a window feature vector; Analyze the second grayscale feature of each block of the vehicle area in each frame image of the subsequent vehicle video to obtain a block feature vector; Analyzing the cosine similarity between each block of the vehicle area in each frame image of the subsequent vehicle video and each window in the initial vehicle model according to the window feature vector and the block feature vector, to obtain a reference model window of the block; Analyzing the matching degree between the block and the reference model window corresponding to the block within the eight neighborhoods of the block and the reference model window; Based on the matching degree, performing block matching and improving the initial vehicle model; Based on the matching degree, block matching is performed to complete the improvement of the initial vehicle model, including: Obtaining the maximum value of the matching degree between the block and its corresponding reference model window as the maximum matching degree of the block; Set the matching degree threshold; Obtaining the historical matching degree between the block and the block at the same position in the monitoring historical time; Analyze the magnitude relationship between the maximum matching degree and the historical matching degree, and combine the magnitude relationship between the maximum matching degree and the matching degree threshold to determine whether the block should be added to the database, thereby completing the improvement of the initial vehicle model; Analyzing the magnitude relationship between the maximum matching degree and the historical matching degree, and combining the magnitude relationship between the maximum matching degree and the matching degree threshold, determining whether the block is added to the database, including: If the maximum matching degree is not less than the historical matching degree and the maximum matching degree is greater than the matching degree threshold, the block is not added to the database; The maximum matching degree is not less than the historical matching degree, but the maximum matching degree is not greater than the matching degree threshold, and the block is added to the database; If the maximum matching degree is lower than the historical matching degree, the block will not be added to the database.

2. The vehicle entry and exit identification method for nested parking lots according to claim 1, characterized in that: Constructing a window in the initial vehicle model, analyzing the first grayscale feature of the window, and obtaining a window feature vector, including: In the initial vehicle model, a window is constructed with each pixel point as the starting position of the upper left corner, and the window size is the same as the block size; A window feature vector is obtained according to the grayscale value of a pixel in the initial vehicle model and the mean and standard deviation of the grayscale values ​​of all pixels in the window corresponding to the pixel.

3. The vehicle entry and exit identification method for nested parking lots according to claim 1, characterized in that: Analyze the second grayscale features of each block of the vehicle area in each frame image of the subsequent vehicle video to obtain a block feature vector, including: The grayscale value of the pixel at the upper left corner starting position of each block of the vehicle area in each frame image of the subsequent vehicle video, as well as the mean and standard deviation of the grayscale values ​​of all pixels in the block, are analyzed to obtain a block feature vector.

4. The vehicle entry and exit identification method for nested parking lots according to claim 1, characterized in that: According to the window feature vector and the block feature vector, the cosine similarity between each block of the vehicle area in each frame image of the subsequent vehicle video and each window in the initial vehicle model is analyzed to obtain a reference model window of the block, including: According to the window feature vector and the block feature vector, a cosine similarity between each block of the vehicle area in each frame image of the subsequent vehicle video and each window in the initial vehicle model is obtained; Set similarity threshold; The window corresponding to the block whose cosine similarity is greater than the similarity threshold is used as the reference model window of the block.

5. The vehicle entry and exit identification method for nested parking lots according to claim 1, characterized in that: Analyzing the matching degree between the block and the reference model window corresponding to the block within the eight neighborhoods of the block and the reference model window includes: The block and its corresponding eight-neighborhood block, the reference model window corresponding to the block and the eight-neighborhood window corresponding to the reference model window form a block-window combination; The grayscale similarity of all corresponding pixels in the block-window combination is analyzed to obtain the matching degree between the block and its corresponding reference model window.

6. The vehicle entry and exit identification method for nested parking lots according to claim 1, characterized in that: The vehicle video is preprocessed to obtain a vehicle area, including: By using semantic segmentation technology, each frame image of the vehicle video is segmented to obtain the vehicle area corresponding to each frame image.

7. A vehicle entry and exit recognition system for nested parking lots, characterized in that: The system comprises: a memory and a processor, wherein: The memory is used to store program code; The processor is configured to read the program code stored in the memory and execute the method according to any one of claims 1 to 6.

8. The vehicle entry and exit identification system for nested parking lots according to claim 7, characterized in that: The processor comprises: A vehicle area acquisition module is used to acquire a vehicle video when the vehicle passes through each gate, and pre-process the vehicle video to obtain a vehicle area; A vehicle data model building module, used for performing block processing on the vehicle area, and building an initial vehicle model according to the block information of the vehicle area in the first frame of vehicle video obtained when the vehicle passes through the first barrier; A feature vector analysis module, used for constructing a window in the initial vehicle model, analyzing a first grayscale feature of the window, and obtaining a window feature vector; and for analyzing a second grayscale feature of each block of a vehicle region in each frame of a subsequent vehicle video, and obtaining a block feature vector; A matching degree analysis module is used to analyze the cosine similarity between each block of the vehicle area in each frame image of the subsequent vehicle video and each window in the initial vehicle model according to the window feature vector and the block feature vector, so as to obtain the reference model window of the block; and then analyze the matching degree of the block and its corresponding reference model window within the eight neighborhoods of the block and the reference model window; The vehicle data model improvement module is used to perform block matching and improve the initial vehicle model based on the matching degree.

Citation Information

Patent Citations

  • Target tracking method based on improved judgment and generation combined model

    CN106204651A

  • Method and apparatus for controlling vehicle in and out based on embedded parking lot

    CN106558109A