Vehicle frame number image generation method, device, computer equipment and storage medium

By obtaining the original image of the frame number and performing perspective transformation, the frame number image is generated, which solves the problem in the existing technology that the identification and comparison of the frame number relies on manual measurement, and realizes the intelligent generation of the frame number image.

CN111738223BActive Publication Date: 2025-01-24刘丽
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010737464.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-28
Publication Date
2025-01-24
Estimated Expiration
2040-07-28

AI Technical Summary

Technical Problem

In the prior art, the identification and comparison process of frame numbers relies on manual measurement and data comparison, and lacks intelligent processing.

Method used

By obtaining the original image of the frame number, determine the vertex and camera coordinates of the text area, establish a perspective transformation matrix, transform the image perspective to the plane of the target frame number, and generate the frame number image.

Benefits of technology

The intelligent generation of the frame number image is achieved, the intelligence level of the processing process is improved, and artificial intervention is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111738223B_ABST
    Figure CN111738223B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image recognition technology, and in particular to a method, device, computer equipment and storage medium for generating a frame number image. The method comprises: obtaining an original frame number image; determining multiple vertices of a frame number text area in the original frame number image, and obtaining the original pixel coordinates of each vertex; based on the original pixel coordinates of each vertex, obtaining the camera coordinates of each vertex in a camera coordinate system from the point cloud data corresponding to the original frame number image; determining the actual pixel coordinates of each vertex in a target frame number plane according to the camera coordinates of each vertex; establishing a perspective transformation matrix according to the original pixel coordinates and actual pixel coordinates of each vertex; and according to the perspective transformation matrix, perspective transforming the original frame number image to the target frame number plane to obtain a frame number image. The use of this method can improve the level of intelligence in generating frame number images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and in particular to a method, device, computer equipment and storage medium for generating a vehicle frame number image. Background Art

[0002] The frame number is the only identification of a vehicle. During the annual vehicle inspection, it is very important to compare the frame number with the rubbing film to determine whether the frame number has been tampered with.

[0003] In the traditional method, the frame number size is collected manually, and then the collected data is compared with the rubbing film to determine whether the frame number has been changed.

[0004] However, the measurement and collection process is manually performed and the processing is not intelligent enough. Summary of the invention

[0005] Based on this, it is necessary to provide a vehicle frame number image generation method, device, computer equipment and storage medium that can intelligently generate vehicle frame number images in response to the above technical problems.

[0006] A method for generating a vehicle frame number image, characterized by comprising:

[0007] Get the original image of the vehicle frame number;

[0008] Determine multiple vertices of the vehicle number text area in the original vehicle number image, and obtain the original pixel coordinates of each vertex;

[0009] Based on the original pixel coordinates of each vertex, the camera coordinates in the camera coordinate system corresponding to each vertex are obtained from the point cloud data corresponding to the original image of the vehicle frame number;

[0010] According to the camera coordinates of each vertex, the actual pixel coordinates of each vertex in the target vehicle frame number plane are determined;

[0011] According to the original pixel coordinates and actual pixel coordinates of each vertex, a perspective transformation matrix is ​​established;

[0012] According to the perspective transformation matrix, the original VIN image is perspective transformed into the target VIN plane to obtain the VIN image.

[0013] In one embodiment, determining the actual pixel coordinates of each vertex in the target vehicle frame number plane according to the camera coordinates of each vertex includes:

[0014] Determine the target VSN plane;

[0015] According to the camera coordinates of each vertex, determine the plane coordinates of each vertex in the target vehicle frame number plane;

[0016] According to the plane coordinates of each vertex, the actual pixel coordinates of each vertex in the target vehicle frame number plane are determined.

[0017] In one embodiment, determining the actual pixel coordinates of each vertex in the target vehicle frame number plane according to the plane coordinates of each vertex includes:

[0018] Get the image accuracy of the original image of the vehicle frame number;

[0019] According to the plane coordinates of each vertex and the image accuracy of the original image of the vehicle frame number, the actual pixel coordinates of each vertex in the target vehicle frame number plane are determined.

[0020] In one embodiment, according to the perspective transformation matrix, the original frame number image is perspective transformed into the target frame number plane to obtain the frame number image, including:

[0021] According to the perspective transformation matrix, the original image of the vehicle frame number is perspective transformed into the target vehicle frame number plane to obtain the initial image of the vehicle frame number;

[0022] The initial image of the vehicle frame number is interpolated to obtain the vehicle frame number image.

[0023] In one embodiment, according to the perspective transformation matrix, the original image of the vehicle frame number is perspectively transformed into the target vehicle frame number plane to obtain the initial image of the vehicle frame number, including:

[0024] Determine the frame number text area to be perspective-transformed in the frame number original image according to the original pixel coordinates of each vertex;

[0025] According to the actual pixel coordinates of each vertex, a target area for perspective transformation in the target vehicle frame number plane is determined;

[0026] According to the perspective transformation matrix, the frame number text area is perspective transformed into the target area to obtain the frame number initial image.

[0027] In one embodiment, according to the perspective transformation matrix, the frame number text area is perspective transformed into the target area to obtain the frame number initial image, including:

[0028] Performing perspective transformation processing on the frame number text area through a perspective transformation matrix to determine each target pixel point of each original pixel point in the frame number text area in the target area;

[0029] Obtain the pixel value of each original pixel point in the original image of the vehicle frame number;

[0030] Each target pixel is filled based on the pixel value of each original pixel to obtain the initial image of the vehicle frame number.

[0031] In one embodiment, after obtaining the camera coordinates corresponding to each vertex from the point cloud data corresponding to the original image of the vehicle frame number, the method further includes:

[0032] Based on the camera coordinates of each vertex, establish the plane equation of the frame number;

[0033] According to the established frame number plane equation, verify whether multiple vertices are located in the same plane;

[0034] When it is verified that multiple vertices are located in the same plane, the plane coordinates of each vertex on the frame number plane are determined according to the camera coordinates corresponding to each vertex.

[0035] A vehicle frame number image generating device, comprising:

[0036] A vehicle frame number original image acquisition module is used to acquire the vehicle frame number original image;

[0037] The original pixel coordinate determination module is used to determine a plurality of vertices of the frame number text area in the frame number original image and obtain the original pixel coordinates of each vertex;

[0038] A camera coordinate determination module is used to obtain the camera coordinates in the camera coordinate system corresponding to each vertex from the point cloud data corresponding to the original image of the vehicle frame number based on the original pixel coordinates of each vertex;

