A license plate recognition processing method, system, computer and readable storage medium
By receiving speeding signals to obtain license plate image data, performing preprocessing and feature extraction, and encoding it into 64-bit integer data, the problem of not being able to obtain speeding vehicle information in a timely manner in existing technologies is solved, thereby improving the efficiency of traffic management and data security.
Patent Information
- Application Number
- CN202310529092.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2043-05-11
AI Technical Summary
Existing technologies cannot obtain relevant information about speeding vehicles in a timely manner, resulting in low efficiency in traffic management.
By receiving overspeed signals, the system acquires license plate image data from the video stream, performs preprocessing and localization, extracts license plate feature data, and encodes it into 64-bit integer data for real-time recognition and storage.
It improves data transmission efficiency, enhances data security, prevents the leakage of sensitive information, and enables timely acquisition of information on speeding vehicles.
Smart Images

Figure CN116740951B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of license plate recognition technology, and in particular to a license plate recognition processing method, system, computer, and readable storage medium. Background Technology
[0002] With traffic congestion becoming increasingly severe, traffic management departments are placing greater emphasis on the real-time collection and processing of traffic information. License plate recognition technology, as a crucial component of intelligent transportation systems, can be used to achieve automatic vehicle monitoring and management, improving the efficiency and accuracy of traffic management.
[0003] In the existing technology, the main methods for vehicle speed detection include radar speed measurement and laser speed measurement. However, these methods can only detect whether there is speeding, but cannot obtain relevant information about speeding vehicles in a timely manner. Summary of the Invention
[0004] In view of the shortcomings of the prior art, the purpose of this invention is to provide a license plate recognition processing method, system, storage medium and computer to solve the technical problem that the prior art cannot obtain relevant information of speeding vehicles in a timely manner.
[0005] To achieve the above objectives, the present invention provides a license plate recognition processing method, comprising the following steps:
[0006] Receive an overspeed signal, and acquire image data containing the target license plate in the video stream based on the transmission time of the overspeed signal. Preprocess the image data and locate the license plate area in the image data to obtain an initial license plate image.
[0007] If there are two or more initial license plate images in the image data, obtain reference image data corresponding to the image data in the video stream, locate the license plate area in the reference image to obtain a reference license plate image, and compare the coordinates of each initial license plate image in the same lane in the image data and the reference image data to filter out the license plate image that meets the speeding signal.
[0008] If the number of initial license plate images in the image data is a single one, then the initial license plate image is confirmed as a license plate image;
[0009] Feature extraction is performed on the license plate image to obtain license plate data corresponding to the target vehicle. The license plate data includes color feature data and license plate number feature data.
[0010] The steps for obtaining the license plate number feature data specifically include:
[0011] Each connected region in the binarized license plate image is marked using either 4-connectivity or 8-connectivity:
[0012] The variance of the horizontal projection histogram of the connected region is calculated using the following formula:
[0013] ;
[0014]
[0015] The variance of the projected histogram in the vertical direction of the connected region is calculated using the following formula:
[0016] ;
[0017] ;
[0018] Select the position corresponding to the maximum variance as the segmentation position to obtain the target segmentation position;
[0019] In the formula, Let be the number of pixels in the i-th row. Let j be the number of pixels in the j-th row. Let be the pixel value in the i-th row and j-th column, n be the width of the image, and m be the height of the image. Let V be the variance of the projected histogram in the horizontal direction. This represents the total number of pixels in the horizontal projection histogram. This represents the mean of the projected histogram along the horizontal direction. Let V be the variance of the projection histogram in the vertical direction. This represents the total number of pixels in the projected histogram along the vertical direction. This is the mean of the projected histogram in the vertical direction;
[0020] At the target segmentation location, the connected region is divided into two sub-regions, and the sub-regions are marked and segmented again until the connected region is segmented into a single character block;
[0021] Each of the aforementioned character blocks is identified to obtain the license plate number feature data of the target license plate;
[0022] The license plate data and the speed information in the speeding signal are encoded and converted according to a preset encoding rule, and the control characters in the license plate data and the speed information are converted into corresponding encoded values to obtain encoded data corresponding to the license plate data and the speed information.
[0023] The encoded data is processed into binary encoded data, and then stored in a preset bit space through bitwise operations, thereby converting the binary encoded data into 64-bit integer data to obtain the target data.
[0024] Compared with existing technologies, the advantages of this invention are as follows: By receiving overspeed signals from the speed sensor in real time, and acquiring image data containing the target license plate from the video stream of the monitoring camera based on the transmission time of the overspeed signal, the invention filters the image data corresponding to the target vehicle by acquiring reference image data corresponding to the image data, preventing image recognition errors, and identifying the license plate data corresponding to the target vehicle based on the image data. Furthermore, the license plate data and speed information are bound together and encoded and binary processed to obtain 64-bit integer data that is easy to read and store, thus obtaining the target data. When an overspeeding vehicle is detected, the relevant license plate information of the overspeeding vehicle is acquired in a timely manner, and the data is processed. By converting the data into a 64-bit integer, the data can be transmitted in digital form without complex operations such as string concatenation, which greatly improves the efficiency of data transmission. Moreover, converting the license plate data into integer data greatly improves data security and avoids the leakage of sensitive information.
[0025] According to one aspect of the above technical solution, the preprocessing step for the image data specifically includes:
[0026] The image data is processed to grayscale, and then smoothed by Gaussian filtering to eliminate noise in the image data.
[0027] Canny edge detection is performed on the smoothed image data to obtain an edge image.
[0028] According to one aspect of the above technical solution, the step of locating the license plate region in the image data to obtain an initial license plate image specifically includes:
[0029] The edge image is binarized to obtain a binarized image;
[0030] Contour analysis is performed on the binarized image to obtain a license plate image corresponding to the target license plate position.
[0031] According to one aspect of the above technical solution, the step of extracting features from the license plate image to obtain license plate data corresponding to the target vehicle specifically includes:
[0032] Based on the location of the target license plate, the background color of the target license plate is obtained from the image data to obtain the color feature data of the target license plate;
[0033] Character recognition is performed on the license plate image to obtain the license plate number feature data of the target license plate.
[0034] On the other hand, the present invention also provides a license plate recognition processing system, comprising:
[0035] The processing module is used to receive an overspeed signal, acquire image data containing the target license plate in the video stream based on the transmission time of the overspeed signal, preprocess the image data, and locate the license plate area in the image data to obtain an initial license plate image.
[0036] The first recognition module is used to, if the number of initial license plate images in the image data is two or more, acquire reference image data corresponding to the image data in the video stream, locate the license plate area in the reference image to obtain a reference license plate image, and compare the coordinates of each initial license plate image in the same lane in the image data and the reference image data to filter out the license plate image that meets the speeding signal.
[0037] The second recognition module is used to identify the initial license plate image as a license plate image if the number of initial license plate images in the image data is a single image.
[0038] The information module is used to extract features from the license plate image to obtain license plate data corresponding to the target vehicle. The license plate data includes color feature data and license plate number feature data.
[0039] The information module is specifically used to: mark each connected region in the binarized license plate image using a 4-connected or 8-connected method.
[0040] The variance of the horizontal projection histogram of the connected region is calculated using the following formula:
[0041] ;
[0042]
[0043] The variance of the projected histogram in the vertical direction of the connected region is calculated using the following formula:
[0044] ;
[0045] ;
[0046] Select the position corresponding to the maximum variance as the segmentation position to obtain the target segmentation position;
[0047] In the formula, Let be the number of pixels in the i-th row. Let j be the number of pixels in the j-th row. Let be the pixel value in the i-th row and j-th column, n be the width of the image, and m be the height of the image. Let V be the variance of the projected histogram in the horizontal direction. This represents the total number of pixels in the horizontal projection histogram. This represents the mean of the projected histogram along the horizontal direction. Let V be the variance of the projection histogram in the vertical direction. This represents the total number of pixels in the projected histogram along the vertical direction. This is the mean of the projected histogram in the vertical direction;
[0048] At the target segmentation location, the connected region is divided into two sub-regions, and the sub-regions are marked and segmented again until the connected region is segmented into a single character block;
[0049] Each of the aforementioned character blocks is identified to obtain the license plate number feature data of the target license plate;
[0050] The encoding module is used to encode and convert the license plate data and the speed information in the speeding signal based on a preset encoding rule, and to convert the control characters in the license plate data and the speed information into corresponding encoded values to obtain encoded data corresponding to the license plate data and the speed information.
[0051] The storage module is used to process the encoded data into binary encoded data through binary data processing, and to store the binary encoded data into a preset bit space through bit operations, thereby converting the binary encoded data into 64-bit integer data to obtain the target data.
[0052] According to one aspect of the above technical solution, the processing module is specifically used to: perform grayscale processing on the image data, and perform smoothing processing on the grayscale processed image by Gaussian filtering to eliminate noise in the image data;
[0053] Canny edge detection is performed on the smoothed image data to obtain an edge image.
[0054] According to one aspect of the above technical solution, the processing module is further configured to: perform binarization processing on the edge image to obtain a binarized image;
[0055] Contour analysis is performed on the binarized image to obtain a license plate image corresponding to the target license plate position.
[0056] According to one aspect of the above technical solution, the information module is specifically used to: obtain the background color of the target license plate from the image data based on the location of the target license plate, so as to obtain the color feature data of the target license plate;
[0057] Character recognition is performed on the license plate image to obtain the license plate number feature data of the target license plate.
[0058] On the other hand, the present invention also provides a computer having a computer program stored thereon, which, when executed by a processor, implements the license plate recognition processing method described in the above technical solution.
[0059] On the other hand, the present invention also provides a storage medium, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the license plate recognition processing method described in the above technical solution. Attached Figure Description
[0060] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0061] Figure 1 This is a flowchart of the license plate recognition processing method in the first embodiment of the present invention;
[0062] Figure 2 This is a coding lookup table for license plate number feature data in the first embodiment of the present invention;
[0063] Figure 3 This is a coding lookup table for color feature data in the first embodiment of the present invention;
[0064] Figure 4 This is a coding lookup table for speed information in the first embodiment of the present invention;
[0065] Figure 5 This is a schematic diagram of the 64-bit storage space and binary encoded data distribution in the first embodiment of the present invention;
[0066] Figure 6 This is a structural block diagram of the license plate recognition processing system in the second embodiment of the present invention;
[0067] Figure 7 This is a schematic diagram of the structure of a computer device in the third embodiment of the present invention. Detailed Implementation
[0068] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Multiple embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0069] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0070] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0071] Please see Figure 1 The diagram shows a flowchart of a license plate recognition processing method according to the first embodiment of the present invention, which includes the following steps:
[0072] Step S100: Receive an overspeed signal and, based on the transmission time of the overspeed signal, acquire image data containing the target license plate from the video stream. Preprocess the image data and locate the license plate region within the image data to obtain an initial license plate image. Specifically, in some application scenarios of this embodiment, when an overspeed signal from a radar speed sensor or laser speed sensor is received, image data from the video stream corresponding to the transmission time of the overspeed signal is acquired.
[0073] In this embodiment, the above method further includes:
[0074] Step S101: If the number of initial license plate images in the image data is single, the initial license plate image is confirmed as a license plate image. Specifically, in this step, for speeding vehicles, there is usually only one vehicle in the lane corresponding to the target vehicle in the image data, so that vehicle can be identified as the target vehicle. However, depending on the number of lanes, there may be multiple vehicles in the image data. In this case, multiple initial license plate images may be located. In order to eliminate the interference of license plate images of other vehicles and obtain the license plate image corresponding to the target vehicle for subsequent feature extraction, the above method also includes:
[0075] Step S102: If the number of initial license plate images in the image data is two or more, obtain reference image data corresponding to the image data in the video stream, locate the license plate area in the reference image to obtain a reference license plate image, and compare the coordinates of each initial license plate image in the same lane in the image data and the reference image data to filter out license plate images that meet the speeding signal. Specifically, the comparison uses the time difference between the image data and the reference image data in the video stream, and the displacement of the license plate images in the image data and the reference image data, to obtain the vehicle speed of the corresponding initial license plate image, and based on this, obtain the license plate image that meets the speeding signal.
[0076] Specifically, in this embodiment, the above-mentioned preprocessing steps for the image data include:
[0077] Step S110 involves performing grayscale processing on the image data and then smoothing the grayscale-processed image using a Gaussian filter to eliminate noise in the image data. Preferably, in this embodiment, the smoothing process can be performed using a Gaussian filter to process the image data and eliminate noise in the image data.
[0078] Step S120: Perform Canny edge detection on the smoothed image data to obtain an edge image.
[0079] Preferably, in this embodiment, the formulas for calculating the gradient value and gradient direction in the Canny edge detection algorithm described above are as follows:
[0080]
[0081]
[0082] In the formula, Let be the gradient value of the image at (x, y). Let I be the gradient direction and I be the grayscale image. After calculating the gradient value and gradient direction, the edges of the image are determined by non-maximum suppression and double thresholding.
[0083] The steps described above for locating the license plate region in the image data to obtain the initial license plate image specifically include:
[0084] Step S130: Binarize the edge image to obtain a binarized image;
[0085] Step S140: Perform contour analysis on the binarized image to obtain a license plate image corresponding to the target license plate location. In this embodiment, this is mainly achieved by filtering out images with rectangular contours from the binarized image and determining the region to which the target license plate location belongs based on the aspect ratio of the license plate.
[0086] Step S200: Extract features from the license plate image to obtain license plate data corresponding to the target vehicle. The license plate data includes color feature data and license plate number feature data.
[0087] Specifically, in this embodiment, the step of extracting features from the license plate image to obtain license plate data corresponding to the target vehicle includes:
[0088] Step S210: Obtain the background color of the target license plate from the image data based on the target license plate position to obtain the color feature data of the target license plate;
[0089] Step S220: Perform character recognition on the license plate image to obtain the license plate number feature data of the target license plate.
[0090] Furthermore, in this embodiment, the clarity of the license plate image obtained for a vehicle traveling at high speed may be low, making it difficult to obtain accurate license plate number feature data. Therefore, in this embodiment, the step of performing character recognition on the license plate image to obtain the license plate number feature data of the target license plate specifically includes:
[0091] Step S230: The license plate image is segmented into several character blocks based on the connected component analysis algorithm.
[0092] Furthermore, in this embodiment, the step of segmenting the license plate image based on the connected component analysis algorithm specifically includes:
[0093] Each connected region in the binarized license plate image is marked using either 4-connectivity or 8-connectivity:
[0094] For each of the connected regions, calculate its horizontal and vertical projection histograms to obtain the target segmentation location;
[0095] At the target segmentation location, the connected region is divided into two sub-regions, and the sub-regions are marked and segmented again until the connected region is segmented into a single character block.
[0096] Furthermore, in this embodiment, the step of calculating the horizontal and vertical projection histograms for each connected region to obtain the target segmentation location specifically includes:
[0097] The variance of the horizontal projection histogram of the connected region is calculated using the following formula:
[0098] ;
[0099]
[0100] The variance of the projected histogram in the vertical direction of the connected region is calculated using the following formula:
[0101] ;
[0102] ;
[0103] Select the position corresponding to the maximum variance as the segmentation position to obtain the target segmentation position;
[0104] In the formula, Let be the number of pixels in the i-th row. Let j be the number of pixels in the j-th row. Let be the pixel value in the i-th row and j-th column, n be the width of the image, and m be the height of the image. Let V be the variance of the projected histogram in the horizontal direction. This represents the total number of pixels in the horizontal projection histogram. This represents the mean of the projected histogram along the horizontal direction. Let V be the variance of the projection histogram in the vertical direction. This represents the total number of pixels in the projected histogram along the vertical direction. This is the mean of the projected histogram in the vertical direction.
[0105] Step S240 involves recognizing each of the character blocks to obtain the license plate number feature data of the target license plate. Understandably, since the number of license plate numbers is limited, in this embodiment, template matching recognition can be used to improve the accuracy and efficiency of the recognition.
[0106] Step S300: The license plate data and the speed information in the speeding signal are encoded and converted according to a preset encoding rule, and the control characters in the license plate data and the speed information are converted into corresponding encoded values to obtain encoded data corresponding to the license plate data and the speed information.
[0107] Preferably, such as Figures 2-4 The diagram shown is a schematic of the preset encoding rules in this embodiment, wherein... Figure 2 This is a coding lookup table for the above license plate number feature data. Figure 3 This is a coding lookup table for the above color feature data. Figure 4 This is a coding lookup table for the speed information mentioned above.
[0108] Step S400 involves processing the encoded data into binary encoded data, then storing the binary encoded data into a preset bit space using bitwise operations, thereby converting the binary encoded data into 64-bit integer data to obtain the target data. In step S300 above, control characters in the data are converted into encoded values based on the aforementioned encoding rules. Then, the encoded data is processed into binary data to obtain binary encoded data. Finally, by storing the binary encoded data into a preset 64-bit space, the binary encoded data including all license plate data is converted into 64-bit integer data, i.e., the target data.
[0109] Among them, such as Figure 5 As shown in the diagram, vehicle character encoding, color encoding, and speed encoding are used to reallocate a 64-bit storage space. Bits 0-55 store the license plate number, which is stored in the planned bit space in left-order. Bits 56-60 store the vehicle color, and bit 62 stores the speed information, thus converting the binary encoded data into an integer.
[0110] After obtaining the target data containing license plate information and speed information, this data can be stored, uploaded, or sent. Understandably, 64-bit integers are a commonly used data type in computers, offering small storage space and fast read / write speeds, significantly saving storage space and data retrieval time. By converting the data into 64-bit integers, it can be transmitted in numerical form without complex operations such as string concatenation, greatly improving data transmission efficiency. Furthermore, converting license plate data into integer data significantly enhances data security, preventing the leakage of sensitive information.
[0111] In summary, the license plate recognition processing method in the above embodiments of the present invention receives speeding signals from a speed sensor in real time, and acquires image data containing the target license plate from a video stream of a surveillance camera based on the transmission time of the speeding signal. Based on this image data, it identifies the license plate data corresponding to the target vehicle. Furthermore, it binds the license plate data and speed information, and performs encoding and binary processing to obtain 64-bit integer data that is easy to read and store, thus obtaining the target data. When a speeding vehicle is detected, the relevant license plate information of the speeding vehicle is promptly acquired and the data is processed. By converting the data into a 64-bit integer, the data can be transmitted in digital form without complex operations such as string concatenation, greatly improving data transmission efficiency. Moreover, converting the license plate data into integer data significantly improves data security and avoids the leakage of sensitive information.
[0112] Please refer to Figure 6 The image shows a license plate recognition processing system according to a second embodiment of the present invention, comprising:
[0113] The processing module 100 is used to receive an overspeed signal, and based on the transmission time of the overspeed signal, acquire image data containing the target license plate in the video stream, preprocess the image data, and locate the license plate area in the image data to obtain an initial license plate image.
[0114] The first recognition module 101 is used to, if the number of initial license plate images in the image data is two or more, acquire reference image data in the video stream corresponding to the image data, locate the license plate area in the reference image to obtain a reference license plate image, and compare the coordinates of each initial license plate image in the same lane in the image data and the reference image data to filter out the license plate image that meets the speeding signal.
[0115] The second recognition module 102 is used to identify the initial license plate image as a license plate image if the number of initial license plate images in the image data is a single image.
[0116] Information module 200 is used to extract features from the license plate image to obtain license plate data corresponding to the target vehicle. The license plate data includes color feature data and license plate number feature data.
[0117] The encoding module 300 is used to encode and convert the license plate data and the speed information in the speeding signal based on a preset encoding rule, and to convert the control characters in the license plate data and the speed information into corresponding encoded values, so as to obtain encoded data corresponding to the license plate data and the speed information.
[0118] The storage module 400 is used to process the encoded data into binary encoded data through binary data processing, and to store the binary encoded data into a preset bit space through bit operations, thereby converting the binary encoded data into 64-bit integer data to obtain the target data.
[0119] Preferably, in this embodiment, the processing module 100 is specifically used to: perform grayscale processing on the image data, and perform smoothing processing on the grayscale processed image by Gaussian filtering to eliminate noise in the image data;
[0120] Canny edge detection is performed on the smoothed image data to obtain an edge image.
[0121] Furthermore, in this embodiment, the processing module 100 is also used to: perform binarization processing on the edge image to obtain a binarized image;
[0122] Contour analysis is performed on the binarized image to obtain a license plate image corresponding to the target license plate position.
[0123] Preferably, in this embodiment, the information module 200 is specifically used to: obtain the background color of the target license plate from the image data based on the location of the target license plate, so as to obtain the color feature data of the target license plate;
[0124] Character recognition is performed on the license plate image to obtain the license plate number feature data of the target license plate.
[0125] Furthermore, in this embodiment, the information module 200 is also used to: perform character segmentation on the license plate image based on a connected component analysis algorithm, dividing the license plate image into several character blocks;
[0126] Each of the character blocks is identified to obtain the license plate number feature data of the target license plate.
[0127] Furthermore, in this embodiment, the information module 200 is also used to: mark each connected region in the binarized license plate image using a 4-connected or 8-connected method:
[0128] For each of the connected regions, calculate its horizontal and vertical projection histograms to obtain the target segmentation location;
[0129] At the target segmentation location, the connected region is divided into two sub-regions, and the sub-regions are marked and segmented again until the connected region is segmented into a single character block.
[0130] Furthermore, in this embodiment, the information module 200 is also used to: calculate the variance of the projection histogram of the connected region in the horizontal direction according to the following formula:
[0131] ;
[0132]
[0133] The variance of the projected histogram in the vertical direction of the connected region is calculated using the following formula:
[0134] ;
[0135] ;
[0136] Select the position corresponding to the maximum variance as the segmentation position to obtain the target segmentation position;
[0137] In the formula, Let be the number of pixels in the i-th row. Let j be the number of pixels in the j-th row. Let be the pixel value in the i-th row and j-th column, n be the width of the image, and m be the height of the image. Let V be the variance of the projected histogram in the horizontal direction. This represents the total number of pixels in the horizontal projection histogram. This represents the mean of the projected histogram along the horizontal direction. Let V be the variance of the projection histogram in the vertical direction. This represents the total number of pixels in the projected histogram along the vertical direction. This is the mean of the projected histogram in the vertical direction.
[0138] The third embodiment of the present invention also proposes a computer device, please refer to [link / reference]. Figure 7 The image shows a computer device according to an embodiment of the present invention, including a processor 10, a memory 20, and a computer program 30 stored in the memory and executable on the processor. When the processor 10 executes the computer program 30, it implements the license plate recognition processing method described above.
[0139] The computer device may be, but is not limited to, a personal computer, a server, or other such device. In some embodiments, the processor 10 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data.
[0140] The memory 20 includes at least one type of readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 20 may be an internal storage unit of a computer device, such as the hard disk of that computer device. In other embodiments, the memory 20 may be an external storage device of a computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., all equipped on the computer device. Furthermore, the memory 20 may include both internal and external storage units of the computer device. The memory 20 can be used not only to store application software and various types of data installed on the computer device, but also to temporarily store data that has been output or will be output.
[0141] Optionally, the computer device may also include a user interface, a network interface, a communication bus, etc. The user interface may include a display, an input unit such as a keyboard, and optionally, a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the computer device and to display a visual user interface. The network interface may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface), typically used to establish communication connections between the device and other electronic devices. The communication bus is used to enable communication between these components.
[0142] It should be pointed out that, Figure 7 The structure shown does not constitute a limitation on the computer device. In other embodiments, the computer device may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0143] The fourth embodiment of the present invention also proposes a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the license plate recognition processing method as described above.
[0144] Those skilled in the art will understand that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequential list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system or apparatus (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from or in conjunction with such an instruction execution system or apparatus). For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transmit programs for use by or in conjunction with an instruction execution system or apparatus.
[0145] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0146] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0147] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0148] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A license plate recognition processing method, characterized in that, Includes the following steps: Receive an overspeed signal, and acquire image data containing the target license plate in the video stream based on the transmission time of the overspeed signal. Preprocess the image data and locate the license plate area in the image data to obtain an initial license plate image. If there are two or more initial license plate images in the image data, obtain reference image data corresponding to the image data in the video stream, locate the license plate area in the reference image to obtain a reference license plate image, and compare the coordinates of each initial license plate image in the same lane in the image data and the reference image data to filter out the license plate image that meets the speeding signal. If the number of initial license plate images in the image data is a single one, then the initial license plate image is confirmed as a license plate image; Feature extraction is performed on the license plate image to obtain license plate data corresponding to the target vehicle. The license plate data includes color feature data and license plate number feature data. The steps for obtaining the license plate number feature data specifically include: Each connected region in the binarized license plate image is marked using either 4-connectivity or 8-connectivity: The variance of the horizontal projection histogram of the connected region is calculated using the following formula: ; The variance of the projected histogram in the vertical direction of the connected region is calculated using the following formula: ; ; Select the position corresponding to the maximum variance as the segmentation position to obtain the target segmentation position; In the formula, Let be the number of pixels in the i-th row. Let j be the number of pixels in the j-th row. Let be the pixel value in the i-th row and j-th column, n be the width of the image, and m be the height of the image. Let V be the variance of the projected histogram in the horizontal direction. This represents the total number of pixels in the horizontal projection histogram. This represents the mean of the projected histogram along the horizontal direction. Let V be the variance of the projection histogram in the vertical direction. This represents the total number of pixels in the projected histogram along the vertical direction. This is the mean of the projected histogram in the vertical direction; At the target segmentation location, the connected region is divided into two sub-regions, and the sub-regions are marked and segmented again until the connected region is segmented into a single character block; Each of the aforementioned character blocks is identified to obtain the license plate number feature data of the target license plate; The license plate data and the speed information in the speeding signal are encoded and converted according to a preset encoding rule, and the control characters in the license plate data and the speed information are converted into corresponding encoded values to obtain encoded data corresponding to the license plate data and the speed information. The encoded data is processed into binary encoded data, and then the binary encoded data is stored in a preset bit space through bit operations, thereby converting the binary encoded data into 64-bit integer data to obtain the target data. The preprocessing steps for the image data specifically include: The image data is processed to grayscale, and then smoothed by Gaussian filtering to eliminate noise in the image data. Canny edge detection is performed on the smoothed image data to obtain an edge image.
2. The license plate recognition processing method according to claim 1, characterized in that, The specific steps for locating the license plate region in the image data to obtain the initial license plate image include: The edge image is binarized to obtain a binarized image; Contour analysis is performed on the binarized image to obtain a license plate image corresponding to the target license plate position.
3. The license plate recognition processing method according to claim 2, characterized in that, The specific steps of extracting features from the license plate image to obtain the license plate data corresponding to the target vehicle include: Based on the location of the target license plate, the background color of the target license plate is obtained from the image data to obtain the color feature data of the target license plate; Character recognition is performed on the license plate image to obtain the license plate number feature data of the target license plate.
4. A license plate recognition processing system, characterized in that, include: The processing module is used to receive an overspeed signal, acquire image data containing the target license plate in the video stream based on the transmission time of the overspeed signal, preprocess the image data, and locate the license plate area in the image data to obtain an initial license plate image. The first recognition module is used to, if the number of initial license plate images in the image data is two or more, acquire reference image data corresponding to the image data in the video stream, locate the license plate area in the reference image to obtain a reference license plate image, and compare the coordinates of each initial license plate image in the same lane in the image data and the reference image data to filter out the license plate image that meets the speeding signal. The second recognition module is used to identify the initial license plate image as a license plate image if the number of initial license plate images in the image data is a single image. The information module is used to extract features from the license plate image to obtain license plate data corresponding to the target vehicle. The license plate data includes color feature data and license plate number feature data. The information module is specifically used to: mark each connected region in the binarized license plate image using a 4-connected or 8-connected method. The variance of the horizontal projection histogram of the connected region is calculated using the following formula: ; The variance of the projected histogram in the vertical direction of the connected region is calculated using the following formula: ; ; Select the position corresponding to the maximum variance as the segmentation position to obtain the target segmentation position; In the formula, Let be the number of pixels in the i-th row. Let j be the number of pixels in the j-th row. Let be the pixel value in the i-th row and j-th column, n be the width of the image, and m be the height of the image. Let V be the variance of the projected histogram in the horizontal direction. This represents the total number of pixels in the horizontal projection histogram. This represents the mean of the projected histogram along the horizontal direction. Let V be the variance of the projection histogram in the vertical direction. This represents the total number of pixels in the projected histogram along the vertical direction. This is the mean of the projected histogram in the vertical direction; At the target segmentation location, the connected region is divided into two sub-regions, and the sub-regions are marked and segmented again until the connected region is segmented into a single character block; Each of the aforementioned character blocks is identified to obtain the license plate number feature data of the target license plate; The encoding module is used to encode and convert the license plate data and the speed information in the speeding signal based on a preset encoding rule, and to convert the control characters in the license plate data and the speed information into corresponding encoded values to obtain encoded data corresponding to the license plate data and the speed information. The storage module is used to process the encoded data into binary encoded data through binary data processing, and to store the binary encoded data into a preset bit space through bit operations, thereby converting the binary encoded data into 64-bit integer data to obtain the target data. Specifically, the processing module is used to: perform grayscale processing on the image data, and smooth the grayscale processed image using Gaussian filtering to eliminate noise in the image data; Canny edge detection is performed on the smoothed image data to obtain an edge image.
5. A computer device having a computer program stored thereon, which, when executed by a processor, implements the license plate recognition processing method according to any one of claims 1-3.
6. A storage medium comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the license plate recognition processing method according to any one of claims 1-3.
Citation Information
Patent Citations
Automatic license plate character recognition method
CN103116751A
Traffic violation detection method and system
CN105608903A