[go: up one dir, main page]

CN113378690A - In-road irregular parking identification method based on video data - Google Patents

In-road irregular parking identification method based on video data Download PDF

Info

Publication number
CN113378690A
CN113378690A CN202110635239.6A CN202110635239A CN113378690A CN 113378690 A CN113378690 A CN 113378690A CN 202110635239 A CN202110635239 A CN 202110635239A CN 113378690 A CN113378690 A CN 113378690A
Authority
CN
China
Prior art keywords
parking
vehicle
image
judging
value
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.)
Withdrawn
Application number
CN202110635239.6A
Other languages
Chinese (zh)
Inventor
钟栋青
孔龙龙
杜建周
石小龙
韦凌翔
杨锦诚
胡化鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yancheng Institute of Technology
Original Assignee
Yancheng Institute of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yancheng Institute of Technology filed Critical Yancheng Institute of Technology
Priority to CN202110635239.6A priority Critical patent/CN113378690A/en
Publication of CN113378690A publication Critical patent/CN113378690A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/215Motion-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/254Analysis of motion involving subtraction of images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle
    • G06T2207/30264Parking

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种基于图像识别的路侧不规范停车识别方法,包括以下步骤:步骤1.车辆检测,在路侧停车区域设置视觉传感器采集视频图像序列,利用自适应阈值分割技术进行区域分割;步骤2.车辆跟踪,将步骤1中采集视频图像拆分成帧数图像,再在拆分过后的图像的基础上提取可识别车辆运动状态;步骤3.停车判断,对车辆状态判断为静止的车辆的图像进行Canny算子边缘检测;步骤4.停车特征提取,对连通区域的IoU进行计算;步骤5.停车行为识别。本发明利用监控视频信息分析车辆停车行为的原理方法和关键技术,提出构建不规范停车行为分类规则,基于视频数据的车辆特征提取方法,实现停车行为的自动识别,提高停车场智能化管理水平,拓展智慧停车应用范围。

Figure 202110635239

The invention discloses a roadside irregular parking recognition method based on image recognition, comprising the following steps: Step 1. Vehicle detection, setting a visual sensor in a roadside parking area to collect video image sequences, and using adaptive threshold segmentation technology to perform area segmentation ; Step 2. Vehicle tracking, splitting the video image collected in step 1 into frame number images, and then extracting the identifiable vehicle motion state on the basis of the split images; Step 3. Parking judgment, judging the vehicle state as static The image of the vehicle is detected by Canny operator; Step 4. Parking feature extraction, calculate the IoU of the connected area; Step 5. Parking behavior recognition. The invention uses monitoring video information to analyze the principle, method and key technology of vehicle parking behavior, proposes to construct irregular parking behavior classification rules, and a vehicle feature extraction method based on video data, realizes the automatic identification of parking behavior, and improves the intelligent management level of the parking lot. Expand the application scope of smart parking.

Figure 202110635239

Description