[0039] An actual pixel coordinate determination module is used to determine the actual pixel coordinates of each vertex in the target vehicle frame number plane according to the camera coordinates of each vertex;

[0040] A perspective transformation matrix building module is used to build a perspective transformation matrix according to the original pixel coordinates and actual pixel coordinates of each vertex;

[0041] The vehicle frame number image generation module is used to transform the original vehicle frame number image into a target vehicle frame number plane according to the perspective transformation matrix to obtain the vehicle frame number image.

[0042] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods when executing the computer program.

[0043] A computer-readable storage medium stores a computer program, which implements the steps of any one of the methods described above when the computer program is executed by a processor.

[0044] The above-mentioned frame number image generation method, device, computer equipment and storage medium obtain the frame number original image; determine multiple vertices of the frame number text area in the frame number original image, and obtain the original pixel coordinates of each vertex; based on the original pixel coordinates of each vertex, obtain the camera coordinates corresponding to each vertex from the point cloud data corresponding to the frame number original image; determine the actual pixel coordinates of each vertex in the target frame number plane according to the camera coordinates of each vertex; establish a perspective transformation matrix according to the original pixel coordinates and actual pixel coordinates of each vertex; according to the perspective transformation matrix, perspective transform the frame number original image to the target frame number plane to obtain the frame number image. Therefore, the actual pixel coordinates in the target frame number plane can be determined directly according to the acquired frame number original image and point cloud data, and the perspective transformation matrix can be established and the frame number original image can be perspective transformed, so that the frame number image can be intelligently generated without human intervention, thereby improving the intelligence level of the processing process. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A diagram showing an application scenario of a method for generating a vehicle frame number image in an embodiment;

[0046] Figure 2 A schematic diagram of a process of generating a vehicle frame number image in one embodiment;

[0047] Figure 3 A schematic diagram of an image output by a semantic segmentation model in one embodiment;

[0048] Figure 4 is a schematic diagram of an original image of a vehicle frame number in one embodiment;

[0049] Figure 5 is a schematic diagram of a virtual coordinate system constructed in one embodiment;

[0050] Figure 6 A schematic diagram of a flow chart of a method for generating a vehicle frame number image in another embodiment;

[0051] Figure 7 A schematic diagram of a vehicle frame number image generated in one embodiment;

[0052] Figure 8 is a structural block diagram of a vehicle frame number image generating device in one embodiment;

[0053] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] The vehicle frame number image generation method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the acquisition terminal 102 communicates with the server 104 through the network. Specifically, the acquisition terminal 102 acquires the frame number image on the frame to obtain the original frame number image, and then sends the original frame number image to the server 104. After acquiring the original frame number image acquired by the acquisition terminal 102, the server 104 determines multiple vertices of the frame number text area from the original frame number image, and obtains the original pixel coordinates of each vertex. Further, based on the original pixel coordinates of each vertex, the server 104 obtains the camera coordinates of each vertex in the camera coordinate system from the point cloud data corresponding to the original frame number image, and determines the actual pixel coordinates of each vertex in the target frame number plane according to the camera coordinates of each vertex. Further, the server 104 establishes a perspective transformation matrix according to the original pixel coordinates of each vertex and the actual pixel coordinates, and then perspective transforms the original frame number image to the target frame number plane according to the perspective transformation matrix to obtain the frame number image. The acquisition terminal 102 may be, but is not limited to, various acquisition devices such as cameras, video cameras, and video recorders with acquisition and data transmission functions, and the server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0056] In one embodiment, Figure 2 As shown, a method for generating a frame number image is provided, and the method is applied to Figure 1 The server in the example is used to illustrate the following steps:

[0057] Step S202, obtaining the original image of the vehicle frame number.

[0058] The original image of the vehicle frame number refers to an image generated by collecting the vehicle frame number on the vehicle frame through the collection terminal, and may refer to a collected color image. In this embodiment, the original image of the vehicle frame number includes R, G, and B three-channel pixel values.

[0059] In this embodiment, after acquiring the original image of the vehicle frame number, the acquisition terminal may send the acquired original image of the vehicle frame number to the server and store it in the server database.

[0060] Furthermore, when the server receives a request to process the original image corresponding to the vehicle frame number, the stored original image of the vehicle frame number can be obtained from the database, and then subsequent processing can be performed.

[0061] In this embodiment, the original image of the frame number stored in the database can be stored according to the date of collection and the collected vehicle number. The server can query the database with the vehicle number and the collection date as query conditions to obtain the corresponding original image of the frame number.

[0062] Step S204, determining a plurality of vertices of the vehicle number text area in the original vehicle number image, and obtaining the original pixel coordinates of each vertex.

[0063] The frame number text area refers to the area where the frame number text content is located in the original frame number image. For example, Figure 3 .

[0064] The vertex refers to a point in the original image of the vehicle frame number that determines the area where the vehicle frame number text content is located. For a rectangular area, the vertex refers to a corner point of the rectangular area.

[0065] The original pixel coordinates refer to the pixel coordinates of the positions of each vertex in the original image of the vehicle frame number.

[0066] In this embodiment, after obtaining the original image of the vehicle frame number, the server may input the original image of the vehicle frame number into a pre-trained semantic segmentation model, so as to identify and segment the vehicle frame number text content in the original image of the vehicle frame number through the semantic segmentation model, and obtain a segmentation map of each vehicle frame number text content, such as Figure 4 shown.

[0067] Furthermore, based on the segmentation map, the server obtains the highest point and lowest point pixel coordinates of the first text character and the last text character in the frame number text content in the original frame number image, thereby obtaining the pixel coordinates of multiple vertices of the frame number text area.

[0068] Step S206 , based on the original pixel coordinates of each vertex, the camera coordinates in the camera coordinate system corresponding to each vertex are obtained from the point cloud data corresponding to the original image of the vehicle frame number.

[0069] Among them, point cloud data refers to the depth information data collected by the depth camera.

[0070] In this embodiment, the acquisition device is a module that has both an RGB camera and a depth point cloud camera, and before image acquisition, the images of the RGB camera and the depth point cloud camera have been aligned.

[0071] In this embodiment, the operator can collect the original image of the vehicle frame number through a collection device having both an RGB camera and a depth point cloud camera, and generate corresponding point cloud data at the same time. There is a one-to-one correspondence between the generated point cloud data and each pixel in the original image of the vehicle frame number.

