A license plate image correction method, license plate image correction device and storage medium
Through image segmentation network and perspective transformation technology, the problems of noise interference and angle transformation in license plate correction technology are solved, and the license plate correction effect with high accuracy and flexibility is achieved, which is suitable for a variety of license plate types.
Patent Information
- Application Number
- CN202110902411.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-06
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-08-06
AI Technical Summary
The existing license plate correction technology is greatly affected by noise, and it is impossible to obtain the overall license plate correction results or the correction effect is poor. Especially when the image shooting angle and vehicle posture change, it is difficult to achieve accurate correction.
An image segmentation network is adopted, including an encoder and a decoder, to process the corrected image, generate a license plate mask image, and perform perspective transformation by calculating the corner points of the license plate and the external rectangular frame to achieve the correction of the license plate.
It effectively resists noise interference, improves correction accuracy and effect, and can achieve overall correction of license plates. It is suitable for various license plate types, especially assists in subsequent identification, classification or tracking tasks under large angles.
Smart Images

Figure CN113723399B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a license plate image correction method, a license plate image correction device and a storage medium. Background Art
[0002] Due to the influence of factors such as the image shooting angle or the body posture of the target vehicle with the license plate, the acquired license plate often has a certain angle in each degree of freedom in space, which makes it difficult to perform a series of subsequent processing such as license plate recognition, license plate classification or tracking. License plate correction technology can be divided into two categories: license plate correction technology based on traditional image processing methods and license plate correction methods based on deep learning, but there are problems such as being greatly affected by noise, being unable to obtain the correction result of the entire license plate or having a poor correction effect. Summary of the invention
[0003] The present application provides a license plate image correction method, a license plate image correction device and a storage medium, which can improve the correction effect of the license plate.
[0004] In order to solve the above technical problems, the technical solution adopted in the present application is: to provide a license plate image correction method, the method comprising: based on an image segmentation network, processing the image to be corrected containing the license plate to be processed to obtain a first license plate mask image, the image segmentation network comprising an encoder and a decoder, the encoder is used to encode the image to be corrected to obtain a feature map, the decoder is used to decode the feature map according to the size of the corrected reference image corresponding to the license plate to be processed to obtain the first license plate mask image; based on the first license plate mask image, calculating the corner points of the license plate in the image to be corrected and the circumscribed rectangular frame of the license plate; based on the circumscribed rectangular frame and the corner points, correcting the image where the license plate is located to obtain a corrected license plate image.
[0005] In order to solve the above technical problems, another technical solution adopted in the present application is: to provide a license plate image correction device, which includes a memory and a processor connected to each other, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the license plate image correction method in the above technical solution.
[0006] In order to solve the above technical problems, another technical solution adopted in this application is: providing a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, it is used to implement the license plate image correction method in the above technical solution.
[0007] Through the above scheme, the beneficial effect of the present application is: the image to be corrected is input into the image segmentation network to obtain the first license plate mask image, the image to be corrected includes the license plate to be processed that needs to be corrected, the image segmentation network includes an encoder and a decoder, the encoder encodes the image to be corrected to obtain a feature map, and the decoder decodes the feature map according to the correction reference image size corresponding to the license plate to be processed to obtain the first license plate mask image; then the first license plate mask image is processed to obtain the corner points of the license plate in the image to be corrected and the circumscribed rectangular frame of the license plate; then the circumscribed rectangular frame and the corner points are processed to realize the correction of the image where the license plate is located; due to the use of the image segmentation network, compared with the correction scheme based on traditional image processing, it can effectively resist noise interference; and the first license plate mask image is used to obtain the corner points and the circumscribed rectangular frame of the license plate, and then the corner points and the vertices of the circumscribed rectangular frame are used to perform perspective transformation on the license plate image to realize image correction, the correction accuracy is higher, the correction effect is better, and the overall correction of the license plate can be realized. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0009] Figure 1 It is a flowchart of an embodiment of a license plate image correction method provided by the present application;
[0010] FIG2( a ) is a schematic diagram of an image to be corrected provided by the present application;
[0011] FIG2( b ) is a schematic diagram of a first license plate mask image corresponding to the image to be corrected in FIG2( a );
[0012] Figure 3 It is a flowchart of another embodiment of the license plate image correction method provided by the present application;
[0013] Figure 4 : is a schematic diagram of the structure of a salient object detection network provided in this application;
[0014] FIG5( a ) is another schematic diagram of an image to be corrected provided by the present application;
[0015] FIG5( b ) is a schematic diagram of a second license plate mask image corresponding to FIG5( a );
[0016] FIG5(c) is a schematic diagram of a circumscribed rectangular frame of the license plate area in FIG5(b);
[0017] FIG5( d ) is a schematic diagram of an intermediate license plate image provided by the present application;
[0018] FIG5( e ) is a schematic diagram of a corrected license plate image provided by the present application;
[0019] Figure 6 It is a structural schematic diagram of an embodiment of a license plate image correction device provided by the present application;
[0020] Figure 7 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0022] See also Figure 1 , Figure 1 : is a flow chart of an embodiment of a license plate image correction method provided by the present application, the method comprising:
[0023] Step 11: Based on the image segmentation network, the image to be corrected including the license plate to be processed is processed to obtain a first license plate mask image.
[0024] The image to be corrected is an image of the license plate to be processed that contains deformations such as horizontal tilt, vertical tilt or trapezoidal distortion. The image to be corrected can be captured by a camera device, or obtained from an image database; the image to be corrected is then input into an image segmentation image, so that the image segmentation network segments the image to be corrected and generates a segmentation result (i.e., a first license plate mask image); specifically, the first license plate mask image is a binary image, that is, the image segmentation network can divide the input image to be corrected into two categories. In this embodiment, the image segmentation network divides the image to be corrected into an area where the license plate is located (i.e., the license plate area) and an area where other objects / backgrounds other than the license plate are located (i.e., the non-license plate area), and finally forms a first license plate mask image.
[0025] Furthermore, the image segmentation network includes an encoder and a decoder, the encoder is used to encode the image to be corrected to obtain a feature map; the decoder is used to decode the feature map according to the size of the corrected reference image corresponding to the license plate to be processed, to obtain a first license plate mask image; specifically, the size of the corrected reference image is related to the image parameters corresponding to the license plate to be processed in the image to be corrected (such as: image quality, image size, image format or whether the background of the license plate to be processed is relatively complex, etc.), when the image quality is higher or the size of the license plate to be processed is larger, the size of the corrected reference image can be smaller; and the size of the first license plate mask image follows the size of the corrected reference image, when the size of the corrected reference image becomes larger, the size of the first license plate mask image becomes larger.
[0026] In a specific embodiment, the image segmentation network can be a salient object detection network, and the image to be corrected is sent to the salient object detection network to obtain the first license plate mask image. Salient object detection is an image segmentation method. Salient object detection based on deep learning can be regarded as a special case of image semantic segmentation, which divides the entire image into a foreground area and a background area; the structure of the salient object detection network is roughly the same as that of the image semantic segmentation network, which is divided into an encoder and a decoder, and the last layer of the decoder is a prediction layer; in the encoder stage, the size of the feature map is continuously reduced through the processing of the downsampling layer; in the decoder stage, the size of the feature map is gradually restored to the size of the original image (i.e., the input image of the salient object detection network) through the processing of the upsampling layer.
[0027] In this embodiment, the license plate is used as the foreground target. The salient target detection network can extract all pixels in the license plate area to obtain a complete mask of the license plate. For example, Figure 2(a)-2(b) As shown, Figure 2(a) shows the image to be corrected, and Figure 2(b) shows the first license plate mask image. The pixel value of the license plate area 21 is 0, and the pixel value of the non-license plate area 22 is 255. It can be understood that this embodiment only takes 0 and 255 as examples, and in actual applications, the pixel value of the first license plate mask image can be set by yourself.
[0028] In other embodiments, after the image to be corrected captured by the camera device is acquired, the image to be corrected may be preprocessed (for example, scaling, cropping, filtering or image enhancement) to improve the image quality or reduce the amount of data to be processed.
[0029] Step 12: Based on the first license plate mask image, calculate the corner points of the license plate in the image to be corrected and the circumscribed rectangular frame of the license plate.
[0030] After obtaining the first license plate mask image, license plate image correction post-processing can be performed; specifically, the first license plate mask image is first processed to obtain the outline (i.e., license plate outline) of the area where the license plate is located in the first license plate mask image (i.e., license plate area), and the outline is the pixel points on the outermost edge of the license plate area; then the circumscribed rectangular frame of the license plate area in the first license plate mask image is calculated; then the four corner points of the license plate (i.e., the upper left corner, lower left corner, upper right corner and lower right corner of the license plate) are calculated using the license plate outline and the circumscribed rectangular frame.
[0031] Furthermore, when the size of the first license plate mask image is the same as the size of the image to be identified, the license plate area in the first license plate mask image is the area where the license plate in the image to be identified is located; when the size of the first license plate mask image is different from the size of the image to be identified, the license plate area in the first license plate mask image can be scaled according to the size ratio between the two to obtain the area where the license plate in the image to be corrected is located.
[0032] Step 13: Based on the circumscribed rectangular frame and the corner points, the image where the license plate is located is corrected to obtain a corrected license plate image.
[0033] After obtaining the corner points of the license plate in the image to be corrected and the circumscribed rectangular frame of the license plate, a commonly used algorithm (eg, through perspective transformation) can be used to correct the image where the license plate is located (referred to as the license plate image).
[0034] The correction method provided in this embodiment extracts the license plate position and license plate boundary through the image segmentation network, which is simple to implement, greatly reduces the processing steps, and enhances the resistance to noise. Compared with the related art that can only process blue license plates to prevent noise interference, the solution provided in this embodiment can process various types of license plates and has stronger versatility. In addition, the solution provided in this embodiment can process the license plate separately to obtain the corrected license plate image without relying on the subsequent recognition network, making the use of the corrected license plate more flexible, and the image segmentation network directly outputs the pixel-level mask of the license plate instead of indirectly correcting it through the recognition effect, so the correction accuracy is higher and the correction effect is better; in addition, this method can effectively solve the problem of large angles of license plates, which is conducive to assisting subsequent further license plate recognition, classification or tracking tasks.
[0035] See also Figure 3 , Figure 3 : is a flow chart of another embodiment of the license plate image correction method provided by the present application, the method comprising:
[0036] Step 31: Based on the image segmentation network, the image to be corrected including the license plate to be processed is processed to obtain a first license plate mask image.
[0037] The image segmentation network includes an encoder and a decoder. In the decoder stage, the feature map needs to be restored to the original image size. Since semantic segmentation itself is a pixel-level classification and the shape of the target to be predicted is uncertain, in order to accurately obtain the target boundary, prediction has to be made on a feature map that is proportional to the size of the original image, resulting in a huge amount of calculation and a long time consumption. Based on this, this embodiment has been improved, and the designed network structure fully considers the characteristics of the license plate target and reduces the amount of calculation.
[0038] This embodiment takes into account that the tilted license plate is a quadrilateral. If it is downsampled, the slopes of its four sides will remain unchanged, and will not affect the core parameters of the license plate image correction. However, the maximum accuracy loss caused by downsampling the original feature map by N times is ±N pixels. Appropriate downsampling can reduce time consumption without affecting subsequent corrections. Therefore, the feature map can be restored to a certain size in the decoder. For example, the size of the feature map can be restored to one-fourth of the original image size, so as to achieve a balance between time consumption and accuracy.
[0039] In a specific embodiment, Figure 4 As shown, the image 41 to be corrected is input into a salient target detection network (not marked in the figure), which includes a residual block 42, a maximum pooling layer 43, a processing layer 44 and an upsampling layer 45. The processing layer 44 includes a convolution layer, a batch normalization layer (Batch Normalization, BN) and an activation layer (not marked in the figure). The activation function of the activation layer can use Rectified Linear Units (ReLU); after being processed by the salient target detection network, a first license plate mask image 46 is output. It can be seen that the size of the first license plate mask image 46 is smaller than the size of the image 41 to be corrected.
[0040] Step 32: Adjust the size of the first license plate mask image to the size of the image to be corrected to obtain a second license plate mask image.
[0041] After the first license plate mask image is acquired, the size of the first license plate mask image may be adjusted so that the size of the generated second license plate mask image is equal to the size of the image to be corrected. Figure 4 As shown, the first license plate mask image 46 is enlarged to obtain a second license plate mask image 47 .
[0042] Step 33: Obtain the contour of the license plate area in the second license plate mask image.
[0043] The second license plate mask image includes a license plate area. The license plate area in the second license plate mask image is the same as the license plate area where the license plate in the image to be corrected is located. The second license plate mask image is a binary image. The contour of the license plate area can be obtained by performing contour extraction processing on the binary image; for example, the contour can be obtained by performing edge detection processing on the second license plate mask image; or since the binary image has only two pixel values, a pixel threshold (for example: 255) can be set to compare whether the grayscale difference between a certain pixel point and a circle of surrounding pixels is greater than / equal to the pixel threshold. If so, the pixel point is a pixel point on the contour, thereby determining which pixel points among all the pixel points in the license plate area are pixel points on the contour, and all the screened out pixel points constitute the contour.
[0044] Step 34: Based on the outline, determine the corner points and the circumscribed rectangular frame.
[0045] The outline includes multiple pixel points, and the horizontal coordinate of the upper left corner of the circumscribed rectangular frame is the minimum value of the horizontal coordinates of all the pixel points. The height and width of the circumscribed rectangular frame can be determined based on the coordinate values of the pixel points, thereby determining the position of the circumscribed rectangular frame; specifically, the maximum value of the horizontal coordinate of all the pixel points and the minimum value of the horizontal coordinate of all the pixel points can be obtained, and the maximum value of the horizontal coordinate is subtracted from the minimum value of the horizontal coordinate to obtain the height of the circumscribed rectangular frame; the maximum value of the vertical coordinate of all the pixel points and the minimum value of the vertical coordinate of all the pixel points are obtained, and the maximum value of the vertical coordinate is subtracted from the minimum value of the vertical coordinate to obtain the width of the circumscribed rectangular frame.
[0046] Since the acquired second license plate mask image is at the pixel level, its outline is not necessarily a quadrilateral, and the four corners of the outline are not necessarily right angles. This embodiment uses the outline of the second license plate mask image and the circumscribed rectangular frame to determine the corner points of the license plate area; specifically, after obtaining the position of the circumscribed rectangular frame, calculate the distance between each vertex of the circumscribed rectangular frame and all pixel points in the license plate area; select the pixel point closest to each vertex as the corner point, and the corner points of the license plate area correspond one-to-one to the vertices of the circumscribed rectangular frame, that is, for each vertex of the circumscribed rectangular frame, loop through all pixel points on the outline to obtain the pixel point closest to the vertex, and this pixel point is the original corner point of the license plate before correction, and the four vertices of the circumscribed rectangular frame are the target corner points after correction.
[0047] It is understandable that the four corner points of the license plate area can also be obtained by other methods, such as: first calculating the four sides of the license plate area, and then calculating the intersection of the four sides. The corner points of the license plate area are the intersection points.
[0048] Step 35: Crop the image corresponding to the circumscribed rectangular frame from the image to be corrected to obtain the intermediate license plate image.
[0049] The position of the license plate area in the second license plate mask image is the same as that of the license plate area in the image to be corrected, and the position of the circumscribed rectangular frame of the license plate area in the second license plate mask image is the same as that of the circumscribed rectangular frame of the license plate area in the image to be corrected; after obtaining the position of the circumscribed rectangular frame in the second license plate mask image, the position in the image to be corrected that is the same as the position of the circumscribed rectangular frame is recorded as the license plate circumscribed position, and the image to be corrected is cropped along the license plate circumscribed position to obtain an intermediate license plate image.
[0050] Step 36: Establish a coordinate system with the upper left corner of the middle license plate image as the coordinate origin, and calculate the coordinate values of the corner points and the vertices of the circumscribed rectangular frame in the coordinate system respectively.
[0051] After obtaining the middle license plate image, calculate the new coordinates of the license plate area in the middle license plate image and the new coordinates of the circumscribed rectangular frame. For example, assuming that the upper left corner position of the circumscribed rectangular frame in the image to be corrected is (M1, N1), and the height and width of the circumscribed rectangular frame are a and b respectively, then the upper left corner position of the circumscribed rectangular frame in the middle license plate image is (1, 1), the upper right corner position is (1, b), the lower left corner position is (a, 1), and the lower right corner position is (a, b).
[0052] Step 37: Generate a corrected license plate image based on the coordinate values of the vertices, the coordinate values of the corner points and the intermediate license plate image.
[0053] First, the coordinate values of the corner points and the coordinate values of the vertices are used to calculate the transformation matrix; then, the transformation matrix is used to perform perspective transformation on the image where the license plate is located in the intermediate license plate image to obtain the corrected license plate image. It can be understood that the calculation method of the transformation matrix and the perspective transformation is the same as in the prior art, and will not be repeated here.
[0054] This embodiment corrects the license plate through perspective transformation. Compared with the correction scheme based on traditional image processing, the post-processing scheme designed in this embodiment relies on the license plate mask obtained by significant target detection to accurately extract the original corner points and target corner points of the license plate, ignoring noise interference, and has a higher correction accuracy.
[0055] In a specific embodiment, the image to be corrected shown in Figure 5(a) is processed by the above-mentioned salient target detection network to obtain a second license plate mask image; then the contour of the second license plate mask image is obtained to obtain the contour frame shown in Figure 5(c), and the extreme values of the second license plate mask image in the horizontal and vertical directions are obtained, so as to use the extreme values to obtain the circumscribed rectangular frame of the license plate, as shown in Figure 5(b); the license plate is cropped out from the image to be corrected according to the circumscribed rectangular frame of the license plate to obtain an intermediate license plate image, as shown in Figure 5(d); then the transformation matrix of the perspective transformation can be obtained based on the original corner points and target corner points of the license plate; the original license plate is perspectively transformed according to the transformation matrix to obtain the corrected license plate image, as shown in Figure 5(e).
[0056] This embodiment uses a salient target detection network combined with a license plate image correction post-processing method to correct the license plate. The salient target detection as a license plate extraction method can accurately extract each pixel belonging to the license plate, and then the four corner points of the license plate can be accurately obtained through the post-processing method and corrected through perspective transformation. Since the license plate mask is extracted by the salient target detection method, it is much more accurate than the traditional method to extract the license plate boundary corner points, and can also resist the influence of noise, and can be applied to various types of license plate image correction. Moreover, the improved salient target detection network proposes that the license plate image can be corrected by restoring the license plate to a certain proportion of the original feature map in the decoding stage, which takes into account the correction effect and time consumption. In addition, the solution provided in this embodiment can directly perform license plate image correction without relying on the license plate recognition network, and can obtain an independent license plate image correction result, and the correction effect and the flexibility of use of the corrected license plate image are better.
[0057] See also Figure 6 , Figure 6 It is a structural schematic diagram of an embodiment of a license plate image correction device provided in the present application. The license plate image correction device 60 includes a memory 61 and a processor 62 which are connected to each other. The memory 61 is used to store a computer program. When the computer program is executed by the processor 62, it is used to implement the license plate image correction method in the above embodiment.
[0058] The license plate image correction device provided in this embodiment combines significant target detection and post-correction processing. The license plate image correction post-processing can effectively parse the license plate mask provided by the significant target detection network, realize license plate image correction, and can simultaneously output the license plate position and correction result.
[0059] See also Figure 7 , Figure 7 It is a structural diagram of an embodiment of a computer-readable storage medium provided in the present application. The computer-readable storage medium 70 is used to store a computer program 71. When the computer program 71 is executed by a processor, it is used to implement the license plate image correction method in the above embodiment.
[0060] The computer-readable storage medium 70 may be a server, a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other media that can store program codes.
[0061] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0062] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0063] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0064] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A license plate image correction method, characterized in that: include: Based on an image segmentation network, the image to be corrected including the license plate to be processed is processed to obtain a first license plate mask image, wherein the image segmentation network includes an encoder and a decoder, wherein the encoder is used to encode the image to be corrected to obtain a feature map, and the decoder is used to decode the feature map according to a correction reference image size corresponding to the license plate to be processed to obtain the first license plate mask image; Based on the first license plate mask image, calculating the corner points of the license plate in the image to be corrected and the circumscribed rectangular frame of the license plate; Based on the circumscribed rectangular frame and the corner points, the image where the license plate is located is corrected to obtain a corrected license plate image; The step of correcting the image of the license plate based on the circumscribed rectangular frame and the corner points to obtain a corrected license plate image includes: Cut out the image corresponding to the circumscribed rectangular frame from the image to be corrected to obtain an intermediate license plate image; A coordinate system is established with the upper left corner of the middle license plate image as the coordinate origin, and the coordinate values of the corner point and the vertices of the circumscribed rectangular frame in the coordinate system are calculated respectively; Calculate a transformation matrix using the coordinate values of the corner points and the coordinate values of the vertices; The transformation matrix is used to perform perspective transformation on the image where the license plate is located in the intermediate license plate image to obtain the corrected license plate image.
2. The license plate image correction method according to claim 1, characterized in that: The size of the first license plate mask image is smaller than the size of the image to be corrected, and the step of calculating the corner points of the license plate in the image to be corrected and the circumscribed rectangular frame of the license plate based on the first license plate mask image comprises: Adjusting the size of the first license plate mask image to the size of the image to be corrected to obtain a second license plate mask image; Acquire the contour of the license plate area in the second license plate mask image, where the license plate area in the second license plate mask image is the same as the area where the license plate is located in the image to be corrected; Based on the outline, the corner points and the circumscribed rectangular frame are determined.
3. The license plate image correction method according to claim 2, characterized in that: The outline includes a plurality of pixel points, the horizontal coordinate of the upper left corner of the circumscribed rectangular frame is the minimum value of the horizontal coordinates of all the pixel points, and the step of determining the corner point and the circumscribed rectangular frame based on the outline includes: Based on the coordinate values of the pixel points, the height and width of the circumscribed rectangular frame are determined.
4. The license plate image correction method according to claim 3, characterized in that: The step of determining the height and width of the circumscribed rectangular frame based on the coordinate values of the pixel points comprises: Obtaining the maximum value of the horizontal coordinates of all the pixel points and the minimum value of the horizontal coordinates of all the pixel points, subtracting the maximum value of the horizontal coordinate from the minimum value of the horizontal coordinate to obtain the height of the circumscribed rectangular frame; The maximum value of the vertical coordinates of all the pixel points and the minimum value of the vertical coordinates of all the pixel points are obtained, and the maximum value of the vertical coordinate is subtracted from the minimum value of the vertical coordinate to obtain the width of the circumscribed rectangular frame.
5. The license plate image correction method according to claim 2, characterized in that: The step of determining the corner points and the circumscribed rectangular frame based on the contour further includes: Calculate the distance between each vertex of the circumscribed rectangular frame and all pixel points in the license plate area; The pixel point closest to the vertex is selected as the corner point.
6. The license plate image correction method according to claim 2, characterized in that: The second license plate mask image is a binary image, and the step of obtaining the contour of the license plate area in the second license plate mask image further includes: Perform contour extraction processing on the binary image to obtain the contour.
7. A license plate image correction device, characterized in that: It comprises a memory and a processor connected to each other, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the license plate image correction method according to any one of claims 1 to 6.
8. A computer-readable storage medium for storing a computer program, characterized in that: When the computer program is executed by a processor, it is used to implement the license plate image correction method according to any one of claims 1 to 6.