In-road irregular parking identification method based on video data
Technical Field
The invention relates to the technical field of in-road parking identification, in particular to an in-road irregular parking identification method based on video data.
Background
The number of motor vehicles has also increased dramatically due to the increasing speed of urban modernization and the rapid increase of urban population. With the increasing number of automobiles, problems related to urban traffic, such as illegal parking, parking dispute and the like, become more serious, and the on-road parking is a typical problem.
The manual management of parking spaces in roads has a lot of disadvantages, and managers often make ambiguous decisions and contradictions with vehicle owners, even cause discordant negative effects. Good in-road parking management is of great importance to road traffic, and only by finding out the existing parking problem and solving the specific problem, in-road parking can be managed, so that a clean and smooth urban road is built.
At present, the parking management of the traditional parking lot does not pay attention to the state of a parking vehicle, and particularly the parking state of a large parking lot cannot be monitored in time. Meanwhile, some car owners lack the consciousness of the car owners, so that illegal parking behaviors are generated, the behaviors not only influence the normal parking of other car owners to cause the waste of parking resources, but also increase the difficulty of parking management. Accidents such as parking scraping can be induced, and the urban civilization image is damaged.
At present, a large number of video monitoring devices are applied in the field of intelligent transportation, and video data comprise a large amount of parking data information and can be combined with different scenes to identify specific vehicle behaviors. In short, the intelligent application research of the on-road parking management plays a significant role in the development of intelligent transportation systems. The exploration of the irregular parking behavior identification method has great significance for the development of the intelligent in-road parking management system based on video data.
Disclosure of Invention
The invention aims to provide an in-road irregular parking recognition method based on video data, which is characterized in that an irregular parking behavior classification rule is constructed by a principle method and a key technology for analyzing a vehicle parking behavior by utilizing monitoring video information, and a vehicle feature extraction method based on the video data is provided, so that the automatic recognition of the parking behavior is realized, the intelligent management level of a parking lot is improved, and the intelligent parking application range is expanded.
In order to realize the purpose of the invention, the invention adopts the following technical scheme: an in-road irregular parking identification method based on video data comprises the following steps: step 1, vehicle detection, which specifically comprises the following operations: a visual sensor is arranged in a parking area in a road to acquire a video image sequence, and an adaptive threshold segmentation technology is utilized to segment the area;
step 2, tracking the vehicle, specifically operating as follows: splitting the video image acquired in the step 1 into frame number images, and extracting an identifiable vehicle motion state on the basis of the split images;
step 3, parking judgment, comprising the following specific operations: carrying out Canny operator edge detection on the image of the vehicle of which the vehicle state is judged to be static, and judging whether a jump-type change area exists according to the gray value and the texture characteristics of the image pixels in the step 2 by using an algorithm, namely judging whether the vehicle stops;
and 4, extracting parking characteristics, wherein the specific operation is as follows: IoU of the connected region is calculated, namely the ratio of the intersection and the union of the predicted frame of the parking region and the actual frame of the vehicle for actual parking is calculated, and whether the intersection behavior exists is judged;
and 5, identifying parking behaviors, and specifically operating as follows: judging the angle between the main shaft direction of the vehicle and the main shaft direction of the parking space to identify the parking behavior for the vehicle parked in an inclined position and parked transversely; for the vehicles placed in the reverse direction, judging the distance between the vehicles and the parking space and the direction of an arrow to identify parking behaviors; judging whether four corner points of the vehicle body outline are all in a parking area to identify parking behaviors for vehicles which are parked in a cross-parking position, are parked by pressing a line and are parked without keeping a reasonable vehicle distance; thereby obtaining the illegal parking information of the vehicle.
Preferably, in step 1, the segmentation is performed with the contrast between the object and the background in the image changing as a function of the slowly changing position in the image, and the n × n neighborhood of each pixel (n is an odd number to reduce the amount of computation, and usually n is 3 or 5) is used to count the neighborhood gray of the pixel:
Figure BDA0003105416740000031
Figure BDA0003105416740000032
T=M+T×S (1-3)
wherein M represents the average gray value of each pixel in a certain pixel neighborhood; n × n represents that the number of pixels in the horizontal direction (the number of columns) is n, the number of pixels in the vertical direction (the number of rows) is n, then the total pixels of the image are n × n pixels, the gray resolution j, k represents the minimum change distinguishable in the gray level, the (x, y) is a discrete coordinate, and the S represents the standard deviation of the pixel gray level in the neighborhood; t is a constant determined according to image quality (0< T < 1);
when the image quality is good, T takes a smaller value; when the image quality is poor, T takes a larger value; when dynamic adaptive binarization of the neighborhood is considered, T is a threshold value, the value is calculated according to the average gray level of the pixel neighborhood and the standard deviation of the gray level of the neighborhood pixels, and the image is segmented by adopting the dynamic adaptive threshold value T, so that a binarized image can be obtained:
Figure BDA0003105416740000033
preferably, in step 2, the motion state of the vehicle is determined based on a frame difference method, the frame difference method extracts the foreground object according to the image difference value of the previous frame and the next frame in the video, and the image of the previous frame is assumed to be I1The image of the current frame is I2For a certain point P (x, y) on the image, there is I in the two previous and next frames of images1(x, y) and I2(x, y), namely:
|I1(x, y) -I2(x,y)|>T (2-1)
Wherein T represents a designated threshold value and serves as a fault-tolerant mechanism for judging the vehicle state;
and (3) judging whether the point is a foreground or a background according to the formula (2-1), acquiring an average shaking threshold value according to the front and back displacement of the known stationary object, judging that the vehicle is in a moving state when the distance between two frames before and after the vehicle in an unknown state is greater than T, and judging that the vehicle is in a stationary state if the distance is less than T.
Preferably, in step 3, the Canny operator edge detection includes gaussian filtering, calculating gradient values and gradient directions, filtering non-maximum values, and detecting edges using upper and lower thresholds, where the upper and lower thresholds specifically include the following operations: an upper threshold and a lower threshold are determined, and edges above the lower threshold are both considered.
Preferably, the gaussian filtering specifically includes the following operations: for a pixel at a position (m, n), the gray value (only two-valued graph is considered here) is f (m, n), then the gray value after gaussian filtering becomes:
Figure BDA0003105416740000041
wherein, gσDenotes a two-dimensional Gaussian kernel with standard deviation σ, and mxn denotes the number of pixels in the horizontal direction (column)The number is m, the number of pixels (line number) in the longitudinal direction is n, and then the total pixels of the image are m multiplied by n pixels;
and multiplying each pixel point and the neighborhood thereof by a Gaussian matrix, and taking the weighted average value of the pixel points as the final gray value.
Preferably, the calculating the gradient value and the gradient direction specifically includes the following operations: the edge is the collection of pixel points with large gray value change, the middle of a black edge and a white edge is the edge, the gray value change of the edge is the maximum, the change degree and the direction of the gray value are represented by gradient, and gradient values g in different directions are obtained by multiplying points by a sobel or other operatorsx(m,n),gy(m,n);
The integrated gradient calculates the gradient value and the gradient direction by the following formulas:
Figure BDA0003105416740000042
Figure BDA0003105416740000043
wherein G (m, n) is a gradient value, and θ is a gradient direction.
Preferably, the filtering non-maximum specifically includes the following operations: using a Sobel edge detection algorithm to filter points which are not edges, and enabling the width of the edges to be 1 pixel point as far as possible: if a pixel belongs to the edge, the gradient value of the pixel in the gradient direction is the maximum, if not, the gray value is set to be 0:
Figure BDA0003105416740000051
wherein M isTFor the binary image, M is the original image, and T is the segmentation threshold.
Preferably, in step 5, the following operations are specifically included for the vehicle parking in the inclined position and the vehicle parking in the transverse direction: setting an angle theta between the main shaft direction of the vehicle and the main shaft direction of the parking space, and judging that the vehicle body deflection angle is in a reasonable range when the theta is less than or equal to th1 by setting an inclination threshold th1 and a transverse stopping threshold th 2; otherwise, continuously judging theta, if the condition is met, the vehicle is in the transverse parking mode in the non-standard parking, and if not, the vehicle is in the inclined parking mode.
Preferably, in step 5, the following operations are specifically included for the vehicles which are parked across a parking space, parked under a pressing line and parked without keeping a reasonable parking space: the method comprises the steps of (1) judging four contour angles of a vehicle body as P1'(XP1', Yp1'), P2' (XP2', Yp2'), P3'(XP3', YP3'), P4' (XP4', Yp4'), and judging whether the vehicle possibly has a cross-position or line pressing behavior in the next step if at least one of the four corner points of the vehicle body contour is not in a current parking area, wherein the four contour angles of the vehicle body are respectively judged to be in the current parking area (x is more than or equal to m1 and is less than or equal to m2, and n1 is more than or equal to n 2); judging four contour angles of the vehicle body and corner points (x is more than or equal to m2 and less than or equal to m3, and y is more than or equal to n1 and less than or equal to n2) of adjacent parking lots, judging the vehicle body to be a cross parking behavior when at least one corner point exists in the range of the adjacent parking areas, and otherwise, judging the vehicle body to be a line pressing parking behavior; if the four corners of the vehicle body contour are all in the range of the current parking area, setting a safety threshold value d, judging that the vehicle is safe to park when all the corners of the vehicle body contour meet the requirements (m1+ d is larger than or equal to x and smaller than or equal to m 2-d, n1 is larger than or equal to y and smaller than or equal to n2), and otherwise, judging that the vehicle does not keep a reasonable distance.
Preferably, the safety threshold d is set to 0.25 m.
Compared with the prior art, the method for identifying the irregular parking in the road based on the video data has the following advantages that: by adopting the video data-based in-road irregular parking recognition method, the principle method and the key technology for analyzing the vehicle parking behavior by utilizing the monitoring video information are utilized, the irregular parking behavior classification rule is established, the vehicle feature extraction method based on the video data is adopted, the automatic recognition of the parking behavior is realized, the intelligent management level of a parking lot is improved, and the intelligent parking application range is expanded.
Drawings
FIG. 1 is a schematic flow chart illustrating an embodiment of an in-road irregular parking recognition method based on video data according to the present invention;
FIG. 2 is a schematic diagram illustrating a state of the method for identifying a parking position of a vehicle in an inclined position according to the present embodiment;
FIG. 3 is a schematic view showing a state where the vehicle is stopped laterally in the present embodiment;
FIG. 4 is a schematic view illustrating a state of the vehicle parking across positions in the present embodiment;
FIG. 5 is a schematic view illustrating a state where the vehicle is pressed and stopped;
FIG. 6 is a schematic view of the present embodiment in a state where the vehicle does not maintain a reasonable vehicle distance;
FIG. 7 is a schematic view showing a reverse parking state of the vehicle according to the present embodiment;
fig. 8 is a diagram of an edge pixel point set in the present embodiment.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.
Fig. 1 is a schematic flow chart of an in-road irregular parking identification method based on video data, which includes the following steps: step 1, vehicle detection, which specifically comprises the following operations: and arranging a visual sensor in the in-road parking area to acquire a video image sequence, and performing area segmentation by using a self-adaptive threshold segmentation technology.
The grey value of the background is changed and the contrast between the object and the background is also changed in the image, a well functioning threshold in one area of the image may not work well in other areas. The grey scale threshold is taken as a function that changes slowly with position in the image, taking into account the effect of the background on the current target, since the threshold is dynamically changing. Segmentation is performed with a change in contrast between the object and the background in the image, counting the neighborhood gray levels of the pixels using an n × n neighborhood (n is an odd number to reduce the amount of computation, typically n is 3 or 5) for each pixel:
Figure BDA0003105416740000071
Figure BDA0003105416740000072
T=M+T×S (1-3)
wherein M represents the average gray value of each pixel in a certain pixel neighborhood; n × n represents that the number of pixels in the horizontal direction (the number of columns) is n, the number of pixels in the vertical direction (the number of rows) is n, then the total pixels of the image are n × n pixels, the gray resolution j, k represents the minimum change distinguishable in the gray level, the (x, y) is a discrete coordinate, and the S represents the standard deviation of the pixel gray level in the neighborhood; t is a constant determined according to image quality (0< T < 1).
When the image quality is good, T takes a smaller value; when the image quality is poor, T takes a larger value; when dynamic adaptive binarization of the neighborhood is considered, T is a threshold value, the value is calculated according to the average gray level of the pixel neighborhood and the standard deviation of the gray level of the neighborhood pixels, and the image is segmented by adopting the dynamic adaptive threshold value T, so that a binarized image can be obtained:
Figure BDA0003105416740000073
the threshold value T is an adaptive binarization process because its size depends on the location of the pixel, with each pixel having a different threshold value.
Step 2, tracking the vehicle, specifically operating as follows: splitting the video image acquired in the step 1 into frame number images, and extracting an identifiable vehicle motion state on the basis of the split images;
judging the motion state of the vehicle based on a frame difference method, wherein the frame difference method extracts a foreground target according to the image difference value of the front frame and the rear frame in the video, and the image of the front frame is assumed to be I1The image of the current frame is I2For a certain point P (x, y) on the image, there is I in the two previous and next frames of images1(x, y) and I2(xY), namely:
|I1(x, y) -I2(x,y)|>T (2-1)
Wherein T represents a designated threshold value and serves as a fault-tolerant mechanism for judging the vehicle state;
and (3) judging whether the point is a foreground or a background according to the formula (2-1), acquiring an average shaking threshold value according to the front and back displacement of the known stationary object, judging that the vehicle is in a moving state when the distance between two frames before and after the vehicle in an unknown state is greater than T, and judging that the vehicle is in a stationary state if the distance is less than T.
Step 3, parking judgment, comprising the following specific operations: carrying out Canny operator edge detection on the image of the vehicle of which the vehicle state is judged to be static, and judging whether a jump-type change area exists according to the gray value and the texture characteristics of the image pixels in the step 2 by using an algorithm, namely judging whether the vehicle stops;
the Canny operator edge detection comprises Gaussian filtering, gradient value and gradient direction calculation, non-maximum value filtering and edge detection by using upper and lower thresholds, wherein the upper and lower thresholds are used for detecting the edge and specifically comprise the following operations: an upper threshold and a lower threshold are determined, and edges above the lower threshold are both considered.
The main purpose of filtering is noise reduction, and general image processing algorithms need noise reduction firstly. While gaussian filtering mainly smoothes (blurs) the image and also possibly increases the width of the edges, a gaussian function is a function similar to a normal distribution with a large middle and small sides.
The method specifically comprises the following operations: for a pixel at a position (m, n), the gray value (only two-valued graph is considered here) is f (m, n), then the gray value after gaussian filtering becomes:
Figure BDA0003105416740000081
wherein, gσRepresenting a two-dimensional gaussian kernel with a standard deviation σ, mxn represents the number of pixels in the horizontal direction (column number) m and the number of pixels in the vertical direction (row number) n, the total pixels of the image are mxn pixels.
And multiplying each pixel point and the neighborhood thereof by a Gaussian matrix, and taking the weighted average value of the pixel points as the final gray value.
Calculating the gradient values and gradient directions specifically includes the following operations: the edge is a set of pixels with large gray value variation, the middle of a black edge and a white edge is the edge, as shown in fig. 8, the edge is an edge pixel point set graph, and the gray value variation of the edge is the maximum, as shown in fig. 8. Gradient is used to express the change degree and direction of gray value, and gradient value g in different directions is obtained by multiplying a point by a sobel or other operatorsx(m,n),gy(m,n);
The integrated gradient calculates the gradient value and the gradient direction by the following formulas:
Figure BDA0003105416740000091
Figure BDA0003105416740000092
wherein G (m, n) is a gradient value, and θ is a gradient direction.
Filtering the non-maximum values specifically comprises the following operations: using a Sobel edge detection algorithm to filter points which are not edges, and enabling the width of the edges to be 1 pixel point as far as possible: if a pixel belongs to the edge, the gradient value of the pixel in the gradient direction is the maximum, if not, the gray value is set to be 0:
Figure BDA0003105416740000093
wherein M isTFor the binary image, M is the original image, and T is the segmentation threshold.
The algorithm judges whether a jump-type change area exists according to the characteristics of gray values, textures and the like of pixels in the image. When the function is used for representation, it is represented whether the function image has a drastic change. And carrying out noise reduction on the original image through a Gaussian filter function.
And 4, extracting parking characteristics, wherein the specific operation is as follows: IoU of the connected region is calculated, namely the ratio of the intersection and the union of the predicted frame of the parking region and the actual frame of the vehicle for actual parking is calculated, and whether the intersection behavior exists is judged;
in mathematical morphological operations, dilation and decay are the cornerstones of other complex morphological transformations, which simply combine in sequence to form an open-closed operation. The principle of extracting the image edges by using mathematical morphology is mainly based on some basic properties of morphological transformation, and the edges of the image to be detected can be obtained by performing difference between the result of simple morphological transformation of the image to be detected and the image to be detected, or by performing difference between various morphological transformations. Different from the traditional method, the method is simple to operate and has definite geometric significance. Furthermore, by adjusting the shape of the structural element, corresponding edge information can be obtained.
And 5, identifying parking behaviors, and specifically operating as follows: judging the angle between the main shaft direction of the vehicle and the main shaft direction of the parking space to identify the parking behavior for the vehicle parked in an inclined position and parked transversely; for the vehicles placed in the reverse direction, judging the distance between the vehicles and the parking space and the direction of an arrow to identify parking behaviors; judging whether four corner points of the vehicle body outline are all in a parking area to identify parking behaviors for vehicles which are parked in a cross-parking position, are parked by pressing a line and are parked without keeping a reasonable vehicle distance; thereby obtaining the illegal parking information of the vehicle.
As shown in fig. 2, a state diagram of the vehicle parking in an inclined position and as shown in fig. 3, a state diagram of the vehicle parking in a transverse position, specifically comprising the following operations for the vehicle parking in an inclined position and the vehicle parking in a transverse position: setting an angle theta between the main shaft direction of the vehicle and the main shaft direction of the parking space, and judging that the vehicle body deflection angle is in a reasonable range when the theta is less than or equal to th1 by setting an inclination threshold th1 and a transverse stopping threshold th 2; otherwise, continuously judging theta, if the condition is met, the vehicle is in the transverse parking mode in the non-standard parking, and if not, the vehicle is in the inclined parking mode.
The observation shows that when the included angle is larger than 15 degrees, an observer can obtain a normal front or back visual angle, when the included angle is smaller than 45 degrees, the complete front or back information of the vehicle can be obtained, but the information of the vehicle, the vehicle logo, the license plate and the like is obviously deviated, and when the included angle is larger than 45 degrees, the front or back information of the vehicle body is partially lost, and only the side information of the vehicle body can be obtained. Therefore, the determination thresholds th1 and th2 are set to 15 ° and 45 °.
Fig. 4 is a schematic diagram showing a state of a vehicle parking across a parking space, fig. 5 is a schematic diagram showing a state of a vehicle parking under pressure line, fig. 6 is a schematic diagram showing a state of a vehicle not keeping a reasonable parking space, and the method specifically includes the following operations for the vehicle parking across a parking space, parking under pressure line and parking under a condition that a reasonable parking space is not kept: the method comprises the steps of (1) judging four contour angles of a vehicle body as P1'(XP1', Yp1'), P2' (XP2', Yp2'), P3'(XP3', YP3'), P4' (XP4', Yp4'), and judging whether the vehicle possibly has a cross-position or line pressing behavior in the next step if at least one of the four corner points of the vehicle body contour is not in a current parking area, wherein the four contour angles of the vehicle body are respectively judged to be in the current parking area (x is more than or equal to m1 and is less than or equal to m2, and n1 is more than or equal to n 2); judging four contour angles of the vehicle body and corner points (x is more than or equal to m2 and less than or equal to m3, and y is more than or equal to n1 and less than or equal to n2) of adjacent parking lots, judging the vehicle body to be a cross parking behavior when at least one corner point exists in the range of the adjacent parking areas, and otherwise, judging the vehicle body to be a line pressing parking behavior; if the four corners of the vehicle body contour are all in the range of the current parking area, setting a safety threshold value d, judging that the vehicle is safe to park when all the corners of the vehicle body contour meet the requirements (m1+ d is larger than or equal to x and smaller than or equal to m 2-d, n1 is larger than or equal to y and smaller than or equal to n2), and otherwise, judging that the vehicle does not keep a reasonable distance. Referring to the parking space marking standard and property classification standard, the safety threshold d is set to be 0.25 m.
As shown in fig. 7, which is a schematic view of a reverse parking state of a vehicle, if a monitoring camera is disposed right ahead of a parking space, a overlooking view angle with a certain inclination angle is adopted, and detection of the reverse parking is determined by detecting whether the vehicle is a head or a tail of the vehicle. If the parking direction indicator lamp displays that the parking direction is ahead, and the monitoring video detects that the vehicle is ahead, the parking direction of the vehicle is judged to be ahead; otherwise, if the tail of the vehicle is detected, the vehicle is judged to be in reverse parking.
The method selects the parking spaces in the road of the elegant residence community in the Tangshan street of Jiangning district in Nanjing to carry out shooting experiments, the parking space length is 6000mm, and the width is 2500mm, so that the algorithm is experimentally verified on real video data of the road parking behaviors. The non-standard parking behaviors mainly aiming at typical 6 in-road parking spaces are as follows: inclined parking, transverse parking, cross parking, line pressing parking, unreasonable parking distance maintenance and reverse parking.
In the experimental process, a vehicle parking video shot by parking spaces in the road of the elegant residence community in the soup of the Tangshan street in Jiangning district of Nanjing city is selected, the video format is mp4, the resolution is 960 × 540, and the actual shooting scene is shown in figure 2. The test image recording was 16s long for a total of 450 frames. And acquiring a static image of the target vehicle every 15 frames in the video image sequence, and performing vehicle identification and tracking on the acquired 30 frames of images. Practical tests show that the system can accurately identify the irregular parking behaviors of the parked vehicles staying in the in-road parking spaces.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.