[0072] In this embodiment, the server can obtain the camera coordinates of each vertex in the camera coordinate system from the point cloud data according to the correspondence between the point cloud data and each pixel point in the original image of the vehicle frame number and according to the original pixel coordinates of each vertex.

[0073] In this embodiment, continue to refer to Figure 4 , multiple vertices are P0, P1, P2, and P3, and the original pixel coordinates corresponding to the frame number of each vertex in the original image can be expressed as oriP0 (not shown), oriP1 (not shown), oriP2 (not shown), and oriP3 (not shown), respectively. The server obtains the coordinates of the camera coordinate system corresponding to the multiple vertices from the point cloud information, which can be expressed as cP0 (not shown), cP1 (not shown), cP2 (not shown), and cP3 (not shown), that is, the original pixel coordinate oriP0 corresponding to the P0 vertex corresponds to cP0, the original pixel coordinate oriP1 corresponding to the P1 vertex corresponds to cP1, the original pixel coordinate oriP2 corresponding to the P2 vertex corresponds to cP2, and the original pixel coordinate oriP3 corresponding to the P3 vertex corresponds to cP3.

[0074] Specifically, the above-mentioned original pixel coordinates and camera coordinates can be expressed as oriP0 (oriP0.x, oriP0.y), oriP1 (oriP1.x, oriP1.y), oriP2 (oriP2.x, oriP2.y), oriP3 (oriP3.x, oriP3.y), cP0 (cP0.x, cP0.y, cP0.z), cP1 (cP1.x, cP1.y, cP1.z), cP2 (cP2.x, cP2.y, cP2.z) and cP3 (cP3.x, cP3.y, cP3.z), each camera coordinate contains three coordinate dimensions of x, y and z.

[0075] Step S208, determining the actual pixel coordinates of each vertex in the target vehicle frame number plane according to the camera coordinates of each vertex.

[0076] The target vehicle frame number plane refers to the plane corresponding to the vehicle frame number in the actual vehicle, which is a virtual coordinate plane. The actual pixel coordinates refer to the actual pixel coordinate positions of each vertex in the target vehicle frame number plane.

[0077] In this embodiment, after the server obtains the camera coordinates of each vertex from the point cloud data, the server can determine the actual pixel coordinates of each vertex in the target vehicle frame number plane according to the camera coordinates.

[0078] Step S210: establishing a perspective transformation matrix according to the original pixel coordinates and the actual pixel coordinates of each vertex.

[0079] The perspective transformation matrix refers to a transformation matrix that transforms the original VIN image into the target VIN plane.

[0080] In this embodiment, after determining the original pixel coordinates and the actual pixel coordinates, the server can establish a perspective transformation matrix according to the original pixel coordinates and the actual pixel coordinates, and then perform perspective transformation on the original image of the vehicle frame number.

[0081] Specifically, the server can establish a perspective transformation matrix by using the following calculation formula (1):

[0082]

[0083] Among them, A is the matrix composed of the original pixel coordinates of multiple vertices, B is the matrix composed of the actual pixel coordinates of multiple vertices, a 11 ~a 33 Compose the perspective transformation matrix.

[0084] Step S212: According to the perspective transformation matrix, the original VIN image is perspective transformed to the target VIN plane to obtain the VIN image.

[0085] In this embodiment, after establishing the perspective transformation matrix, the server can generate the frame number image according to the original frame number image determined by the original pixel coordinates, the target area determined by the actual pixel coordinates, and the perspective transformation matrix.

[0086] In the above-mentioned frame number image generation method, the frame number original image is obtained; multiple vertices of the frame number text area in the frame number original image are determined, and the original pixel coordinates of each vertex are obtained; based on the original pixel coordinates of each vertex, the camera coordinates corresponding to each vertex are obtained from the point cloud data corresponding to the frame number original image; according to the camera coordinates of each vertex, the actual pixel coordinates of each vertex in the target frame number plane are determined; according to the original pixel coordinates of each vertex and the actual pixel coordinates, a perspective transformation matrix is ​​established; according to the perspective transformation matrix, the frame number original image is perspectively transformed into the target frame number plane to obtain the frame number image. Therefore, the actual pixel coordinates in the target frame number plane can be determined directly according to the obtained frame number original image and point cloud data, and the perspective transformation matrix can be established and the frame number original image can be perspectively transformed, so that the frame number image can be intelligently generated without human intervention, thereby improving the intelligence level of the processing process.

[0087] In one embodiment, determining the actual pixel coordinates of each vertex in the target frame number plane according to the camera coordinates of each vertex may include: determining the target frame number plane; determining the plane coordinates of each vertex in the target frame number plane according to the camera coordinates of each vertex; and determining the actual pixel coordinates of each vertex in the target frame number plane according to the plane coordinates of each vertex.

[0088] In this embodiment, the server may establish a virtual coordinate system, and use the plane where the virtual coordinate system is located as the target VIN plane.

[0089] Specifically, the server can map cp0 in the camera coordinate system to the point in the target frame number plane as the origin, map cp0 and cp1 in the camera coordinate system to the target frame number plane in the straight line as the x-axis, the direction of cp0 pointing to cp1 is positive, and the direction through the origin perpendicular to the x-axis is the y-axis, to establish the target frame number plane.

[0090] In this embodiment, after the server establishes the target vehicle frame number plane, the plane coordinates corresponding to the multiple vertices P0, P1, P2, and P3 in the original vehicle frame number image in the target vehicle frame number plane can be represented as IP0, IP1, IP2, and IP3, respectively. Figure 5 , respectively represented as IP0 (IP0.x, IP0.y), IP1 (IP1.x, IP1.y), IP2 (IP2.x, IP2.y), IP3 (IP3.x, IP3.y). Among them, since the point where cp0 is mapped to the target frame number plane is the origin, the straight line where cp0 and cp1 are mapped to the target frame number plane in the camera coordinate system is the x-axis, therefore, IP0.x is 0, IP0.y is 0, and IP1.x is 0. Further, the server can solve the plane coordinates of each vertex by the correspondence between the plane coordinates of each vertex in the target frame number plane and the camera coordinates of each vertex in the camera coordinate system.

[0091] Specifically, the camera coordinates of each vertex obtained by the server from the point cloud data are cP0 (cP0.x, cP0.y, cP0.z), cP1 (cP1.x, cP1.y, cP1.z), cP2 (cP2.x, cP2.y, cP2.z) and cP3 (cP3.x, cP3.y, cP3.z). The server can calculate the plane coordinates of each vertex based on the following formula:

