CN110164139B - System and method for detecting and identifying side parking - Google Patents

System and method for detecting and identifying side parking Download PDF

Info

Publication number
CN110164139B
CN110164139B CN201910466245.6A CN201910466245A CN110164139B CN 110164139 B CN110164139 B CN 110164139B CN 201910466245 A CN201910466245 A CN 201910466245A CN 110164139 B CN110164139 B CN 110164139B
Authority
CN
China
Prior art keywords
license plate
vehicle
picture
magnetic field
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910466245.6A
Other languages
Chinese (zh)
Other versions
CN110164139A (en
Inventor
张晨
孙怡琳
徐英豪
史治国
陈积明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN201910466245.6A priority Critical patent/CN110164139B/en
Publication of CN110164139A publication Critical patent/CN110164139A/en
Application granted granted Critical
Publication of CN110164139B publication Critical patent/CN110164139B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/017Detecting movement of traffic to be counted or controlled identifying vehicles
    • G08G1/0175Detecting movement of traffic to be counted or controlled identifying vehicles by photographing vehicles, e.g. when violating traffic rules
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/04Detecting movement of traffic to be counted or controlled using optical or ultrasonic detectors
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/042Detecting movement of traffic to be counted or controlled using inductive or magnetic detectors
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/14Traffic control systems for road vehicles indicating individual free spaces in parking areas
    • G08G1/149Traffic control systems for road vehicles indicating individual free spaces in parking areas coupled to means for restricting the access to the parking space, e.g. authorization, access barriers, indicative lights

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Traffic Control Systems (AREA)
  • Character Discrimination (AREA)

Abstract

The invention discloses a lateral parking detection and identification system and a lateral parking detection and identification method. The invention uses the triaxial geomagnetic sensor to detect the magnetic field change data of the vehicle, and uses finite state algorithm to process the data to obtain the signal of the vehicle, and the signal drives the camera to photograph the license plate part. And converting the photographed image data containing the license plate into a one-dimensional array, and uploading the array content to a server side in a data stream mode by using a method of transmitting a TCP (transmission control protocol) data packet by using an NB-IoT (NB-IoT) module. And finally, the data stream is restored into a picture format through specific processing at the server terminal, the content of the license plate is identified by using a specific license plate identification algorithm, and the final result is stored at the server terminal in the form of a picture and a character string. Compared with the prior art, the method has the characteristics of high pertinence and high identification precision of the side parking scene, and realizes automation and intellectualization of side parking information management.

Description

System and method for detecting and identifying side parking
Technical Field
The invention belongs to the field of vehicle information management, and particularly relates to a side parking detection and identification system and method.
Background
With the economic development, the number of vehicles continues to increase, and the problem of difficult parking needs to be solved urgently. At present, a plurality of large parking lots for parking vehicles are available in urban areas, but the parking lots are fixed in position and sparse in distribution, and the parking lots are difficult to cover all parking requirements. In the daily life of vast residents, a scattered roadside side parking scene is more common.
Some existing electronic vehicle information management systems are already applied to parking lots in a large scale, for example, automatic lifting railings based on cameras at parking lot inlets, license plate information identification and the like. However, in a roadside side parking scene, due to high vehicle mobility, low parking space uniformity and small scale, the technology related to the parking lot is difficult to apply. Therefore, it is necessary to develop a side parking detection and recognition method and system.
Disclosure of Invention
The invention aims to provide a system and a method for detecting and identifying side parking, which realize automatic and intelligent management of roadside side parking information.
In order to achieve the purpose, the invention adopts the following technical scheme: the side parking detection and identification system is characterized by comprising a geomagnetic detection module, an MCU (micro controller Unit), a camera module, an NB-IoT (Narrow Band Internet of Things) module and a server.
The geomagnetic detection module is used for acquiring X, Y, Z magnetic field data in three-axis directions under a rectangular coordinate system of the space of the lateral parking space and sending the acquired data to the MCU;
the MCU receives magnetic field data sent by the geomagnetic detection module, obtains a signal of whether a vehicle enters or not through a finite state machine and a threshold detection algorithm, and drives the camera module to take a picture when the vehicle entering is detected; receiving the vehicle head license plate pictures collected by the camera module, and transmitting the vehicle head license plate pictures to the server through the NB-IoT module in a data stream mode;
the camera module is used for shooting images of a vehicle head license plate of a driven vehicle;
and the server restores the data stream of the picture and obtains a license plate recognition result by using a license plate recognition algorithm.
Further, the geomagnetic detection module comprises three TMR2012 tunnel resistance magnetic sensor chips, and the arrangement direction is X, Y, Z triaxial direction under the space rectangular coordinate system, and a triaxial geomagnetic sensor is formed together. The geomagnetic detection module is placed at the top of a rectangular boundary of the side parking space and is positioned on the roadbed stone and obliquely faces the side parking space to be detected. The space rectangular coordinate system takes the position of the geomagnetic sensing module as an original point, and the X axis refers to the vehicle length direction of a parking space at the side; the Y axis is perpendicular to the X axis in the same plane and points to the direction of the vehicle width; the Z-axis refers to the direction facing vertically upwards. The geomagnetic detection module detects magnetic field data of the placement position and outputs an analog signal to the MCU.
Further, the output signal of the triaxial geomagnetic sensor obtains a signal for detecting whether a vehicle enters or not through a finite-state machine and a threshold detection algorithm in the MCU, and the algorithm comprises the following steps:
let MRIs the result of the current magnetic field data calculated at each moment, and the calculation formula is MR=aMx+bMy+cMzWhere a, b, c respectively correspond to X, Y, Z-axis TMR2012 output analog signal weight, and a > b > c is required.
Let T1 be the magnetic field difference threshold between the vehicle (the vehicle completely enters the parking space) and the vehicle not, T2 be the magnetic field difference threshold between the magnetic field when the vehicle is driven away (all tires of the vehicle completely leave the parking space) and the background magnetic field (the vehicle does not exist in the parking space), the relation of T1 > T2 exists, T2 is allowed to be 0, and T1 and T2 select different experience thresholds according to the use scene.
Let MRBAnd MRCMagnetic field data of the non-vehicle state and the vehicle state are respectively shown.
The operation of the finite state machine is described as follows:
(1) electrifying the triaxial geomagnetic sensor in the non-vehicle state, acquiring and storing background magnetic field data, and recording the background magnetic field data as MRB
(2) If the vehicle is not in a vehicle state, the three-axis geomagnetic sensor can acquire M at a certain frequencyRIf: mR>MRBAnd MR-MRBIf T1 is exceeded, the vehicle input signal car in is output and M is simultaneously assertedRC=MR
(3) If the vehicle is in a current state, the three-axis geomagnetic sensor can acquire M at a certain frequencyRIf: mR<MRCAnd MR-MRBIf < T2, a vehicle driving-away signal car department is output while causing M to be presentRC=0。
Further, the detected entry signal drives a camera module to take a picture, and the camera module is ATK-OV 7725. The photographed picture containing the license plate is in a matrix of RGB565 pixels with QVGA (resolution of 320 × 240).
Further, the MCU converts the picture pixel matrix into a data stream, and transmits the data stream to the server in a manner of sending TCP (Transmission Control Protocol) packets using the NB-IoT module.
Further, the method for restoring the data stream of the picture by the server side comprises the following steps:
(1) deleting all useless information of an additional IP (Internet Protocol) address and a port number;
(2) storing all received TCP data packets in a reverse order;
(3) connecting all TCP data packets stored in a reverse order into a one-dimensional array;
(4) dividing the one-dimensional array into 320-240 pixel matrixes according to the RGB565 format;
(5) the pixel matrix is saved to the server-specified folder in jpg format.
Furthermore, the license plate recognition algorithm of the server side comprises two parts, namely license plate detection and character recognition.
The steps of the license plate detection algorithm are as follows:
(1) license plate location
The picture containing the license plate obtained by photographing is used for the following steps:
a. calculating the weight of eight neighborhoods of each pixel point by adopting a Gaussian function, and then calculating an average value according to neighborhood pixel values corresponding to the weight to serve as a Gaussian fuzzy result of the current pixel point;
b. converting the RGB565 value of each pixel point into a gray value;
c. performing convolution on a pixel matrix of the picture by using a Soble operator;
d. taking the average value of all gray values as a threshold value, and binarizing the pixel matrix of the picture;
e. expanding the binarized pixel matrix firstly and then corroding to obtain a connected domain, and then taking the outline of the connected domain;
f. excluding connected domains which cannot be the license plate to obtain candidate license plate connected domains;
g. and performing stretching transformation on the candidate license plate connected domain to obtain a rectangular domain with the specified size of 136 × 36.
(2) License plate discrimination
The method for selecting the real license plate picture from the candidate license plate rectangular domain by using a machine learning method of an SVM (support vector machine) comprises the following steps:
a. attaching two labels of a license plate and a license plate-free label to 1000 side parking space shooting pictures processed by a license plate positioning algorithm;
b. obtaining 172(136+36) dimensions of the image with the label by using histogram statistics, and training by using a Radial Basis Function (RBF) kernel;
c. storing the specific model obtained by training as an xml file;
d. and using the list as an output, wherein the output result is the current picture with or without a license plate and the license plate color result comprising a blue plate, a yellow plate and a green plate.
The labeling process adopts a successive iteration automatic labeling method, namely 1% of pictures are selected firstly and trained to obtain a simple model, then 3% of pictures are taken out and predicted by using the simple model, the result of prediction error is corrected manually, then 1% and 3% of all pictures are used for retraining again to obtain a model with improved accuracy, and successive iteration is carried out to obtain a high-accuracy model which can be classified automatically finally.
The steps of the character recognition algorithm are as follows:
(1) character segmentation
A rectangular image block with a single character is intercepted from a real license plate picture, and the specific algorithm steps are as follows:
a. judging the color by using a HSV color space template matching method;
b. carrying out binaryzation by using different parameters according to different color judgment results of the blue cards, the yellow cards and the green cards by using an Otsu threshold method;
c. the Chinese characters in the license plate are individually outlined, and English and numeric characters are uniformly outlined to obtain the segmented character image blocks.
(2) Character discrimination
And (3) identifying the segmented character image blocks by using an ANN (artificial neural network) machine learning method to obtain a single character result, and combining to obtain a final result of license plate identification. The number of the neurons of the input layer, the hidden layer and the output layer of the ANN model is 120, 40 and 65 respectively.
A method for side parking detection and identification using the system, the method comprising the steps of:
(1) collecting X, Y, Z magnetic field data in three-axis directions under a rectangular coordinate system of the space of the side parking space through a geomagnetic detection module, and sending the collected data to an MCU (microprogrammed control unit);
(2) the MCU receives magnetic field data sent by the geomagnetic detection module, obtains a signal of whether a vehicle enters or not through a finite-state machine and a threshold detection algorithm, and drives the camera module to work when the vehicle entering is detected;
(3) after the camera module is activated, shooting a picture of a vehicle head license plate of a running vehicle, and sending the picture to the MCU;
(4) the MCU receives the vehicle head license plate pictures collected by the camera module and transmits the vehicle head license plate pictures to the server in a data stream mode through the NB-IoT module;
(5) and the server restores the data stream of the vehicle head license plate picture and obtains a license plate recognition result by using a license plate recognition algorithm.
Compared with the prior art, the invention has the following beneficial effects:
(1) compared with the prior art, the system and the method can realize detection and identification aiming at the scene of side parking, and further achieve the aim of information management of roadside parking.
(2) Compared with the prior art, the system and the method have the advantages that the detection efficiency of the vehicle is higher by using the detection circuit consisting of the specific geomagnetic sensor chip and the finite-state machine algorithm for detection.
(3) Compared with the prior art, the system and the method have the advantages that the method for uploading the picture containing the license plate obtained by photographing to the server side for recognition is adopted, terminal hardware resources are not occupied, the cost of the terminal hardware is greatly reduced, and the device can be conveniently used in the side parking space scene in a large scale.
(4) Compared with the prior art, the system and the method provided by the invention have the advantages that the license plate recognition algorithm at the server fully considers the characteristic of license plate inclination in the side parking scene, and higher recognition accuracy is realized.
Drawings
FIG. 1 is a block diagram of a side parking detection and identification system according to the present invention;
FIG. 2 is a schematic view of the arrangement position of the lateral parking detection and recognition device according to the present invention;
fig. 3 is a schematic diagram of a geomagnetic detection module according to the present invention;
FIG. 4 is a schematic diagram of a side parking detection finite state machine algorithm according to the present invention;
fig. 5 is a flowchart of a method for restoring a data stream of a picture by a server according to the present invention;
fig. 6 is a flowchart of a license plate recognition algorithm of a server according to the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
The invention provides a side parking detection and identification system which comprises a geomagnetic detection module, an MCU (micro controller Unit), a camera module, an NB-IoT (Narrow Band Internet of Things) module and a server.
The geomagnetic detection module is used for acquiring X, Y, Z magnetic field data in three-axis directions under a rectangular coordinate system of the space of the lateral parking space and sending the acquired data to the MCU;
the MCU receives magnetic field data sent by the geomagnetic detection module, obtains a signal of whether a vehicle enters or not through a finite-state machine and a threshold detection algorithm, and drives the camera module to take a picture when the vehicle entering is detected; receiving the vehicle head license plate pictures collected by the camera module, and transmitting the vehicle head license plate pictures to the server through the NB-IoT module in a data stream mode;
the camera module is used for shooting images of a vehicle head license plate of a driven vehicle;
and the server restores the data stream of the picture and obtains a license plate recognition result by using a license plate recognition algorithm.
The system is shown in figure 1.
The geomagnetic detection module is in bidirectional connection with the MCU, because the geomagnetic detection module needs to transmit the output analog signal to the MCU, and an algorithm for detecting a finite-state machine of the vehicle is operated in the MCU, so that a signal for the vehicle to enter is obtained.
The MCU is also in bidirectional connection with the camera module, because the MCU transmits a signal of the vehicle entering to the camera module as an enabling signal of the camera module for shooting, and the camera module temporarily stores a picture containing a license plate obtained by shooting in an SRAM area of the MCU.
The MCU and the NB-IoT are also in bidirectional connection, the reason is that the MCU transmits the picture data stream to the NB-IoT module in a certain packet form, the NB-IoT module uploads the divided data packets to the server end in a TCP data transmission mode, after the transmission is finished, the NB-IoT module returns a command for finishing the transmission to the MCU, and the MCU can restore and detect and empty the camera to cache data.
The device of the side parking detection and identification system is arranged on a roadside foundation stone, and the detailed position is shown as a five-pointed star in figure 2.
Further, the geomagnetic detection module comprises three TMR2012 tunnel resistance magnetic sensor chips, and the arrangement direction is X, Y, Z triaxial direction under the space rectangular coordinate system, and a triaxial geomagnetic sensor is formed together. The geomagnetic detection module is placed at the top of a rectangular boundary of the side parking space and is positioned on the roadbed stone and obliquely faces the side parking space to be detected. The space rectangular coordinate system takes the position of the geomagnetic sensing module as an original point, and the X axis refers to the vehicle length direction of a parking space at the side; the Y axis is perpendicular to the X axis in the same plane and points to the direction of the vehicle width; the Z-axis refers to the direction facing vertically upwards. The geomagnetic detection module detects magnetic field data of the placement position and outputs an analog signal to the MCU.
A schematic diagram of the triaxial geomagnetic sensor is shown in fig. 3.
Further, the output signal of the triaxial geomagnetic sensor obtains a signal for detecting whether a vehicle enters or not through a finite-state machine and a threshold detection algorithm in the MCU, and the algorithm comprises the following steps:
let MRIs the result of the current magnetic field data calculated at each moment, and the calculation formula is MR=aMx+bMy+cMzWhere a, b, and c respectively correspond to the weights of the X, Y, Z-axis TMR2012 output analog signal, and a > b > c is required, for example, the weights are designed to be 0.625, 0.125, and 0.25 in the three-axis direction X, Y, Z set by the system.
Let T1 be the magnetic field difference threshold between the vehicle (the vehicle completely enters the parking space) and the vehicle not, T2 be the magnetic field difference threshold between the magnetic field when the vehicle is driven away (all tires of the vehicle completely leave the parking space) and the background magnetic field (the vehicle does not exist in the parking space), the relation of T1 > T2 exists, T2 is allowed to be 0, and T1 and T2 select different experience thresholds according to the use scene. For example, when the number of vehicles does not exceed 3 in a vicinity of a radius of 10 m in an open area (50 m around without a tall building), T1 is set to 10 and T2 is set to 0.8.
Let MRBAnd MRCMagnetic field data of the non-vehicle state and the vehicle state are respectively shown.
The operation of the finite state machine is described as follows:
(1) electrifying the triaxial geomagnetic sensor in the non-vehicle state, acquiring and storing background magnetic field data, and recording the background magnetic field data as MRB
(2) If the vehicle is not in a vehicle state, the three-axis geomagnetic sensor can acquire M at a certain frequencyRIf: mR>MRBAnd MR-MRBIf T1 is exceeded, the vehicle input signal car in is output and M is simultaneously assertedRC=MR
(3) If the vehicle is in a current state, the three-axis geomagnetic sensor can acquire M at a certain frequencyRIf: mR<MRCAnd MR-MRBIf < T2, a vehicle driving-away signal car department is output while causing M to be presentRC=0。
The algorithm of the finite state machine is schematically shown in fig. 4.
Further, the detected entry signal drives a camera module to take a picture, and the camera module is ATK-OV 7725. The photographed picture containing the license plate is in a matrix of RGB565 pixels with QVGA (resolution of 320 × 240).
Further, the MCU converts the picture pixel matrix into a data stream, and transmits the data stream to the server in a manner of sending TCP (Transmission Control Protocol) packets using the NB-IoT module.
Further, the method for restoring the data stream of the picture by the server side comprises the following steps:
(1) deleting all useless information of an additional IP (Internet Protocol) address and a port number;
(2) storing all received TCP data packets in a reverse order;
(3) connecting all TCP data packets stored in a reverse order into a one-dimensional array;
(4) dividing the one-dimensional array into 320-240 pixel matrixes according to the RGB565 format;
(5) the pixel matrix is saved to the server-specified folder in jpg format.
A flowchart of the method for restoring the picture data stream by the server is shown in fig. 5.
The license plate recognition algorithm of the server side comprises two parts, namely license plate detection and character recognition.
The steps of the license plate detection algorithm are as follows:
(1) license plate location
The picture containing the license plate obtained by photographing is used for the following steps:
a. calculating the weight of eight neighborhoods of each pixel point by adopting a Gaussian function, and then calculating an average value according to neighborhood pixel values corresponding to the weight to serve as a Gaussian fuzzy result of the current pixel point;
b. converting the RGB565 value of each pixel point into a gray value;
c. performing convolution on a pixel matrix of the picture by using a Soble operator;
d. taking the average value of all gray values as a threshold value, and binarizing the pixel matrix of the picture;
e. expanding the binarized pixel matrix firstly and then corroding to obtain a connected domain, and then taking the outline of the connected domain;
f. excluding connected domains which cannot be the license plate to obtain candidate license plate connected domains;
g. and performing stretching transformation on the candidate license plate connected domain to obtain a rectangular domain with the specified size of 136 × 36.
(2) License plate discrimination
The method for selecting the real license plate picture from the candidate license plate rectangular domain by using a machine learning method of an SVM (support vector machine) comprises the following steps:
a. attaching two labels of a license plate and a license plate-free label to 1000 side parking space shooting pictures processed by a license plate positioning algorithm;
b. obtaining 172(136+36) dimensions of the image with the label by using histogram statistics, and training by using a Radial Basis Function (RBF) kernel;
c. storing the specific model obtained by training as an xml file;
d. and using the list as an output, wherein the output result is the current picture with or without a license plate and the license plate color result comprising a blue plate, a yellow plate and a green plate.
The labeling process uses a successive iteration automatic labeling method to reduce the workload of model training, 1% of pictures are selected to be trained to obtain a simple model, then 3% of the pictures are taken out to be predicted by using the simple model, the result of prediction error is corrected manually, then 1% and 3% of all the pictures are used for retraining again to obtain a model with improved accuracy, and successive iteration is performed to obtain a high-accuracy model which can be automatically classified finally.
The steps of the character recognition algorithm are as follows:
(1) character segmentation
A rectangular image block with a single character is intercepted from a real license plate picture, and the specific algorithm steps are as follows:
a. judging the color by using a HSV color space template matching method;
b. carrying out binaryzation by using different parameters according to different color judgment results of the blue cards, the yellow cards and the green cards by using an Otsu threshold method;
c. the Chinese characters in the license plate are individually outlined, and English and numeric characters are uniformly outlined to obtain the segmented character image blocks.
(2) Character discrimination
And (3) identifying the segmented character image blocks by using an ANN (artificial neural network) machine learning method to obtain a single character result, and combining to obtain a final result of license plate identification. The number of neurons in the input, hidden and output layers of the ANN model was 120, 40 and 65, respectively.
The structure diagram of the algorithm for license plate recognition is shown in figure 6. The license plate detection and the characters jointly form a whole algorithm for license plate recognition. The interior of the license plate detection is divided into two parts of license plate positioning and license plate distinguishing, and the interior of the character recognition is divided into two parts of character segmentation and character distinguishing. Each part of all steps is preceded by a sequential concatenation, i.e. the output of the previous algorithm is the input of the next algorithm. The integral input of the algorithm is to take a picture by a camera module to obtain a picture in a jpg format containing a license plate, and the picture is output as license plate content in a character string form, for example: zhe A12345.
The above shows that the lateral parking detection and identification system provided by the invention can realize efficient parking detection and identification aiming at roadside lateral parking scenes, wherein the detection and identification accuracy is high, the further development of a vehicle management system is facilitated, and the overall system method has innovation and effectiveness.
The present invention is not limited to the above-described embodiments, and any obvious improvements, substitutions or modifications can be made by those skilled in the art without departing from the spirit of the present invention.

Claims (6)

1. A side parking detection and identification system is characterized by comprising a geomagnetic detection module, an MCU (microprogrammed control unit), a camera module, an NB-IoT (NB-IoT) module and a server;
the geomagnetic detection module, the MCU, the camera module and the NB-IoT module form a hardware device together, are placed on the roadside foundation stone, and obliquely face to the side parking space to be detected;
the geomagnetic detection module comprises three TMR2012 tunnel resistance magnetic sensor chips, and the arrangement direction is X, Y, Z triaxial direction under a space rectangular coordinate system to jointly form a triaxial geomagnetic sensor; the geomagnetic detection module is placed at the vertex of the rectangular boundary of the side parking space, is positioned on the roadbed stone and diagonally faces the side parking space to be detected; the space rectangular coordinate system takes the position of the geomagnetic sensing module as an origin, the X axis refers to the vehicle length direction of a parking space at the side, the Y axis refers to the direction which is vertical to the X axis and points to the vehicle width in the same plane, and the Z axis refers to the direction which is vertical to the ground and upwards; the geomagnetic detection module detects magnetic field data of the placement position and outputs an analog signal to the MCU;
the MCU receives magnetic field data sent by the geomagnetic detection module, and obtains signals of whether vehicles enter or not through a finite state machine and a threshold detection algorithm, and the method specifically comprises the following steps:
let MRIs the result of the current magnetic field data calculated at each moment, and the calculation formula is MR=aMx+bMy+cMzWherein a, b and c respectively correspond to X, Y, Z shaft TMR2012 output analog signal weight, and a is more than b is more than c;
let T1 be a magnetic field difference threshold between a vehicle and a non-vehicle, T2 be a magnetic field difference threshold between a magnetic field and a background magnetic field when the vehicle is driven away, and a relation of T1 > T2 exists, and T2 is allowed to be 0;
let MRBAnd MRCMagnetic field data of a non-vehicle state and a vehicle state respectively;
the operation of the finite state machine is described as follows:
(1) electrifying the triaxial geomagnetic sensor in the non-vehicle state, acquiring and storing background magnetic field data, and recording the background magnetic field data as MRB
(2) If the vehicle is not in a vehicle state, the three-axis geomagnetic sensor can acquire M at a certain frequencyRIf: mR>MRBAnd MR-MRBIf T1 is exceeded, the vehicle input signal car in is output and M is simultaneously assertedRC=MR
(3) If the vehicle is in a current state, the three-axis geomagnetic sensor can acquire M at a certain frequencyRIf: mR<MRCAnd MR-MRBIf < T2, a vehicle driving-away signal car department is output while causing M to be presentRC=0;
When a vehicle is detected to enter, driving the camera module to take a picture; receiving the vehicle head license plate pictures collected by the camera module, and transmitting the vehicle head license plate pictures to the server through the NB-IoT module in a data stream mode;
the camera module is used for shooting a picture of a vehicle head license plate of a driven vehicle;
the server restores the data stream of the vehicle head license plate picture and obtains a license plate recognition result by using a license plate recognition algorithm;
the method for restoring the data stream of the picture by the server comprises the following steps:
(1) deleting all useless information of the additional IP addresses and the port numbers;
(2) storing all received TCP data packets in a reverse order;
(3) connecting all TCP data packets stored in a reverse order into a one-dimensional array;
(4) dividing the one-dimensional array into 320-240 pixel matrixes according to the RGB565 format;
(5) saving the pixel matrix to a server specified folder in a jpg format;
the license plate recognition algorithm comprises a license plate detection part; in the license plate recognition algorithm, a license plate is positioned and judged, and a successive iteration automatic labeling method is used for attaching two labels, namely a license plate and a license plate-free label to a picture shot on a parking space on the opposite side; using the histogram statistics to obtain 172 dimensions of the image on which the label is stuck, and then training; obtaining a high-precision model which can be automatically classified finally through successive iteration;
the steps of the license plate detection algorithm are as follows:
the license plate is specifically positioned as follows:
and (3) processing the photographed picture containing the license plate as follows:
a. calculating the weight of eight neighborhoods of each pixel point by adopting a Gaussian function, and then calculating an average value according to neighborhood pixel values corresponding to the weight to serve as a Gaussian fuzzy result of the current pixel point;
b. converting the RGB565 value of each pixel point into a gray value;
c. performing convolution on a pixel matrix of the picture by using a Soble operator;
d. taking the average value of all gray values as a threshold value, and binarizing the pixel matrix of the picture;
e. expanding the binarized pixel matrix firstly and then corroding to obtain a connected domain, and then taking the outline of the connected domain;
f. excluding connected domains which cannot be the license plate to obtain candidate license plate connected domains;
g. performing stretching transformation on the candidate license plate connected domain to obtain a rectangular domain with the specified size of 136 × 36;
the license plate is distinguished as follows:
the method for selecting the real license plate picture from the candidate license plate rectangular domain by using the SVM machine learning method comprises the following steps:
a. attaching two labels of a license plate and a license plate-free label to 1000 side parking space shooting pictures processed by a license plate positioning algorithm;
b. obtaining 172 dimensions of the pictures with the labels by using histogram statistics, and training by using an RBF core;
c. storing the specific model obtained by training as an xml file;
d. and using the list as an output, wherein the output result is the current picture with or without a license plate and the license plate color result comprising a blue plate, a yellow plate and a green plate.
2. The side parking detection and identification system of claim 1 wherein said camera module is ATK-OV 7725; and the picture format of the photographed license plate containing the image is an RGB565 pixel matrix of QVGA.
3. The system of claim 1, wherein the MCU converts the image pixel matrix into a data stream, and the data stream is transmitted to the server by way of TCP packets transmitted by the NB-IoT module.
4. The system of claim 1, wherein in the license plate detection algorithm, a successive iteration automatic labeling method is used in a labeling process, namely 1% of pictures are selected to be trained to obtain a simple model, then 3% of pictures are taken out to be predicted by using the simple model, a result of prediction error is corrected manually, then 1% and 3% of all pictures are used for retraining again to obtain a model with improved accuracy, and a final high-accuracy model capable of being classified automatically is obtained by successive iteration.
5. The system for detecting and identifying side parking according to claim 1, wherein the license plate recognition algorithm further comprises a character recognition portion, and the character recognition algorithm comprises the following steps:
(1) character segmentation
A rectangular image block with a single character is intercepted from a real license plate picture, and the specific algorithm steps are as follows:
a. judging the color by using a HSV color space template matching method;
b. carrying out binaryzation by using different parameters according to different color judgment results of the blue cards, the yellow cards and the green cards by using an Otsu threshold method;
c. the method comprises the following steps of (1) independently taking outlines of Chinese characters in a license plate, and uniformly taking outlines of English characters and digital characters to obtain segmented character image blocks;
(2) character discrimination
Using an ANN machine learning method to identify the segmented character image blocks to obtain single character results, and combining the single character results to obtain a final license plate identification result; the number of neurons in the input, hidden and output layers of the ANN model was 120, 40 and 65, respectively.
6. A method for side parking detection recognition using the system of any of claims 1-5, comprising the steps of:
(1) collecting X, Y, Z magnetic field data in three-axis directions under a rectangular coordinate system of the space of the side parking space through a geomagnetic detection module, and sending the collected data to an MCU (microprogrammed control unit);
(2) the MCU receives magnetic field data sent by the geomagnetic detection module, obtains a signal of whether a vehicle enters or not through a finite-state machine and a threshold detection algorithm, and drives the camera module to work when the vehicle entering is detected;
(3) after the camera module is activated, shooting a picture of a vehicle head license plate of a running vehicle, and sending the picture to the MCU;
(4) the MCU receives the vehicle head license plate pictures collected by the camera module and transmits the vehicle head license plate pictures to the server in a data stream mode through the NB-IoT module;
(5) and the server restores the data stream of the vehicle head license plate picture and obtains a license plate recognition result by using a license plate recognition algorithm.
CN201910466245.6A 2019-05-30 2019-05-30 System and method for detecting and identifying side parking Active CN110164139B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910466245.6A CN110164139B (en) 2019-05-30 2019-05-30 System and method for detecting and identifying side parking

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910466245.6A CN110164139B (en) 2019-05-30 2019-05-30 System and method for detecting and identifying side parking

Publications (2)

Publication Number Publication Date
CN110164139A CN110164139A (en) 2019-08-23
CN110164139B true CN110164139B (en) 2021-08-03

Family

ID=67630257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910466245.6A Active CN110164139B (en) 2019-05-30 2019-05-30 System and method for detecting and identifying side parking

Country Status (1)

Country Link
CN (1) CN110164139B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110969773B (en) * 2019-12-12 2021-10-08 中智华清(北京)科技有限公司 NB-IoT based shared parking stall lock system and method
CN111508269B (en) * 2020-04-23 2021-05-18 深圳智优停科技有限公司 Open type parking space vehicle distinguishing method and device based on image recognition
CN112037534B (en) * 2020-09-04 2022-02-18 深圳华强技术有限公司 Car detection method and device integrating geomagnetic data and NB (nuclear magnetic resonance) signals
CN114155721A (en) * 2022-02-07 2022-03-08 北京图盟科技有限公司 Data conversion method and device for geomagnetic vehicle detector

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090106201A (en) * 2008-04-04 2009-10-08 (주)에스엔알 System and method for managing the admittance to parking place based on geomagnetic sensor
CN102722997A (en) * 2011-12-31 2012-10-10 北京时代凌宇科技有限公司 Parking space detection method and system thereof
CN106845480A (en) * 2017-01-13 2017-06-13 河海大学 A kind of method that car plate is recognized from picture
CN107622672A (en) * 2017-09-19 2018-01-23 智慧互通科技有限公司 Roadside Parking management equipment and method based on earth magnetism and video camera array linkage
CN207115756U (en) * 2017-08-29 2018-03-16 厦门华方软件科技有限公司 Parking position monitoring device
CN208460200U (en) * 2018-08-13 2019-02-01 桂林航天工业学院 Wireless geomagnetism parking space intelligent awareness apparatus based on narrowband Internet of Things

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090106201A (en) * 2008-04-04 2009-10-08 (주)에스엔알 System and method for managing the admittance to parking place based on geomagnetic sensor
CN102722997A (en) * 2011-12-31 2012-10-10 北京时代凌宇科技有限公司 Parking space detection method and system thereof
CN106845480A (en) * 2017-01-13 2017-06-13 河海大学 A kind of method that car plate is recognized from picture
CN207115756U (en) * 2017-08-29 2018-03-16 厦门华方软件科技有限公司 Parking position monitoring device
CN107622672A (en) * 2017-09-19 2018-01-23 智慧互通科技有限公司 Roadside Parking management equipment and method based on earth magnetism and video camera array linkage
CN208460200U (en) * 2018-08-13 2019-02-01 桂林航天工业学院 Wireless geomagnetism parking space intelligent awareness apparatus based on narrowband Internet of Things

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于地磁传感器的车辆检测算法研究;马兰芳、张红霞等;《自动化仪表》;20171130;第38卷(第11期);第84-87页 *

Also Published As

Publication number Publication date
CN110164139A (en) 2019-08-23

Similar Documents

Publication Publication Date Title
CN110164139B (en) System and method for detecting and identifying side parking
CN111178236B (en) Parking space detection method based on deep learning
WO2021238019A1 (en) Real-time traffic flow detection system and method based on ghost convolutional feature fusion neural network
CN108564814B (en) Image-based parking lot parking space detection method and device
CN109190444B (en) Method for realizing video-based toll lane vehicle feature recognition system
CN107977639B (en) Face definition judgment method
Peng et al. Drone-based vacant parking space detection
CN111242002B (en) Shared bicycle standardized parking judgment method based on computer vision
CN113808098A (en) Road disease identification method and device, electronic equipment and readable storage medium
CN110245673A (en) Method for detecting parking stalls and device
CN111860509A (en) Coarse-to-fine two-stage non-constrained license plate region accurate extraction method
CN115880260A (en) Method, device and equipment for detecting base station construction and computer readable storage medium
CN109977941A (en) Licence plate recognition method and device
CN116052090A (en) Image quality evaluation method, model training method, device, equipment and medium
CN110766009A (en) Tail plate identification method and device and computer readable storage medium
CN112053407B (en) Automatic lane line detection method based on AI technology in traffic law enforcement image
CN117274967A (en) Multi-mode fusion license plate recognition algorithm based on convolutional neural network
CN112528994A (en) Free-angle license plate detection method, license plate identification method and identification system
CN111597939A (en) High-speed rail line nest defect detection method based on deep learning
CN108171991A (en) A kind of identification controller and Vehicle License Plate Recognition System
CN114332814A (en) Parking frame identification method and device, electronic equipment and storage medium
Kaimkhani et al. UAV with Vision to Recognise Vehicle Number Plates
Ren et al. Implementation of vehicle and license plate detection on embedded platform
CN113449629A (en) Lane line false and true identification device, method, equipment and medium based on driving video
CN113239931A (en) Logistics station license plate recognition method

Legal Events

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