Claims (10)

1. An in-road irregular parking identification method based on video data is characterized in that: the method comprises the following steps: step 1, vehicle detection, which specifically comprises the following operations: a visual sensor is arranged in a parking area in a road to acquire a video image sequence, and an adaptive threshold segmentation technology is utilized to segment the area;
step 2, tracking the vehicle, specifically operating as follows: splitting the video image acquired in the step 1 into frame number images, and extracting an identifiable vehicle motion state on the basis of the split images;
step 3, parking judgment, comprising the following specific operations: carrying out Canny operator edge detection on the image of the vehicle of which the vehicle state is judged to be static, and judging whether a jump-type change area exists according to the gray value and the texture characteristics of the image pixels in the step 2 by using an algorithm, namely judging whether the vehicle stops;
and 4, extracting parking characteristics, wherein the specific operation is as follows: IoU of the connected region is calculated, namely the ratio of the intersection and the union of the predicted frame of the parking region and the actual frame of the vehicle for actual parking is calculated, and whether the intersection behavior exists is judged;
and 5, identifying parking behaviors, and specifically operating as follows: judging the angle between the main shaft direction of the vehicle and the main shaft direction of the parking space to identify the parking behavior for the vehicle parked in an inclined position and parked transversely; for the vehicles placed in the reverse direction, judging the distance between the vehicles and the parking space and the direction of an arrow to identify parking behaviors; judging whether four corner points of the vehicle body outline are all in a parking area to identify parking behaviors for vehicles which are parked in a cross-parking position, are parked by pressing a line and are parked without keeping a reasonable vehicle distance; thereby obtaining the illegal parking information of the vehicle.
2. The video-data-based in-road irregular parking recognition method according to claim 1, wherein: in step 1, the gray threshold is divided as a function of the position in the image, which varies slowly, with the contrast between the object and the background in the image varying, and the neighborhood gray of the pixel is counted using an n × n neighborhood of each pixel (n is an odd number to reduce the amount of computation, typically n is 3 or 5):
Figure FDA0003105416730000011
Figure FDA0003105416730000021
T=M+T×S (1-3)
wherein M represents the average gray value of each pixel in a certain pixel neighborhood; n × n represents that the number of pixels in the horizontal direction (the number of columns) is n, the number of pixels in the vertical direction (the number of rows) is n, then the total pixels of the image are n × n pixels, the gray resolution j, k represents the minimum change distinguishable in the gray level, the (x, y) is a discrete coordinate, and the S represents the standard deviation of the pixel gray level in the neighborhood; t is a constant determined according to image quality (0< T < 1);
when the image quality is good, T takes a smaller value in the range of 0-1; when the image quality is poor, T takes a larger value in the range of 0-1; when dynamic adaptive binarization of the neighborhood is considered, T is a threshold value, the value is calculated according to the average gray level of the pixel neighborhood and the standard deviation of the gray level of the neighborhood pixels, and the image is segmented by adopting the dynamic adaptive threshold value T, so that a binarized image can be obtained:
Figure FDA0003105416730000022
3. the video-data-based in-road irregular parking recognition method according to claim 1, wherein: in step 2, the motion state of the vehicle is judged based on a frame difference method, the frame difference method extracts a foreground target according to the image difference value of the front frame and the rear frame in the video, and the image of the front frame is assumed to be I1The image of the current frame is I2For a certain point P (x, y) on the image, there is I in the two previous and next frames of images1(x, y) and I2(x, y), namely:
|I1(x, y) -I2(x,y)|>T (2-1)
Wherein T represents a designated threshold value and serves as a fault-tolerant mechanism for judging the vehicle state;
and (3) judging whether the point is a foreground or a background according to the formula (2-1), acquiring an average shaking threshold value according to the front and back displacement of the known stationary object, judging that the vehicle is in a moving state when the distance between two frames before and after the vehicle in an unknown state is greater than T, and judging that the vehicle is in a stationary state if the distance is less than T.
4. The video-data-based in-road irregular parking recognition method according to claim 1, wherein: in step 3, Canny operator edge detection includes gaussian filtering, calculating gradient values and gradient directions, filtering non-maximum values, and detecting edges using upper and lower thresholds, where the upper and lower thresholds specifically include the following operations: an upper threshold and a lower threshold are determined, and edges above the lower threshold are both considered.
5. The video-data-based in-road irregular parking recognition method as claimed in claim 4, wherein: the gaussian filtering specifically comprises the following operations: for a pixel at a position (m, n), the gray value (only two-valued graph is considered here) is f (m, n), then the gray value after gaussian filtering becomes:
Figure FDA0003105416730000031
wherein, gσRepresenting a two-dimensional Gaussian kernel with standard deviation sigma, wherein m × n represents that the number of pixels in the transverse direction (column number) is m, and the number of pixels in the longitudinal direction (row number) is n, so that the total pixels of the image are m × n pixels;
and multiplying each pixel point and the neighborhood thereof by a Gaussian matrix, and taking the weighted average value of the pixel points as the final gray value.
6. The video-data-based in-road irregular parking recognition method as claimed in claim 5, wherein: the calculating of the gradient value and the gradient direction specifically includes the following operations: the edge is the collection of pixel points with large gray value change, the middle of a black edge and a white edge is the edge, the gray value change of the edge is the maximum, the change degree and the direction of the gray value are represented by gradient, and gradient values g in different directions are obtained by multiplying points by a sobel or other operatorsx(m,n),gy(m,n);
The integrated gradient calculates the gradient value and the gradient direction by the following formulas:
Figure FDA0003105416730000032
Figure FDA0003105416730000033
wherein G (m, n) is a gradient value, and θ is a gradient direction.
7. The video-data-based in-road irregular parking recognition method as claimed in claim 6, wherein: the filtering non-maximum value specifically comprises the following operations: using a Sobel edge detection algorithm to filter points which are not edges, and enabling the width of the edges to be 1 pixel point as far as possible: if a pixel belongs to the edge, the gradient value of the pixel in the gradient direction is the maximum, if not, the gray value is set to be 0:
Figure FDA0003105416730000041
wherein M isTFor the binary image, M is the original image, and T is the segmentation threshold.
8. The video-data-based in-road irregular parking recognition method according to claim 1, wherein: in step 5, for the vehicle parking in the inclined position and the vehicle parking in the transverse direction, the following operations are specifically included: setting an angle theta between the main shaft direction of the vehicle and the main shaft direction of the parking space, and judging that the vehicle body deflection angle is in a reasonable range when the theta is less than or equal to th1 by setting an inclination threshold th1 and a transverse stopping threshold th 2; otherwise, continuously judging theta, if the condition is met, the vehicle is in the transverse parking mode in the non-standard parking, and if not, the vehicle is in the inclined parking mode.
9. The video-data-based in-road irregular parking recognition method according to claim 1, wherein: in step 5, the following operations are specifically included for the vehicles which are parked across the parking space, parked under the condition of pressing the line and parked under the condition that the reasonable parking space is not kept: the method comprises the steps of (1) judging four contour angles of a vehicle body as P1'(XP1', Yp1'), P2' (XP2', Yp2'), P3'(XP3', YP3'), P4' (XP4', Yp4'), and judging whether the vehicle possibly has a cross-position or line pressing behavior in the next step if at least one of the four corner points of the vehicle body contour is not in a current parking area, wherein the four contour angles of the vehicle body are respectively judged to be in the current parking area (x is more than or equal to m1 and is less than or equal to m2, and n1 is more than or equal to n 2); judging four contour angles of the vehicle body and corner points (x is more than or equal to m2 and less than or equal to m3, and y is more than or equal to n1 and less than or equal to n2) of adjacent parking lots, judging the vehicle body to be a cross parking behavior when at least one corner point exists in the range of the adjacent parking areas, and otherwise, judging the vehicle body to be a line pressing parking behavior; if the four corners of the vehicle body contour are all in the range of the current parking area, setting a safety threshold value d, judging that the vehicle is safe to park when all the corners of the vehicle body contour meet the requirements (m1+ d is larger than or equal to x and smaller than or equal to m 2-d, n1 is larger than or equal to y and smaller than or equal to n2), and otherwise, judging that the vehicle does not keep a reasonable distance.
10. The video-data-based in-road irregular parking recognition method as claimed in claim 9, wherein: the safety threshold d is set to 0.25 m.
CN202110635239.6A 2021-06-08 2021-06-08 In-road irregular parking identification method based on video data Withdrawn CN113378690A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110635239.6A CN113378690A (en) 2021-06-08 2021-06-08 In-road irregular parking identification method based on video data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110635239.6A CN113378690A (en) 2021-06-08 2021-06-08 In-road irregular parking identification method based on video data