[0092] (IP1.x) 2 =(cP0.x-cP1.x) 2 +(cP0.y-cP1.y) 2 +(cP0.z-cP1.z) 2 ;

[0093] (IP1.x–IP2.x) 2 +(IP2.y) 2 =(cP2.x-cP1.x) 2 +(cP2.y-cP1.y) 2 +(cP2.z-cP1.z) 2 ;

[0094] (IP2.x–IP3.x) 2 +(IP2.y–IP3.y) 2 =(cP2.x-cP3.x) 2 +(cP2.y-cP3.y) 2 +(cP2.z-cP3.z) 2 ;

[0095] (IP3.x) 2 +(IP3.y) 2 =(cP0.x–cP3.x) 2 +(cP0.y-cP3.y) 2 +(cP0.z-cP3.z) 2 ;

[0096] (IP1.x–IP3.x) 2 +(IP3.y) 2 =(cP3.x-cP1.x) 2 +(cP3.y-cP1.y) 2 +(cP3.z-cP1.z) 2 ;

[0097] (IP2.x) 2 +(IP2.y) 2 =(cP2.x-cP0.x) 2 +(cP2.y-cP0.y) 2 +(cP2.z-cP0.z) 2 ;

[0098] Among them, IP1.x>0, IP2.y>0, IP3.y>0.

[0099] In this embodiment, reference Figure 6 After obtaining the plane coordinates of each vertex in the target vehicle frame number plane, the server can obtain the actual pixel coordinates of each vertex in the target vehicle frame number plane based on the corresponding relationship between the pixel coordinates and the plane coordinates.

[0100] In one embodiment, determining the actual pixel coordinates of each vertex in the target frame number plane according to the plane coordinates of each vertex may include: acquiring the image accuracy of the original image of the frame number; and determining the actual pixel coordinates of each vertex in the target frame number plane according to the plane coordinates of each vertex and the image accuracy of the original image of the frame number.

[0101] In this embodiment, the server can calculate the actual pixel coordinates of each plane coordinate according to the pixel size calculation formula, and the pixel size calculation formula is shown in the following formula (2):

[0102] L mm =25.4*L pixel / DPI(2)

[0103] DPI refers to the image accuracy of the original image of the vehicle frame number, such as 150DPI, 300DPI, etc., which can be determined according to the acquisition accuracy of the acquisition device. mm is the plane coordinate, the unit is mm, L pixel are pixel coordinates in pixels.

[0104] In this embodiment, the server can calculate the actual pixel coordinates of each vertex through the above-mentioned calculation formula, the plane coordinates of each vertex and the image accuracy of the original image of the vehicle frame number, that is, the actual pixel coordinates corresponding to the plane coordinates IP0 (IP0.x, IP0.y) are newP0 (newP0.x, newP0.y), the actual pixel coordinates corresponding to IP1 (IP1.x, IP1.y) are newP1 (newP1.x, newP1.y), the actual pixel coordinates corresponding to IP2 (IP2.x, IP2.y) are newP2 (newP2.x, newP2.y), and the actual pixel coordinates corresponding to IP3 (IP3.x, IP3.y) are newP3 (newP3.x, newP3.y). Among them, newP0.x=IP0.x*DPI / 25.4, newP0.y=IP0.y*DPI / 25.4, newP1.x=IP1.x*DPI / 25.4, newP1.y=IP1.y*DPI / 25. 4. newP2.x=IP2.x*DPI / 25.4, newP2.y=IP2.y*DPI / 25.4, newP3.x=IP3.x*DPI / 25.4, newP3.y=IP3.y*DPI / 25.4.

[0105] In the above embodiment, by determining the target frame number plane, the plane coordinates of each vertex in the target frame number plane are determined according to the camera coordinates of each vertex, and then the actual pixel coordinates of each vertex in the target frame number plane are determined according to the plane coordinates of each vertex. Thus, the actual pixel coordinate position of each vertex in the target frame number plane can be determined according to the camera coordinates of each vertex, so that the generated frame number image can meet the actual size requirements.

[0106] In one embodiment, perspective transforming the original frame number image into a target frame number plane according to a perspective transformation matrix to obtain a frame number image may include: perspective transforming the original frame number image into a target frame number plane according to the perspective transformation matrix to obtain an initial frame number image; and interpolating the initial frame number image to obtain the frame number image.

[0107] Specifically, continue to refer to Figure 6 After obtaining the perspective transformation matrix, the server can obtain a frame number image that corresponds one-to-one to the actual frame number image based on the original frame number image according to the obtained perspective transformation matrix.

[0108] In this embodiment, after the server performs perspective transformation on the original image of the vehicle frame number based on the perspective transformation matrix, since the image pixels before and after the perspective transformation are not completely one-to-one corresponding, it is necessary to interpolate the generated image through an interpolation algorithm. For example, the server can interpolate the initial image of the vehicle frame number obtained after the perspective transformation through Lagrange interpolation, Newton interpolation, piecewise linear interpolation, piecewise cubic Hermite interpolation, spline interpolation function, etc. to obtain the vehicle frame number image, such as Figure 7 shown.

[0109] In the above embodiment, by performing interpolation processing on the initial frame number image obtained after perspective transformation to obtain the frame number image, each pixel point in the obtained frame number image can be filled with a corresponding pixel value, thereby improving the accuracy of the generated frame number image.

[0110] In one embodiment, perspective transforming the original frame number image into a target frame number plane according to a perspective transformation matrix to obtain the initial frame number image may include: determining a frame number text area for perspective transformation in the original frame number image according to the original pixel coordinates of each vertex; determining a target area for perspective transformation in the target frame number plane according to the actual pixel coordinates of each vertex; and perspective transforming the frame number text area into the target area according to the perspective transformation matrix to obtain the initial frame number image.

[0111] In this embodiment, the server can determine the area where the frame number text is located in the original frame number image based on the original pixel coordinates of multiple vertices obtained by the semantic segmentation model. Similarly, the server can determine the target area of ​​the frame number image to be generated based on the actual pixel coordinates of each vertex in the target frame number plane. Further, the server perspectively transforms the frame number text area in the original frame number image into the target area of ​​the target frame number plane based on the calculated perspective transformation matrix to generate the initial frame number image.

