Nothing Special   »   [go: up one dir, main page]

CN113313124B - Method and device for identifying license plate number based on image segmentation algorithm and terminal equipment - Google Patents

Method and device for identifying license plate number based on image segmentation algorithm and terminal equipment Download PDF

Info

Publication number
CN113313124B
CN113313124B CN202110865372.0A CN202110865372A CN113313124B CN 113313124 B CN113313124 B CN 113313124B CN 202110865372 A CN202110865372 A CN 202110865372A CN 113313124 B CN113313124 B CN 113313124B
Authority
CN
China
Prior art keywords
position information
region
segmentation algorithm
image segmentation
license plate
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
CN202110865372.0A
Other languages
Chinese (zh)
Other versions
CN113313124A (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.)
Foshan Menassen Intelligent Technology Co ltd
Original Assignee
Foshan Menassen Intelligent Technology Co ltd
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 Foshan Menassen Intelligent Technology Co ltd filed Critical Foshan Menassen Intelligent Technology Co ltd
Priority to CN202110865372.0A priority Critical patent/CN113313124B/en
Publication of CN113313124A publication Critical patent/CN113313124A/en
Application granted granted Critical
Publication of CN113313124B publication Critical patent/CN113313124B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/625License plates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Character Input (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses a method, a device, terminal equipment and a storage medium for identifying a license plate number based on an image segmentation algorithm, wherein the method comprises the following steps: inputting the acquired target image into a set training model, wherein the training model comprises an image segmentation algorithm; dividing the target image into regions, and labeling each region to enable each region to contain horizontal position information and vertical position information; determining whether each region has a rectangular object or not by using the horizontal position information and the vertical position information as a basis through the image segmentation algorithm, and if so, calibrating the region as a target region; and performing character recognition on the target area to acquire a corresponding license plate number. According to the invention, the target image is divided into regions, and whether each region corresponds to a rectangle or not is judged, so that the character recognition of the whole target image is not required, the operation of a processor is reduced, and the license plate number recognition efficiency is improved.

Description

Method and device for identifying license plate number based on image segmentation algorithm and terminal equipment
Technical Field
The application belongs to the technical field of information, and particularly relates to a method and device for recognizing license plate numbers based on an image segmentation algorithm, terminal equipment and a storage medium.
Background
Nowadays, the vehicle holding capacity and traffic running capacity of China are continuously increased, and the work task of road traffic management is increasingly heavy. Today, the development of artificial intelligence is rapid, and an intelligent traffic system takes place at the same time, gradually replaces the traditional artificial supervision, and becomes the mainstream system of the current traffic supervision. The system integrates multiple functions of license plate recognition, face recognition, road condition acquisition, violation evidence obtaining, traffic light supervision and the like, realizes information interaction through digital management, and effectively solves a plurality of problems in the field of traffic management.
Under the current hardware condition, the license plate number is the most critical identity information of the vehicle. However, the following steps are currently used to identify the license plate number: firstly, a camera or other image acquisition equipment is adopted to acquire an image, and then the image is integrally extracted and identified, so that the license plate number in the image is identified. Although this method can identify most license plate numbers, this method is to identify the whole image, and it needs to extract and identify all the information in the image, and the image often contains more interference factors, which results in a large amount of computation and increased burden on the processor. For some small parking lots and cells, the expense of purchasing expensive processors may not be affordable, resulting in an inability to keep pace with artificial intelligence automation.
In other words, the prior art is too inefficient in recognizing the license plate number.
Disclosure of Invention
The application provides a method and a device for identifying a license plate number based on an image segmentation algorithm, a terminal device and a storage medium, which can solve the problem that the efficiency of identifying the license plate number is too low in the prior art.
In a first aspect, the present invention provides a method for recognizing a license plate number based on an image segmentation algorithm, the method comprising:
inputting the acquired target image into a set training model, wherein the training model comprises an image segmentation algorithm;
dividing the target image into regions, and labeling each region to enable each region to contain horizontal position information and vertical position information;
determining whether each region has a rectangular object according to the horizontal position information and the vertical position information and through a determination function in the image segmentation algorithm, and if so, calibrating the region as a target region, wherein the determination function is as follows: n = ln ((L × a + W × b)/ab), in the above formula, N represents an output result, L represents horizontal position information, W represents vertical position information, a represents a first weight, b represents a second weight, and the first weight a and the second weight b are both real numbers greater than 0 and less than 1, and a ≠ b;
and performing character recognition on the target area to acquire a corresponding license plate number.
As a further optional aspect of the present invention, the target image is a preprocessed image, where the preprocessing includes one or more of gaussian filtering, adaptive filtering, median filtering, and mean filtering.
As a further optional scheme of the present invention, the step of performing region division on the target image and labeling each region, so that each region includes horizontal position information and vertical position information specifically includes:
calculating the length and width of the target image, and calculating the length-width ratio of the target;
carrying out region division on the target image according to the target length-width ratio obtained by calculation;
establishing a rectangular coordinate system by taking any vertex of the target image as an origin;
and taking the median of the abscissa of each region as the horizontal position information, and taking the median of the ordinate of each region as the vertical position information.
As a further optional aspect of the present invention, the step of determining whether a rectangular object exists in each region through a determination function in the image segmentation algorithm specifically includes:
setting the first weight a to be 0.5, setting the second weight b to be 0.3, and calculating an output result N of the determined function;
if the output result N meets the set contrast value, a rectangular object exists in the corresponding area;
and if the output result N does not meet the set contrast value, the corresponding area does not have the rectangular object.
As a further optional aspect of the present invention, the step of taking the horizontal position information and the vertical position information as input values of the image segmentation algorithm and outputting a corresponding output result specifically includes:
carrying out noise reduction processing on the horizontal position information and the vertical position information through a set noise reduction function to obtain noise-reduced horizontal position information and noise-reduced vertical position information;
and taking the horizontal position information after noise reduction and the vertical position information after noise reduction as input values of the image segmentation algorithm, and outputting corresponding output results.
As a further optional scheme of the present invention, the performing text recognition on the target area to obtain the corresponding license plate number specifically includes:
performing feature extraction on the target area to obtain a corresponding extraction result;
classifying the extraction result through a classifier to obtain a corresponding classification result;
normalizing the classification result to obtain information to be identified;
and extracting the character information and the digital information in the information to be identified so as to obtain the corresponding license plate number.
As a further alternative of the present invention, the image segmentation algorithm is a BP image segmentation algorithm based on an adaptive genetic algorithm.
In a second aspect, the present invention further provides an apparatus for segmenting an image based on a neural network, wherein the apparatus for recognizing a license plate number based on an image segmentation algorithm includes:
the input module is used for inputting the acquired target image into a set training model, wherein the training model comprises an image segmentation algorithm;
the marking module is used for carrying out region division on the target image and marking each region so that each region comprises horizontal position information and vertical position information;
the judging module is used for determining whether each area has a rectangular object or not through the image segmentation algorithm based on the horizontal position information and the vertical position information, and if so, calibrating the area as a target area;
and the recognition module is used for carrying out character recognition on the target area so as to obtain the corresponding license plate number.
In a third aspect, the present invention further provides a terminal device, where the terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the method for recognizing a license plate number based on an image segmentation algorithm.
In a fourth aspect, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to execute the method for identifying a license plate number based on an image segmentation algorithm.
The method provided by the invention can effectively improve the efficiency of license plate number recognition, thereby greatly reducing the burden of a processor and further reducing the cost of automatically recognizing the license plate number. Specifically, firstly, inputting an acquired target image into a training model containing an image segmentation algorithm; then, the target image is divided differently, and after the division is completed, corresponding horizontal position information and vertical position information are marked on each region; secondly, inputting the horizontal position information and the vertical position information of each region into an image segmentation algorithm, judging whether each region has a rectangular object or not through a determination function in the algorithm, and if so, calibrating the corresponding region as a target region; and finally, identifying the target area through a character identification algorithm so as to determine the license plate number in the target area. According to the invention, the target image is divided into regions, and whether each region has a rectangular object is judged, so that the license plate number in the target image can be recognized without performing character recognition on the whole target image, thereby reducing the operation of a processor and improving the efficiency of recognizing the license plate number.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a method for recognizing license plate numbers based on an image segmentation algorithm according to a preferred embodiment of the present invention.
FIG. 2 is a flowchart illustrating a license plate number recognition method based on an image segmentation algorithm according to another embodiment of the present invention.
FIG. 3 is a flowchart illustrating a method for recognizing license plate numbers based on an image segmentation algorithm according to another embodiment of the present invention.
FIG. 4 is a flowchart illustrating a method for recognizing a license plate number based on an image segmentation algorithm according to another embodiment of the present invention.
FIG. 5 is a flowchart of a method for recognizing license plate numbers based on an image segmentation algorithm according to another embodiment of the present invention
FIG. 6 is a block diagram of a license plate number recognition device according to a preferred embodiment of the present invention.
Fig. 7 is a block diagram of a terminal device according to a preferred embodiment of the present invention.
Detailed Description
The present invention provides a method, an apparatus, a terminal device and a storage medium for recognizing a license plate number based on an image segmentation algorithm, so that features and advantages of the present application can be more obvious and understandable, and technical solutions in embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In the description of the embodiments of the present application, it is to be understood that, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
It should be noted that the method for identifying a license plate number based on an image segmentation algorithm according to the embodiment of the present invention can be applied to, but is not limited to, the following scenarios:
in a first scene, a user transmits a collected target image to a cloud end through a network, and the cloud end carries out license plate identification by adopting the method for identifying the license plate number based on the image segmentation algorithm;
and in the second scene, the user inputs the acquired target image into local computer equipment, and the local computer equipment adopts the method for identifying the license plate number based on the image segmentation algorithm to identify the license plate number.
The following describes the license plate recognition based on the method for recognizing the license plate number by the image segmentation algorithm in the embodiment of the invention in detail.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for recognizing a license plate number based on an image segmentation algorithm according to a preferred embodiment of the present invention, wherein the method includes:
s101, inputting the acquired target image into a set training model, wherein the training model comprises an image segmentation algorithm.
The target image refers to an image including a license plate number acquired by an image acquisition device such as a video camera, a camera or a digital camera, and the image generally includes other factors such as an automobile. As a most preferable embodiment of the present invention, the training model including the image segmentation algorithm may be set in advance by a user, where the image segmentation algorithm is a BP image segmentation algorithm based on an adaptive genetic algorithm, and the training model is a neural network model based on the image segmentation algorithm. Genetic algorithms were first proposed in 1975 by Holland in the united states by his focus on "adaptability of nature and artificial systems", a class of random search algorithms that relies on natural selection and natural genetic mechanisms in biology. Essentially, the genetic algorithm is an iterative process, firstly, the candidate population left in each iteration is evaluated and selected through a fitness function, and then a new generation population of crossover and mutation operator essences is combined. With the development of the artificial intelligence research field, genetic algorithms are widely applied to the fields of fuzzy recognition, image processing and the like. Moreover, the scholars also propose a two-dimensional genetic algorithm improved based on the genetic algorithm, and the algorithm adopts a partitioned window crossing operator to breed individuals, dynamically adjusts the crossing rate, improves the convergence rate and further develops the image segmentation technology. Therefore, the invention can improve the efficiency of image segmentation by adopting the BP image segmentation algorithm based on the adaptive genetic algorithm. As for the neural network, it is a common technique, and refer to the descriptions of other prior arts, the present invention is not described in detail.
As a further optional aspect of the present invention, the target image is a preprocessed image, where the preprocessing includes one or more of gaussian filtering, adaptive filtering, median filtering, and mean filtering. The target image directly acquired by the image acquisition equipment often has more noise, so that the original image must be preprocessed, thereby reducing the noise in the original image and achieving the purpose of conveniently processing the target image subsequently. The preprocessing method can be varied, for example, gaussian noise is eliminated by gaussian filtering; eliminating echo, enhancing spectral lines or enhancing channels by adaptive filtering; eliminating isolated noise points through median filtering, so that surrounding pixels are closer to real values; and removing additive noise in the target image through mean filtering. Of course, the present invention does not limit the preprocessing manner, and the user may completely select one or more of the preprocessing manners according to the actual requirement, and of course, the user may also select other preprocessing manners, such as binarization, graying, histogram equalization, adaptive histogram equalization, or display contrast adaptive histogram equalization.
Referring again to fig. 1, the method further includes: and S102, carrying out region division on the target image, and labeling each region, so that each region comprises horizontal position information and vertical position information.
In order to accurately identify which regions in the target image may contain information related to the license plate number, the entire target image needs to be divided into regions, and then each divided region is labeled, specifically, horizontal position information and vertical position information of each region are registered.
Referring to fig. 2, the step S102 includes: and S1021, calculating the length and the width of the target image, and calculating the length-width ratio of the target. In this step, the length and width of the target image are first obtained, and then the ratio of the two is calculated and taken as the ratio of the length to the width of the target.
Referring to fig. 2 again, the step S102 further includes: and S1022, carrying out region division on the target image according to the calculated target length-width ratio. Since there is a difference in size (length/width) between the target images, the present invention preferably divides the target area using the target length/width ratio calculated in step S1021 for the convenience of the subsequent operations. For example, if the length of the target image is 20CM and the width is 12CM, obviously, the calculated ratio of the length to the width of the target is 5:3, and then the region division is performed according to the target ratio, and according to the target ratio, the target region can be divided into 4 regions, because the target region can be just divided into 4 regions according to the length of 5CM and the width of 3CM, that is, the 4 regions are rectangles with the length of 5 CM; for another example, if the length of the target image is 30CM and the width is 15CM, it is obvious that the calculated target aspect ratio is 2:1, and then the region division is performed at the target aspect ratio, and at the target aspect ratio, the target region can be divided into 2 regions since the target region can be just divided into 2 regions at the length of 15CM and the width of 7.5 CM.
Referring to fig. 2 again, the step S102 further includes: and S1023, establishing a rectangular coordinate system by taking any vertex of the target image as an origin. In order to obtain the horizontal position information and the vertical position information in detail, the horizontal position information and the vertical position information may be recorded in a horizontal and vertical coordinate manner. In the preferred embodiment of the present invention, a rectangular coordinate system is established with any vertex of the target image as an origin, but the method for establishing the coordinate system is not limited in the present invention, and the user may also establish a polar coordinate system with the central position of the target image as the origin, or establish a spherical coordinate system with any position of the target image as the origin, and so on.
Referring to fig. 2 again, the step S102 further includes: and S1024, taking the median of the horizontal coordinate of each region as the horizontal position information, and taking the median of the vertical coordinate of each region as the vertical position information. Taking the length of the target image as 20CM and the width as 12CM again as an example, as can be seen from the above description, the target region is divided into four regions, the four regions are named as a first region, a second region, a third region and a fourth region, if a rectangular coordinate system is established with the lower left vertex of the first region as the origin of coordinates, the coordinates of the four vertices of the first region are (0, 0), (5, 0), (0, 3) and (5, 3), and the coordinates of the vertices of the other regions can be obtained by simple calculation, which is not described in the present invention. Taking the median of the abscissa of each region as the horizontal position information specifically means taking the median of the length of the region as the horizontal position information, obviously, the horizontal position information of the first region in the above example is 2.5; taking the median of the ordinate of each region as the vertical position information specifically means taking the median of the width of the region as the horizontal position information, and it is obvious that the vertical position information of the first region in the above example is 1.5.
Referring again to fig. 1, the method further includes: s103, determining whether each region has a rectangular object or not by taking the horizontal position information and the vertical position information as a basis through a determination function in the image segmentation algorithm, and if so, calibrating the region as a target region, wherein the determination function is as follows: n = ln ((L × a + W × b)/ab), in the above formula, N denotes an output result, L denotes horizontal position information, W denotes vertical position information, a denotes a first weight, b denotes a second weight, and the first weight a and the second weight b are both real numbers greater than 0 and less than 1, and a ≠ b.
As most license plates are fixed on motor vehicles, and the shapes of the license plates are uniform rectangles (round corners are arranged around the license plates). Based on the above, the invention determines whether each region is a target region by judging whether the region has a rectangular object, and if the region has the rectangular object, the region may have information related to a license plate, and the region is marked as the target region.
In order to be able to determine the rectangular object in the target region more accurately, the invention determines it by means of a determination function. Specifically, two weights are set, namely a first weight a and a second weight b, wherein the first weight a and the second weight b are real numbers greater than 0 and less than 1, and a is not equal to b. For example, the first weight a is equal to 0.8, the second weight b is equal to 0.6, and so on. Calculating the product of the length position information L and a first weight a, then calculating the product of the width position information W and a second weight b, and then calculating the sum of the two products to obtain a target sum; then, calculating the ratio of the target sum to the product of the first weight a and the second weight b; finally, carrying out logarithmic operation on the ratio to obtain an output result N; and finally, judging whether the target area has the rectangular object or not according to the output result.
Referring to fig. 3, the step of determining whether a rectangular object exists in each region by the image segmentation algorithm specifically includes:
and S1031, setting the first weight a to be 0.5, setting the second weight b to be 0.3, and calculating an output result N of the determined function. In this step, the horizontal position information (median of the region length) and the vertical position information (median of the region span) calculated in step S1024 are set as the L value and the W value in N = ln ((L × a + W × b)/ab), and the corresponding output result N is calculated. Through a plurality of experiments of the inventor, it is found that whether the rectangular object exists in the target area can be accurately judged by setting the first weight a to be 0.5 and setting the second weight b to be 0.3.
Referring to fig. 4, the step S1031 specifically includes:
and S10311, performing noise reduction processing on the horizontal position information and the vertical position information through a set noise reduction function to obtain noise-reduced horizontal position information and noise-reduced vertical position information. Since the horizontal position information and the vertical position information of different target regions are different, in order to improve the accuracy, it is necessary to reduce noise in the horizontal position information and the vertical position information. The invention carries out noise reduction on horizontal position information and vertical position information by setting a noise reduction function, and the noise reduction function is various, for example, the noise reduction function can be an integer function, a rounding function and the like.
And S10312, taking the horizontal position information after noise reduction and the vertical position information after noise reduction as input values of the image segmentation algorithm, and outputting corresponding output results. After the noise reduction is finished, the horizontal position information after the noise reduction and the vertical position information after the noise reduction are used as input values of the image segmentation algorithm.
Referring again to fig. 3, the step of determining whether a rectangular object exists in each region by the image segmentation algorithm further includes:
s1032, if the output result N meets the set contrast value, a rectangular object exists in the corresponding area; s1033, if the output result N does not satisfy the set contrast value, the corresponding region does not have a rectangular object. The output result is compared with a preset contrast value, so that whether the rectangular object exists in the area is judged. More specifically, the comparison result is a real number, the comparison value is also a real number, and if the comparison result is greater than or equal to the comparison value, the corresponding region has a rectangular object; and if the comparison result is less than the comparison value, the corresponding area has no rectangular object. Preferably, the contrast value is 20. Through a plurality of experiments of the inventor, the contrast value is set to be 20, so that a plurality of irregular rectangular objects can be filtered, and the accuracy of identifying the rectangular objects is improved.
Referring again to fig. 1, the method further includes:
and S104, performing character recognition on the target area to acquire a corresponding license plate number.
In the above steps, character recognition is performed on the target area through a character recognition algorithm, so that the license plate number in the target area is determined.
Referring to fig. 5, as a further alternative of the present invention, the step S104 specifically includes:
s1041, extracting the characteristics of the target area to obtain a corresponding extraction result;
s1042, classifying the extraction result through a classifier to obtain a corresponding classification result;
s1043, normalizing the classification result to obtain information to be identified;
s1044, extracting the text information and the digital information in the information to be identified so as to obtain the corresponding license plate number.
The character recognition of the target area can be simply realized through the following steps, firstly, the characteristic extraction is carried out on the target area, and thus the character recognition area is determined; then, classifying the extraction result through a set classifier so as to determine which classifier is used by the region, such as a lower case letter classifier, an upper case letter classifier, a Chinese classifier, a character classifier and the like; then, carrying out normalization processing on the classification result so as to filter redundant noise information in the classification result and obtain information to be identified; and finally, extracting the character information and the digital information so as to determine the license plate number in the target area.
According to the invention, the target image is divided into regions and whether each region has a rectangular correspondence is judged, so that the license plate number in the target image can be recognized without performing character recognition on the whole target image, the operation of a processor is reduced, and the license plate number recognition efficiency is improved.
Referring to fig. 6, the present invention further provides an apparatus 10 for recognizing a license plate number based on an image segmentation algorithm, wherein the apparatus 10 for recognizing a license plate number based on an image segmentation algorithm comprises:
the input module 101 is configured to input an acquired target image into a set training model, where the training model includes an image segmentation algorithm;
the labeling module 102 is configured to perform region division on the target image and label each region, so that each region includes horizontal position information and vertical position information;
the judging module 103 determines whether each region has a rectangular object according to the horizontal position information and the vertical position information and through the image segmentation algorithm, and if so, the region is calibrated as a target region;
and the recognition module 104 is used for performing character recognition on the target area to acquire a corresponding license plate number.
The specific technical details for implementing the computer program when the terminal device 20 executes the computer program are discussed in detail in the foregoing method steps, and therefore are not described in detail herein.
Referring to fig. 7, the present invention further provides a terminal device 20, wherein the terminal device 20 includes a processor 210, a memory 220 and a computer program stored in the memory 220 and executable on the processor 210, and the processor executes the method for recognizing the license plate number based on the image segmentation algorithm.
The processor 210 may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), a single chip, an arm (acorn RISC machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. Also, processor 210 may be any conventional processor, microprocessor, or state machine. Processor 210 may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
The memory 220, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions corresponding to the method for recognizing license plate numbers based on an image segmentation algorithm in the embodiments of the present invention. The processor 210 executes various functional applications and data processing for recognizing the license plate number based on the image segmentation algorithm by running the nonvolatile software program, instructions and units stored in the storage device, that is, implements the method for recognizing the license plate number based on the image segmentation algorithm in the above method embodiments.
The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to execute the method of identifying a license plate number based on an image segmentation algorithm.
The computer readable storage medium may be an internal storage unit of the system according to any of the foregoing embodiments, for example, a hard disk or a memory of the system. The computer readable storage medium may also be an external storage device of the system, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the system. Further, the computer readable storage medium may also include both an internal storage unit and an external storage device of the system. The computer-readable storage medium is used for storing the computer program and other programs and data required by the system. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method for recognizing a license plate number based on an image segmentation algorithm is characterized by comprising the following steps:
inputting the obtained target image into a set training model, wherein the training model comprises an image segmentation algorithm, and the image segmentation algorithm is a BP (back propagation) image segmentation algorithm based on an adaptive genetic algorithm;
dividing the target image into regions, and labeling each region to enable each region to contain horizontal position information and vertical position information;
determining whether each region has a rectangular object according to the horizontal position information and the vertical position information and through a determination function in the image segmentation algorithm, and if so, calibrating the region as a target region, wherein the determination function is as follows: n = ln ((L × a + W × b)/ab), in the above formula, N represents an output result, L represents horizontal position information, W represents vertical position information, a represents a first weight, b represents a second weight, and the first weight a and the second weight b are both real numbers greater than 0 and less than 1, and a ≠ b;
performing character recognition on the target area to acquire a corresponding license plate number; specifically, the method comprises the following steps: performing feature extraction on the target area to obtain a corresponding extraction result; classifying the extraction result through a classifier to obtain a corresponding classification result; normalizing the classification result to obtain information to be identified; and extracting the character information and the digital information in the information to be identified so as to obtain the corresponding license plate number.
2. The method for recognizing the license plate number based on the image segmentation algorithm of claim 1, wherein the target image is a preprocessed image, and wherein the preprocessing comprises one or more of gaussian filtering, adaptive filtering, median filtering and mean filtering.
3. The method for recognizing the license plate number based on the image segmentation algorithm as claimed in claim 2, wherein the step of performing region division on the target image and labeling each region so that each region includes horizontal position information and vertical position information specifically comprises:
calculating the length and width of the target image, and calculating the length-width ratio of the target;
carrying out region division on the target image according to the target length-width ratio obtained by calculation;
establishing a rectangular coordinate system by taking any vertex of the target image as an origin;
and taking the median of the abscissa of each region as the horizontal position information, and taking the median of the ordinate of each region as the vertical position information.
4. The method for recognizing license plate number based on image segmentation algorithm as claimed in claim 3, wherein the step of determining whether the rectangular object exists in each region through the determination function in the image segmentation algorithm specifically comprises:
setting the first weight a to be 0.5, setting the second weight b to be 0.3, and calculating an output result N of the determined function;
if the output result N meets the set contrast value, a rectangular object exists in the corresponding area;
and if the output result N does not meet the set contrast value, the corresponding area does not have the rectangular object.
5. The method of claim 4, wherein the step of using the horizontal position information and the vertical position information as input values of the image segmentation algorithm and outputting corresponding output results specifically comprises:
carrying out noise reduction processing on the horizontal position information and the vertical position information through a set noise reduction function to obtain noise-reduced horizontal position information and noise-reduced vertical position information;
and taking the horizontal position information after noise reduction and the vertical position information after noise reduction as input values of the image segmentation algorithm, and outputting corresponding output results.
6. An apparatus for recognizing a license plate number based on an image segmentation algorithm, the apparatus comprising:
the input module is used for inputting the acquired target image into a set training model, wherein the training model comprises an image segmentation algorithm, and the image segmentation algorithm is a BP (back propagation) image segmentation algorithm based on an adaptive genetic algorithm;
the marking module is used for carrying out region division on the target image and marking each region so that each region comprises horizontal position information and vertical position information;
the judging module is used for determining whether each area has a rectangular object or not according to the horizontal position information and the vertical position information and a determining function in the image segmentation algorithm, and if so, calibrating the area as a target area; wherein the determination function is: n = ln ((L × a + W × b)/ab), in the above formula, N represents an output result, L represents horizontal position information, W represents vertical position information, a represents a first weight, b represents a second weight, and the first weight a and the second weight b are both real numbers greater than 0 and less than 1, and a ≠ b;
the recognition module is used for carrying out character recognition on the target area so as to obtain a corresponding license plate number, and specifically: performing feature extraction on the target area to obtain a corresponding extraction result; classifying the extraction result through a classifier to obtain a corresponding classification result; normalizing the classification result to obtain information to be identified; and extracting the character information and the digital information in the information to be identified so as to obtain the corresponding license plate number.
7. A terminal device, comprising a processor, a memory and a computer program stored on the memory and operable on the processor, wherein the processor, when executing the computer program, implements the method for recognizing a license plate number based on an image segmentation algorithm according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to carry out the method of identifying a license plate number based on an image segmentation algorithm according to any one of claims 1 to 5.
CN202110865372.0A 2021-07-29 2021-07-29 Method and device for identifying license plate number based on image segmentation algorithm and terminal equipment Active CN113313124B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110865372.0A CN113313124B (en) 2021-07-29 2021-07-29 Method and device for identifying license plate number based on image segmentation algorithm and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110865372.0A CN113313124B (en) 2021-07-29 2021-07-29 Method and device for identifying license plate number based on image segmentation algorithm and terminal equipment

Publications (2)

Publication Number Publication Date
CN113313124A CN113313124A (en) 2021-08-27
CN113313124B true CN113313124B (en) 2021-11-05

Family

ID=77382073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110865372.0A Active CN113313124B (en) 2021-07-29 2021-07-29 Method and device for identifying license plate number based on image segmentation algorithm and terminal equipment

Country Status (1)

Country Link
CN (1) CN113313124B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117079473A (en) * 2023-09-19 2023-11-17 广州巨时信息科技股份有限公司 Three-mode vehicle detection device and method based on radar

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101648701B1 (en) * 2015-06-26 2016-08-17 렉스젠(주) Apparatus for recognizing vehicle number and method thereof
CN109635637A (en) * 2018-10-30 2019-04-16 深圳市航天华拓科技有限公司 A kind of licence plate recognition method, device and calculate equipment
CN110414507B (en) * 2019-07-11 2022-07-26 深圳智优停科技有限公司 License plate recognition method and device, computer equipment and storage medium
CN111985471B (en) * 2020-07-14 2024-07-02 浙江大华技术股份有限公司 License plate positioning method, license plate positioning device and storage medium
CN112906690A (en) * 2021-01-25 2021-06-04 熵基科技股份有限公司 License plate segmentation model training method, license plate segmentation method and related device
CN112818865B (en) * 2021-02-02 2024-07-02 北京嘀嘀无限科技发展有限公司 Vehicle-mounted field image recognition method, recognition model establishment method, device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN113313124A (en) 2021-08-27

Similar Documents

Publication Publication Date Title
CN112528878B (en) Method and device for detecting lane line, terminal equipment and readable storage medium
CN110020592B (en) Object detection model training method, device, computer equipment and storage medium
WO2022126377A1 (en) Traffic lane line detection method and apparatus, and terminal device and readable storage medium
JP6192271B2 (en) Image processing apparatus, image processing method, and program
CN111950723A (en) Neural network model training method, image processing method, device and terminal equipment
CN111353385B (en) Pedestrian re-identification method and device based on mask alignment and attention mechanism
CN111160169A (en) Face detection method, device, equipment and computer readable storage medium
CN112307853A (en) Detection method of aerial image, storage medium and electronic device
CN110852327A (en) Image processing method, image processing device, electronic equipment and storage medium
CN117115117B (en) Pathological image recognition method based on small sample, electronic equipment and storage medium
CN107578011A (en) The decision method and device of key frame of video
CN109784171A (en) Car damage identification method for screening images, device, readable storage medium storing program for executing and server
CN111291646A (en) People flow statistical method, device, equipment and storage medium
CN113313124B (en) Method and device for identifying license plate number based on image segmentation algorithm and terminal equipment
CN111126248A (en) Method and device for identifying shielded vehicle
CN108960246B (en) Binarization processing device and method for image recognition
CN110659631B (en) License plate recognition method and terminal equipment
CN112966687B (en) Image segmentation model training method and device and communication equipment
CN110210425B (en) Face recognition method and device, electronic equipment and storage medium
CN111199228B (en) License plate positioning method and device
CN111488811A (en) Face recognition method and device, terminal equipment and computer readable medium
CN116824624A (en) Cow identity recognition method, system, equipment and storage medium
CN112287769B (en) Face detection method, device, equipment and storage medium
CN117975076A (en) Image classification method, electronic device and storage medium
CN114283087A (en) Image denoising method and related equipment

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