Publications (1)

Publication Number Publication Date
CN113378690A true CN113378690A (en) 2021-09-10

Family

ID=77576302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110635239.6A Withdrawn CN113378690A (en) 2021-06-08 2021-06-08 In-road irregular parking identification method based on video data

Country Status (1)

Country Link
CN (1) CN113378690A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113643544A (en) * 2021-10-13 2021-11-12 南通东信车厢制造有限公司 Intelligent detection method and system for illegal parking in parking lot based on Internet of things
CN114220040A (en) * 2021-11-10 2022-03-22 浙江大华技术股份有限公司 Parking method, terminal and computer-readable storage medium
CN114627676A (en) * 2022-02-24 2022-06-14 深圳市小马控股有限公司 Intelligent vehicle parking method, system, server and storage medium
CN114724093A (en) * 2022-03-30 2022-07-08 深圳市捷顺科技实业股份有限公司 Vehicle parking violation identification method and related equipment
CN114972276A (en) * 2022-06-05 2022-08-30 长沙烽铭智能科技有限公司 Automatic driving distance judgment algorithm for vehicle
CN115131892A (en) * 2022-05-27 2022-09-30 广州高新兴机器人有限公司 Abnormal parking detection method, device, medium and equipment based on patrol robot
CN118037231A (en) * 2024-03-07 2024-05-14 杭州央博科技有限公司 SAAS-based intelligent park management system and method
CN114220040B (en) * 2021-11-10 2025-03-28 浙江大华技术股份有限公司 Parking method, terminal and computer-readable storage medium

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113643544A (en) * 2021-10-13 2021-11-12 南通东信车厢制造有限公司 Intelligent detection method and system for illegal parking in parking lot based on Internet of things
CN113643544B (en) * 2021-10-13 2022-06-07 南通东信车厢制造有限公司 Intelligent detection method and system for illegal parking in parking lot based on Internet of things
CN114220040A (en) * 2021-11-10 2022-03-22 浙江大华技术股份有限公司 Parking method, terminal and computer-readable storage medium
CN114220040B (en) * 2021-11-10 2025-03-28 浙江大华技术股份有限公司 Parking method, terminal and computer-readable storage medium
CN114627676A (en) * 2022-02-24 2022-06-14 深圳市小马控股有限公司 Intelligent vehicle parking method, system, server and storage medium
CN114724093A (en) * 2022-03-30 2022-07-08 深圳市捷顺科技实业股份有限公司 Vehicle parking violation identification method and related equipment
CN115131892A (en) * 2022-05-27 2022-09-30 广州高新兴机器人有限公司 Abnormal parking detection method, device, medium and equipment based on patrol robot
CN115131892B (en) * 2022-05-27 2024-06-04 广州高新兴机器人有限公司 Abnormal parking detection method, device, medium and equipment based on patrol robot
CN114972276A (en) * 2022-06-05 2022-08-30 长沙烽铭智能科技有限公司 Automatic driving distance judgment algorithm for vehicle
CN118037231A (en) * 2024-03-07 2024-05-14 杭州央博科技有限公司 SAAS-based intelligent park management system and method
CN118037231B (en) * 2024-03-07 2024-08-13 杭州央博科技有限公司 SAAS-based intelligent park management system and method