[0112] In one of the embodiments, perspective transforming the frame number text area into a target area according to a perspective transformation matrix to obtain an initial image of the frame number may include: performing perspective transformation processing on the frame number text area through a perspective transformation matrix to determine target pixels of original pixels in the frame number text area in the target area; obtaining pixel values ​​of original pixels in the original image of the frame number; and filling target pixels based on the pixel values ​​of original pixels to obtain the initial image of the frame number.

[0113] Specifically, the server may traverse the frame number text region in the original frame number image according to the obtained perspective transformation matrix, and obtain target pixel points after perspective transformation of each pixel point in the frame number text region.

[0114] Then, the server obtains the pixel value of each pixel in the frame number text area from the original frame number image, that is, the value of the three RGB channels, and fills it into the target pixel after perspective transformation to obtain the initial frame number image.

[0115] In this embodiment, the server may obtain the pixel value of each pixel point based on the correspondence between the pixel point before the perspective transformation and the target pixel point after the perspective transformation, and fill each target pixel point.

[0116] In the above embodiment, by obtaining the pixel value of each original pixel point in the original image of the vehicle frame number, each target pixel point is filled based on the pixel value of each original pixel point, so that the generated vehicle frame number image contains the pixel value in the original image of the vehicle frame number, retains the information of the original image of the vehicle frame number, and improves the accuracy of image generation.

[0117] In one of the embodiments, since there may be slight deviations in the vertices of the frame number text area segmented by the semantic segmentation model, in order to ensure that the generated frame number image is a one-to-one restored image and the information of the frame number text area is complete and not lost, the server may offset the actual pixel coordinates by a certain offset before establishing the perspective transformation matrix, and establish the perspective transformation matrix based on the actual pixel coordinates after the offset.

[0118] Specifically, the server may first determine the starting coordinates (u0, v0) of the target area in the target VIN plane after perspective transformation, where v0 = Offset0, and Offset1 is determined by the following formula (3):

[0119]

[0120] Among them, Offset0 and Offset1 are both positive.

[0121] In this embodiment, since the coordinates of the P3 vertex in the target vehicle frame number plane may be located on the left side of the y-axis or on the right side of the y-axis, that is, the actual pixel coordinates of the P3 vertex in the x-axis direction may be positive or negative, when the actual pixel coordinates of each vertex are offset, the offset in the x-direction may be different according to the actual pixel coordinates of the P3 vertex in the x-axis direction, that is, when the actual pixel coordinates of the P3 vertex in the x-axis direction are negative, u0=Offset1+|newP3.x|, and when the actual pixel coordinates of the P3 vertex in the x-axis direction are positive, u0=Offset1.

[0122] In this implementation, the server can obtain the perspective transformation matrix by calling the Open CV function get Perspective Transform (const Point2f src[], const Point2f dst[]), where src[] is the original pixel coordinates of each vertex oriP0, oriP1, oriP2, oriP3, and dst[] is the actual pixel coordinates of each vertex after offset, newP0+(u0,v0), newP1+(u0,v0), newP2+(u0,v0), newP3+(u0,v0).

[0123] Further, the server can call void warp Perspective(Input Array src, OutputArray dst, Input Array M, Size dsize, int flags = INTER_LINEAR, int border Mode = BORDER_CONSTANT, const Scalar&border Value = Scalar()) to output the vehicle frame number image. Wherein, src is the original image of the vehicle frame number, dst is the target area, M is the perspective transformation matrix, dsize is the size of the output image, and flags is the interpolation method. In this embodiment, the horizontal size of dsize is max(newP1.x, newP2.x)-min(newP0.x, newP3.x)+2*Offset1, and the vertical size is max(newP2.y, newP3.y)+2*Offset0.

[0124] In the above embodiment, the actual pixel coordinates are offset by a certain offset, so that the information of the frame number text area can be intact without loss, and the integrity of the generated frame number image can be improved.

[0125] In one of the embodiments, after obtaining the camera coordinates corresponding to each vertex from the point cloud data corresponding to the original image of the frame number, it can also include: establishing a frame number plane equation based on the camera coordinates of each vertex; verifying whether multiple vertices are located in the same plane according to the established frame number plane equation; when it is verified that multiple vertices are located in the same plane, continuing to determine the plane coordinates of each vertex on the frame number plane according to the camera coordinates corresponding to each vertex.

[0126] In this embodiment, continue to refer to Figure 6 ,After obtaining the camera coordinates of each vertex, the server can verify whether the multiple vertices are on the same plane based on the camera coordinates of each vertex.

[0127] Specifically, the server may establish an overdetermined set of equations for the frame number plane equation based on the camera coordinates of each vertex, and then solve the overdetermined set of equations by the least squares method to obtain the frame number plane equation.

[0128] Specifically, the plane equation is Ax+By+Cz+D=0, where A, B, C, and D are parameters of the plane equation. The server can solve the vehicle frame number plane equation group according to the obtained camera coordinates of each vertex in the camera plane.

[0129] In this embodiment, since the frame number plane cannot pass through the origin during the image acquisition process, D is not equal to 0. Therefore, both sides of the frame number plane equation are divided by D, and the equation is simplified to ax+by+cz=1, and the parameters are reduced to 3, namely a, b, and c.

[0130] Furthermore, the server can bring the camera coordinates of each vertex into the simplified VIN plane equation to obtain four sets of equations, that is, an overdetermined set of equations.

[0131] The server can then use singular value decomposition to solve the least squares method to solve the parameters of the overdetermined system of equations to obtain the optimal solution to the overdetermined system of equations, thereby obtaining the frame number plane equation.

[0132] In this embodiment, the server can use singular value decomposition to solve the least square method to solve the parameters of the overdetermined equations by calling the open cv function solve: bool solve(Input Array src1, Input Array src2, Output Array dst, int flags). Among them, the first parameter Input Array src1 is the input matrix. In this embodiment, Input Array src1 is the camera coordinate matrix of the four vertices. The matrix expression is shown in the following formula (4). The second parameter Input Array src2 is the right part of the linear system, [1,1,1] -T The third parameter Output Arraydst is the output solution, which is the matrix [a, b, c] that needs to be solved. -T The fourth parameter int flags is the solution, and you can choose CV_SVD-singular value decomposition (SVD).

[0133] In this embodiment, the function returns true to indicate a successful solution, and false to indicate a failed solution.

[0134]

[0135] Furthermore, the server can verify whether multiple vertices are located in the same plane based on the established VIN plane equation.

[0136] Specifically, the server first determines the center point of multiple vertices, and obtains the camera coordinates of the center point in the camera coordinate system from the point cloud data. Then, the server selects a preset number of points from the multiple vertices and the center point to form a point set, thereby obtaining multiple point sets.

[0137] Furthermore, the server performs error calculation on the plane equation of the vehicle frame number based on the camera coordinates of each point in each point set to obtain multiple error values.

[0138] Furthermore, the server counts the number of errors greater than a preset error value among the multiple error values, and calculates an average error of the multiple error values.

[0139] Further, the server determines whether the number of errors and the average error meet the preset requirements, and when the number of errors and the average error meet the preset requirements, it continues to determine the plane coordinates of each vertex on the frame number plane according to the camera coordinates corresponding to each vertex.

[0140] Specifically, refer to Figure 4 , the server can determine the geometric center P4, i.e., the center point, according to the original pixel coordinates of the vertices P0, P1, P2, and P3 in the initial image of the vehicle frame number, and obtain the corresponding original pixel coordinates.

[0141] Then, the server can find and obtain the camera coordinates of the center point in the camera coordinate system from the point cloud data based on the original pixel coordinates of the center point.

[0142] Furthermore, the server can form a point set by taking any three points from P0, P1, P2, P3, and P4 as a group, and obtain 10 point sets. Based on the camera coordinates of each point in each point set, the server calculates the parameters of the obtained vehicle frame number plane equation group. The calculation formula is shown in formula (5):

[0143] ax+by+cz-1 (5)

[0144] Among them, a, b, c are the parameters of the plane equations of the frame number, and x, y, z are the camera coordinates of each point.

[0145] Furthermore, the server stores the absolute values ​​of the values ​​calculated for each point combination into the server Error Items Vec container to perform error value calculation, thereby obtaining 10 sets of error values ​​corresponding to each point set.

[0146] Then, the server calculates the number of errors in the 10 groups of error values ​​that are greater than a preset error value, for example, a number greater than 0.01, and calculates the average value of the 10 groups of error values ​​to obtain an average error.

[0147] Furthermore, the server determines the number of errors and the average error based on the preset requirements to determine whether the requirements are met. For example, if the number of errors is less than 3 and the average error is less than 0.01, the requirements are met, and further processing is performed.

[0148] In the above embodiment, the frame number plane equation is established based on the camera coordinates of each vertex, and then based on the established frame number plane equation, it is verified whether multiple vertices are located in the same plane. When it is verified that multiple vertices are located in the same plane, the plane coordinates of each vertex on the frame number plane are determined according to the camera coordinates corresponding to each vertex. Therefore, after obtaining the camera coordinates corresponding to each vertex, it is possible to verify whether each vertex is located in the same plane, and perform subsequent operations after the verification is passed, thereby improving the accuracy of frame number image generation.

[0149] It should be understood that although Figure 2 and Figure 6 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 and Figure 6 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0150] In one embodiment, Figure 8 As shown, a vehicle frame number image generation device is provided, comprising: a vehicle frame number original image acquisition module 100, an original pixel coordinate determination module 200, a camera coordinate determination module 300, an actual pixel coordinate determination module 400, a perspective transformation matrix establishment module 500 and a vehicle frame number image generation module 600, wherein:

[0151] The vehicle frame number original image acquisition module 100 is used to acquire the vehicle frame number original image.

[0152] The original pixel coordinate determination module 200 is used to determine a plurality of vertices in the vehicle frame number text area in the original vehicle frame number image, and obtain the original pixel coordinates of each vertex.

[0153] The camera coordinate determination module 300 is used to obtain the camera coordinates in the camera coordinate system corresponding to each vertex from the point cloud data corresponding to the original image of the vehicle frame number based on the original pixel coordinates of each vertex.

[0154] The actual pixel coordinate determination module 400 is used to determine the actual pixel coordinates of each vertex in the target vehicle frame number plane according to the camera coordinates of each vertex.

[0155] The perspective transformation matrix establishment module 500 is used to establish a perspective transformation matrix according to the original pixel coordinates and the actual pixel coordinates of each vertex.

[0156] The frame number image generation module 600 is used to perform perspective transformation of the original frame number image to a target frame number plane according to a perspective transformation matrix to obtain a frame number image.

[0157] In one embodiment, the actual pixel coordinate determination module 400 may include:

[0158] The target vehicle frame number plane determination submodule is used to determine the target vehicle frame number plane.

[0159] The plane coordinate determination submodule is used to determine the plane coordinates of each vertex in the target vehicle frame number plane according to the camera coordinates of each vertex.

[0160] The actual pixel coordinate determination submodule is used to determine the actual pixel coordinates of each vertex in the target vehicle frame number plane according to the plane coordinates of each vertex.

[0161] In one embodiment, the actual pixel coordinate determination submodule includes:

[0162] The image accuracy acquisition unit is used to acquire the image accuracy of the original image of the vehicle frame number.

[0163] The actual pixel coordinate determining unit is used to determine the actual pixel coordinates of each vertex in the target frame number plane according to the plane coordinates of each vertex and the image accuracy of the frame number original image.

[0164] In one embodiment, the vehicle frame number image generation module 600 may include:

[0165] The vehicle frame number initial image generation submodule is used to perspective transform the original vehicle frame number image to the target vehicle frame number plane according to the perspective transformation matrix to obtain the vehicle frame number initial image.

[0166] The interpolation processing submodule is used to perform interpolation processing on the initial frame number image to obtain the frame number image.

[0167] In one embodiment, the vehicle frame number initial image generation submodule may include:

[0168] The frame number text area determining unit is used to determine the frame number text area to be perspective-transformed in the frame number original image according to the original pixel coordinates of each vertex.

[0169] The target area determination unit is used to determine the target area of ​​the perspective transformation in the target vehicle frame number plane according to the actual pixel coordinates of each vertex.

[0170] The vehicle frame number initial image generating unit is used to perspectively transform the vehicle frame number text area into the target area according to the perspective transformation matrix to obtain the vehicle frame number initial image.

[0171] In one embodiment, the vehicle frame number initial image generating unit may include:

[0172] The target pixel point determination subunit is used to perform perspective transformation processing on the frame number text area through a perspective transformation matrix to determine the target pixel points of the original pixel points in the frame number text area in the target area.