Similar Documents

Publication Publication Date Title
CN113378690A (en) In-road irregular parking identification method based on video data
CN106652465B (en) Method and system for identifying abnormal driving behaviors on road
DE112013001858B4 (en) Multiple-hint object recognition and analysis
CN110210451B (en) A zebra crossing detection method
CN107066986A (en) A kind of lane line based on monocular vision and preceding object object detecting method
CN110298300B (en) Method for detecting vehicle illegal line pressing
KR101565978B1 (en) Method of identifying vehicle number and extracting photographic evidences using long distance captured image
CN103034862A (en) Road snow and rain state automatic identification method based on feature information classification
CN111382704A (en) Vehicle line-pressing violation judgment method and device based on deep learning and storage medium
CN107895492A (en) A kind of express highway intelligent analysis method based on conventional video
CN106815583B (en) Method for positioning license plate of vehicle at night based on combination of MSER and SWT
CN110619279A (en) Road traffic sign instance segmentation method based on tracking
CN104978567A (en) Vehicle detection method based on scenario classification
Ji et al. Video-based construction vehicles detection and its application in intelligent monitoring system
Rabiu Vehicle detection and classification for cluttered urban intersection
Arunmozhi et al. Stop sign and stop line detection and distance calculation for autonomous vehicle control
CN109977772B (en) Zebra crossing concession behavior detection method based on vehicle-mounted automobile data recorder video
Biswas et al. Detection of traffic rule violations using machine learning: An analytical review
CN110782485A (en) Vehicle lane change detection method and device
Ghosh et al. A vehicle number plate recognition system using region-of-interest based filtering method
Kaur et al. An Efficient Method of Number Plate Extraction from Indian Vehicles Image
CN115880901A (en) Traffic violation real-time flow monitoring method and system based on bus-mounted video
Chai et al. Vehicle queue length measurement based on a modified local variance and lbp
Kansal et al. Real time system for vehicle counting with speed estimation and license plate detection
Lu et al. Shadow removal based on shadow direction and shadow attributes

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20210910

WW01 Invention patent application withdrawn after publication