[0173] The pixel value determination subunit is used to obtain the pixel value of each original pixel point in the original image of the vehicle frame number.

[0174] The filling unit is used to fill each target pixel point based on the pixel value of each original pixel point to obtain the initial image of the frame number.

[0175] In one embodiment, the above device may further include:

[0176] The frame number plane equation establishing module is used to establish the frame number plane equation based on the camera coordinates of each vertex after the camera coordinate determining module 300 obtains the camera coordinates corresponding to each vertex from the point cloud data corresponding to the frame number original image.

[0177] The verification module is used to verify whether multiple vertices are located in the same plane according to the established frame number plane equation, and when multiple vertices are verified to be located in the same plane, the plane coordinates of each vertex on the frame number plane are further determined according to the camera coordinates corresponding to each vertex.

[0178] The specific definition of the vehicle frame number image generating device can be found in the definition of the vehicle frame number image generating method mentioned above, which will not be repeated here. Each module in the above-mentioned vehicle frame number image generating device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0179] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as the original image of the frame number, point cloud data and the frame number image. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a frame number image generation method is implemented.

[0180] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0181] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program: obtaining an original image of a frame number; determining multiple vertices of a frame number text area in the original image of the frame number, and obtaining the original pixel coordinates of each vertex; based on the original pixel coordinates of each vertex, obtaining the camera coordinates of each vertex in a camera coordinate system from point cloud data corresponding to the original image of the frame number; determining the actual pixel coordinates of each vertex in a target frame number plane according to the camera coordinates of each vertex; establishing a perspective transformation matrix according to the original pixel coordinates of each vertex and the actual pixel coordinates; and perspective transforming the original image of the frame number to the target frame number plane according to the perspective transformation matrix to obtain the frame number image.

[0182] In one embodiment, when the processor executes the computer program, determining the actual pixel coordinates of each vertex in the target frame number plane according to the camera coordinates of each vertex may include: determining the target frame number plane; determining the plane coordinates of each vertex in the target frame number plane according to the camera coordinates of each vertex; and determining the actual pixel coordinates of each vertex in the target frame number plane according to the plane coordinates of each vertex.

[0183] In one of the embodiments, when the processor executes the computer program, determining the actual pixel coordinates of each vertex in the target frame number plane according to the plane coordinates of each vertex may include: obtaining the image accuracy of the original image of the frame number; and determining the actual pixel coordinates of each vertex in the target frame number plane according to the plane coordinates of each vertex and the image accuracy of the original image of the frame number.

[0184] In one embodiment, when the processor executes the computer program, perspective transformation of the original frame number image to the target frame number plane according to the perspective transformation matrix to obtain the frame number image may include: perspective transformation of the original frame number image to the target frame number plane according to the perspective transformation matrix to obtain the initial frame number image; interpolation processing is performed on the initial frame number image to obtain the frame number image.

[0185] In one of the embodiments, when the processor executes the computer program, perspective transformation of the original frame number image into a target frame number plane according to a perspective transformation matrix to obtain the initial frame number image may include: determining a frame number text area for perspective transformation in the original frame number image according to the original pixel coordinates of each vertex; determining a target area for perspective transformation in the target frame number plane according to the actual pixel coordinates of each vertex; and perspective transformation of the frame number text area into the target area according to the perspective transformation matrix to obtain the initial frame number image.

[0186] In one of the embodiments, when the processor executes the computer program, perspective transformation of the frame number text area into the target area according to the perspective transformation matrix is ​​implemented to obtain the initial image of the frame number, which may include: performing perspective transformation processing on the frame number text area through the perspective transformation matrix to determine each target pixel point in the target area of ​​each original pixel point in the frame number text area; obtaining the pixel value of each original pixel point in the original image of the frame number; filling each target pixel point based on the pixel value of each original pixel point to obtain the initial image of the frame number.

[0187] In one of the embodiments, after the processor executes the computer program to obtain the camera coordinates corresponding to each vertex from the point cloud data corresponding to the original image of the frame number, it can also implement the following steps: establishing a frame number plane equation based on the camera coordinates of each vertex set point; verifying whether multiple vertices are located in the same plane based on the established frame number plane equation; when it is verified that multiple vertices are located in the same plane, continuing to determine the plane coordinates of each vertex on the frame number plane based on the camera coordinates corresponding to each vertex.

[0188] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining an original image of a frame number; determining multiple vertices of a frame number text area in the original image of the frame number, and obtaining the original pixel coordinates of each vertex; based on the original pixel coordinates of each vertex, obtaining the camera coordinates of each vertex in a camera coordinate system from point cloud data corresponding to the original image of the frame number; determining the actual pixel coordinates of each vertex in a target frame number plane according to the camera coordinates of each vertex; establishing a perspective transformation matrix according to the original pixel coordinates of each vertex and the actual pixel coordinates; and perspective-transforming the original image of the frame number to the target frame number plane according to the perspective transformation matrix to obtain the frame number image.

[0189] In one embodiment, when the computer program is executed by a processor, determining the actual pixel coordinates of each vertex in a target frame number plane according to the camera coordinates of each vertex may include: determining the target frame number plane; determining the plane coordinates of each vertex in the target frame number plane according to the camera coordinates of each vertex; and determining the actual pixel coordinates of each vertex in the target frame number plane according to the plane coordinates of each vertex.

[0190] In one embodiment, when the computer program is executed by a processor, determining the actual pixel coordinates of each vertex in the target frame number plane according to the plane coordinates of each vertex may include: obtaining the image accuracy of the original image of the frame number; determining the actual pixel coordinates of each vertex in the target frame number plane according to the plane coordinates of each vertex and the image accuracy of the original image of the frame number.

[0191] In one embodiment, when the computer program is executed by the processor, perspective transformation of the original frame number image to the target frame number plane according to the perspective transformation matrix to obtain the frame number image may include: perspective transformation of the original frame number image to the target frame number plane according to the perspective transformation matrix to obtain the initial frame number image; interpolation processing is performed on the initial frame number image to obtain the frame number image.

[0192] In one embodiment, when the computer program is executed by a processor, perspective transformation of the original frame number image into a target frame number plane according to a perspective transformation matrix is ​​implemented to obtain the initial frame number image, which may include: determining a frame number text area for perspective transformation in the original frame number image according to the original pixel coordinates of each vertex; determining a target area for perspective transformation in the target frame number plane according to the actual pixel coordinates of each vertex; and perspective transformation of the frame number text area into the target area according to the perspective transformation matrix to obtain the initial frame number image.

[0193] In one of the embodiments, when the computer program is executed by the processor, perspective transformation of the frame number text area into the target area according to the perspective transformation matrix is ​​implemented to obtain the initial image of the frame number, which may include: performing perspective transformation processing on the frame number text area through the perspective transformation matrix to determine the target pixels of the original pixels in the frame number text area in the target area; obtaining the pixel value of each original pixel in the original image of the frame number; filling each target pixel based on the pixel value of each original pixel to obtain the initial image of the frame number.

[0194] In one of the embodiments, after the computer program is executed by the processor to obtain the camera coordinates corresponding to each vertex from the point cloud data corresponding to the original image of the frame number, the following steps may also be implemented: based on the camera coordinates of each vertex, a frame number plane equation is established; based on the established frame number plane equation, whether multiple vertices are located in the same plane is verified; when multiple vertices are verified to be located in the same plane, the plane coordinates of each vertex on the frame number plane are further determined based on the camera coordinates corresponding to each vertex.

[0195] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0196] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0197] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for generating a vehicle frame number image, characterized in that: include: Get the original image of the vehicle frame number; Determine a plurality of vertices of a frame number text area in the frame number original image, and obtain original pixel coordinates of each of the vertices; the frame number text area is used to characterize an area in the frame number original image where the frame number text content is located; Based on the original pixel coordinates of each vertex, the camera coordinates in the camera coordinate system corresponding to each vertex are obtained from the point cloud data corresponding to the original image of the vehicle frame number; the point cloud data refers to the depth information data collected by the depth camera; Determine the actual pixel coordinates of each vertex in the target vehicle frame number plane according to the camera coordinates of each vertex; Establishing a perspective transformation matrix according to the original pixel coordinates of each vertex and the actual pixel coordinates; Determining a frame number text area to be perspective-transformed in the frame number original image according to the original pixel coordinates of each of the vertices; Determining a target area for perspective transformation in the target vehicle frame number plane according to the actual pixel coordinates of each of the vertices; According to the perspective transformation matrix, perspective transform the frame number text area into the target area to obtain an initial frame number image; The initial vehicle frame number image is interpolated to obtain a vehicle frame number image.

2. The method according to claim 1, characterized in that Determining the actual pixel coordinates of each vertex in the target vehicle frame number plane according to the camera coordinates of each vertex includes: Determine the target VSN plane; Determine the plane coordinates of each of the vertices in the target vehicle frame number plane according to the camera coordinates of each of the vertices; According to the plane coordinates of each of the vertices, the actual pixel coordinates of each of the vertices in the target vehicle frame number plane are determined.

3. The method according to claim 2, characterized in that Determining the actual pixel coordinates of each vertex in the target vehicle frame number plane according to the plane coordinates of each vertex includes: Obtaining the image accuracy of the original image of the vehicle frame number; According to the plane coordinates of each of the vertices and the image accuracy of the original image of the vehicle frame number, the actual pixel coordinates of each of the vertices in the target vehicle frame number plane are determined.

4. The method according to claim 1, characterized in that The step of perspective transforming the frame number text area into the target area according to the perspective transformation matrix to obtain the frame number initial image includes: Performing perspective transformation processing on the frame number text area through the perspective transformation matrix to determine each target pixel point in the target area of ​​each original pixel point in the frame number text area; Obtaining the pixel value of each original pixel point in the original image of the vehicle frame number; The target pixel points are filled based on the pixel values ​​of the original pixel points to obtain an initial image of the vehicle frame number.

5. The method according to claim 1, characterized in that After obtaining the camera coordinates corresponding to each vertex from the point cloud data corresponding to the original image of the vehicle frame number, the method further includes: Establishing a frame number plane equation based on the camera coordinates of each of the vertices; Verify whether the plurality of vertices are located in the same plane according to the established VIN plane equation; When it is verified that the plurality of vertices are located in the same plane, the plane coordinates of each vertex on the vehicle frame number plane are determined according to the camera coordinates corresponding to each vertex.

6. A vehicle frame number image generating device, characterized in that: include: A vehicle frame number original image acquisition module is used to acquire the vehicle frame number original image; The original pixel coordinate determination module is used to determine a plurality of vertices of the frame number text area in the frame number original image and obtain the original pixel coordinates of each of the vertices; the frame number text area is used to characterize the area in the frame number original image where the frame number text content is located; A camera coordinate determination module, used to obtain the camera coordinates in the camera coordinate system corresponding to each vertex from the point cloud data corresponding to the original image of the vehicle frame number based on the original pixel coordinates of each vertex; the point cloud data refers to the depth information data collected by the depth camera; An actual pixel coordinate determination module, used to determine the actual pixel coordinates of each vertex in the target vehicle frame number plane according to the camera coordinates of each vertex; A perspective transformation matrix establishment module, used to establish a perspective transformation matrix according to the original pixel coordinates of each vertex and the actual pixel coordinates; A frame number image generation module is used to determine a frame number text area to be perspective-transformed in the frame number original image according to the original pixel coordinates of each vertex; and to determine a target area for perspective-transformation in the target frame number plane according to the actual pixel coordinates of each vertex; According to the perspective transformation matrix, the frame number text area is perspective transformed into the target area to obtain an initial frame number image; and the initial frame number image is interpolated to obtain a frame number image.

7. The device according to claim 6, characterized in that The actual pixel coordinate determination module comprises: A target vehicle frame number plane determination submodule is used to determine the target vehicle frame number plane; A plane coordinate determination submodule, used to determine the plane coordinates of each of the vertices in the target vehicle frame number plane according to the camera coordinates of each of the vertices; The actual pixel coordinate determination submodule is used to determine the actual pixel coordinates of each vertex in the target vehicle frame number plane according to the plane coordinates of each vertex.

8. The device according to claim 7, characterized in that The actual pixel coordinate determination submodule includes: An image accuracy acquisition unit, used to acquire the image accuracy of the original image of the vehicle frame number; The actual pixel coordinate determining unit is used to determine the actual pixel coordinates of each of the vertices in the target frame number plane according to the plane coordinates of each of the vertices and the image accuracy of the frame number original image.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Nameplate text detection method and device, computer equipment and storage medium

    CN110796082A

  • Driving assistance system, special vehicle and method

    CN111098785A

  • Vehicle frame number image generation method and device, computer equipment and storage medium

    CN111368745A