Image synthesis method and device, computer device and storage medium

CN116596819BActive Publication Date: 2026-06-26BEIJING SIGNALWAY TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING SIGNALWAY TECH
Filing Date
2023-05-22
Publication Date
2026-06-26

Smart Images

  • Figure CN116596819B_ABST
    Figure CN116596819B_ABST
Patent Text Reader

Abstract

The application relates to an image synthesis method and device, computer equipment and a storage medium, comprising the following steps: acquiring a first image and a second image corresponding to a target vehicle, dividing the first image and the second image to obtain a plurality of first image blocks and a plurality of second image blocks; determining a target displacement of a target pixel point in the first image block based on a first position of a feature point in the first image block in the first image and a second position of a matching point in the second image block corresponding to the first image block in the second image; determining a relative speed set based on the target displacement of the target pixel point in each first image block; determining a target distortion correction parameter corresponding to the target vehicle based on the relative speed set; performing distortion correction on a plurality of to-be-synthesized images corresponding to the target vehicle based on the target distortion correction parameter to obtain a plurality of corrected images, and synthesizing the plurality of corrected images to obtain a target image. The method can improve the accuracy of the target image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an image synthesis method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] A vehicle chassis scanning device is an intelligent device that can acquire, synthesize, and identify images of various parts of a vehicle chassis for early warning. The original images acquired by a single-camera vehicle chassis scanning device have distortion, where parts closer to the camera appear larger in the original image, while parts farther away from the camera appear smaller.

[0003] In traditional techniques, distortion correction of the original image is performed based on a specific imaging plane. However, this method cannot adequately adapt to different vehicle chassis heights, resulting in significant deviations in the imaging ratio of the corrected images. Furthermore, stitching these corrected images together results in vehicle chassis images that fail to accurately reflect the true condition of the vehicle chassis, leading to low accuracy. Summary of the Invention

[0004] Therefore, it is necessary to provide an image synthesis method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve accuracy in addressing the aforementioned technical problems.

[0005] Firstly, this application provides an image synthesis method. The method includes:

[0006] A first image and a second image corresponding to the target vehicle are acquired. The first image is divided into multiple first image blocks, and the second image is divided into multiple second image blocks. The first image blocks and the second image blocks correspond one-to-one.

[0007] Based on the first position of the feature point in the first image block in the first image, and the second position of the matching point in the second image block corresponding to the first image block in the second image, the target displacement of the target pixel in the first image block is determined; the feature point corresponds to the matching point.

[0008] Based on the target displacement of the target pixels in each of the first image blocks, a set of relative velocities is determined;

[0009] Based on the set of relative velocities, the target distortion correction parameters corresponding to the target vehicle are determined;

[0010] Based on the target distortion correction parameters, distortion correction is performed on multiple images to be synthesized corresponding to the target vehicle to obtain multiple corrected images. The multiple corrected images are then synthesized to obtain the target image.

[0011] In one embodiment, determining the target displacement of a target pixel in the first image block based on the first position of a feature point in the first image block in the first image and the second position of a matching point in the second image block corresponding to the first image block in the second image includes:

[0012] For each of the first image blocks, a local image block of a preset size is determined with the target pixel of the first image block as the center;

[0013] Image features are extracted from the local image patch to obtain the feature points of the local image patch and the first position of the feature points in the first image;

[0014] Based on the image features corresponding to the feature points, a matching point corresponding to the feature points is determined in a second image block corresponding to the first image block, and the second position of the matching point in the second image is determined; the position of the second image block corresponding to the first image block in the second image is the same as the position of the first image block in the first image.

[0015] Based on the first position and the second position, the target displacement of the target pixel in the first image block is determined.

[0016] In one embodiment, determining the target displacement of the target pixel in the first image block based on the first position and the second position includes:

[0017] For each feature point, the first horizontal position corresponding to the feature point is obtained from the first position of the feature point, and the second horizontal position corresponding to the feature point is obtained from the second position of the matching point;

[0018] The difference between the first lateral position and the second lateral position corresponding to the feature point is determined as the displacement of the feature point;

[0019] The target displacement of the target pixel is obtained by averaging the displacements of each feature point.

[0020] In one embodiment, determining the set of relative velocities based on the target displacement of target pixels in each of the first image blocks includes:

[0021] The target displacements of target pixels in each of the first image blocks are compared, and the largest target displacement is determined as the reference displacement.

[0022] The relative velocity set is determined based on the ratio between the target displacement of the target pixel in each of the first image blocks and the reference displacement.

[0023] In one embodiment, determining the target distortion correction parameters corresponding to the target vehicle based on the set of relative velocities includes:

[0024] Obtain the mapping relationship between the candidate velocity set and the candidate distortion correction parameters;

[0025] For each candidate velocity set, a set similarity is determined based on the relative velocity set and the candidate velocity set.

[0026] The set similarity of each candidate velocity set is compared, and the candidate velocity set with the highest set similarity is determined as the target velocity set.

[0027] Based on the mapping relationship, the candidate distortion correction parameters corresponding to the target velocity set are determined as the target distortion correction parameters for the target vehicle.

[0028] In one embodiment, determining the set similarity corresponding to each candidate velocity set based on the relative velocity set and the candidate velocity set includes:

[0029] Obtain the pixel position of the target pixel corresponding to each relative velocity in the set of relative velocities;

[0030] Based on the position of each pixel, a matching velocity set is determined from the candidate velocity set;

[0031] For each candidate velocity set, the similarity between the relative velocity set and the matching velocity set corresponding to the candidate velocity set is calculated to obtain the set similarity corresponding to the candidate velocity set.

[0032] In one embodiment, before performing distortion correction on the multiple images to be synthesized corresponding to the target vehicle based on the target distortion correction parameters, the method further includes:

[0033] Acquire the image corresponding to the target vehicle;

[0034] Determine the set of relative velocities corresponding to any two adjacent acquired images;

[0035] For each set of relative velocities, the proportion of non-zero velocities in the set of relative velocities is counted, and the proportion is compared with a preset threshold. If the proportion is greater than the preset threshold, then two adjacent acquired images are determined as images to be synthesized.

[0036] If the percentage is less than or equal to the preset threshold, then one of the two adjacent acquired images is determined as the image to be synthesized.

[0037] Secondly, this application also provides an image synthesis apparatus. The apparatus includes:

[0038] The acquisition module is used to acquire a first image and a second image corresponding to the target vehicle, divide the first image into multiple first image blocks, and divide the second image into multiple second image blocks; the first image blocks and the second image blocks correspond one-to-one.

[0039] The displacement determination module is used to determine the target displacement of a target pixel in the first image block based on the first position of a feature point in the first image block in the first image and the second position of a matching point in the second image block corresponding to the first image block in the second image; the feature point corresponds to the matching point.

[0040] The velocity determination module is used to determine a set of relative velocities based on the target displacement of the target pixels in each of the first image blocks;

[0041] The parameter determination module is used to determine the target distortion correction parameters corresponding to the target vehicle based on the set of relative velocities.

[0042] The synthesis module is used to perform distortion correction on multiple images to be synthesized corresponding to the target vehicle based on the target distortion correction parameters, to obtain multiple corrected images, and to synthesize the multiple corrected images to obtain the target image.

[0043] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods described in the first aspect.

[0044] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects.

[0045] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any of the first aspects.

[0046] The aforementioned image synthesis method, apparatus, computer equipment, storage medium, and computer program product involve a terminal acquiring a first image and a second image corresponding to a target vehicle, dividing the first and second images into multiple corresponding first image blocks and second image blocks, extracting features from local image blocks near target pixels to obtain feature points within these local image blocks, where each feature point represents a local image feature. Matching points corresponding to the feature points are then identified in the second image block corresponding to the first image block. A feature point can be understood as a pixel of a component in the first image block, and a matching point can be understood as a pixel of the same component in the second image block. That is, a pixel of the same component moves from a feature point in the first image block to a matching point in the second image block. The matching point is determined based on the first position of the feature point and the second position of the matching point. The displacement of feature points is determined, and the target displacement of the target pixel is determined based on the displacement of multiple feature points. Matching points corresponding to the feature points are determined through local image features. Compared with determining the matching points corresponding to the target pixel in the second image block, the accuracy of the matching points is improved. Determining the target displacement of the target pixel based on the displacement of feature points improves the accuracy of the target displacement, thereby improving the accuracy of the relative velocity set. The relative velocity set reflects the height of the target vehicle's chassis. Target distortion correction parameters are determined based on the relative velocity set, i.e., target distortion correction parameters that match the height of the vehicle chassis are selected. The target distortion correction parameters are used to correct the distortion of the image to be synthesized, reducing the imaging ratio deviation in the corrected image. The corrected image is then synthesized to obtain the target image, improving the accuracy of the target image. Attached Figure Description

[0047] Figure 1 This is an application environment diagram of the image synthesis method in one embodiment;

[0048] Figure 2 This is a flowchart illustrating an image synthesis method in one embodiment;

[0049] Figure 3 This is a schematic diagram of the first and second images in one embodiment;

[0050] Figure 4 This is a flowchart illustrating the target displacement determination steps in one embodiment;

[0051] Figure 5 This is a flowchart illustrating the steps for determining target distortion correction parameters in one embodiment;

[0052] Figure 6 This is a flowchart illustrating the steps for determining the image to be synthesized in one embodiment;

[0053] Figure 7 This is a flowchart illustrating the steps for determining the mapping relationship in one embodiment;

[0054] Figure 8 This is a flowchart illustrating the image compositing steps in one embodiment;

[0055] Figure 9 This is a structural block diagram of an image synthesis apparatus in one embodiment;

[0056] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0057] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0058] The image synthesis method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated on server 104 or placed on a cloud or other network server. Both the terminal and the server can be used independently to execute the image synthesis method provided in this embodiment. The terminal and server can also be used collaboratively to execute the image synthesis method provided in this embodiment. For example, the terminal acquires a first image and a second image corresponding to the target vehicle, divides the first image into multiple first image blocks, divides the second image into multiple second image blocks, determines the target displacement of the target pixel in the first image block based on the first position of the feature points in the first image block and the second position of the matching points in the second image block corresponding to the first image block in the second image, determines the relative velocity set based on the target displacement of the target pixel in each first image block, determines the target distortion correction parameters corresponding to the target vehicle based on the relative velocity set, performs distortion correction on multiple images to be synthesized corresponding to the target vehicle based on the target distortion correction parameters, obtains multiple corrected images, and synthesizes the multiple corrected images to obtain the target image. The terminal 102 can be, but is not limited to, various vehicle chassis scanning devices, personal computers, laptops, smartphones, tablets, and IoT devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0059] In one embodiment, such as Figure 2 As shown, an image synthesis method is provided. This embodiment uses the application of this method to a terminal as an example for illustration, including steps 202 to 210.

[0060] Step 202: Obtain the first image and the second image corresponding to the target vehicle; divide the first image into multiple first image blocks; divide the second image into multiple second image blocks; the first image blocks and the second image blocks correspond one-to-one.

[0061] In this context, the target vehicle refers to the vehicle captured by the camera. The target vehicle travels above the camera, and during its movement, the camera captures images of the vehicle's chassis, resulting in multiple images being captured by the terminal. For example, if the target vehicle is traveling above a vehicle chassis scanning device, the wide-angle fisheye camera on the device captures images of the vehicle's chassis, and the device obtains multiple images. The first and second images can be two adjacent images or two images captured at an interval less than a preset interval. The first and second images contain the same captured content. An image block refers to a portion of an image. For example, an image with width W and height H can be divided into four smaller images of height H / 4; each smaller image is an image block. The first and second images are divided using the same method, resulting in multiple first image blocks and multiple second image blocks of equal size. The first image blocks may have overlapping areas or no overlap at all; the division method can be set according to actual needs. The first image block and the second image block correspond one-to-one. The position of the second image block corresponding to the first image block in the second image is the same as the position of the first image block in the first image. For example, as Figure 3 As shown, a coordinate system is established with the top left corner of the first image as the origin. The position of the first image block in the first image can be represented by the set of vertex coordinates of the first image block. A coordinate system is established with the top left corner of the second image as the origin. The position of the second image block in the second image can be represented by the set of vertex coordinates of the second image block. If the vertex coordinate set of the first image block is the same as the vertex coordinate set of the second image block, then the first image block corresponds to the second image block. For example, the first image block 01 corresponds to the second image block 01, and the first image block 05 corresponds to the second image block 05.

[0062] For example, the terminal's camera captures images of the chassis of a passing target vehicle, obtaining multiple images. A first image and a second image are selected from the multiple images. The first image is divided into multiple first image blocks based on a preset division method. The second image is also divided into multiple second image blocks based on the preset division method.

[0063] In one embodiment, the terminal obtains multiple captured images corresponding to the target vehicle from the storage area, selects a first image and a second image from the multiple captured images based on a preset selection method, wherein the preset selection method can be set to two adjacent captured images, or two captured images with a capture time interval less than a preset interval, divides the first image based on a preset division method to obtain multiple first image blocks, and assigns a number to each first image block based on its position in the first image, divides the second image based on the preset division method to obtain multiple second image blocks, and assigns a number to each second image block based on its position in the second image, and determines the first image blocks and second image blocks with the same number as a corresponding set of image blocks.

[0064] Step 204: Based on the first position of the feature point in the first image block in the first image and the second position of the matching point in the second image block corresponding to the first image block in the second image, determine the target displacement of the target pixel in the first image block; the feature point corresponds to the matching point.

[0065] In this context, a feature point refers to a pixel that represents an image feature. Feature points can be corner points (points with particularly prominent attributes), isolated points with the highest or lowest intensity of certain attributes, or the endpoints of line segments. The first position refers to the coordinates representing the location of the feature point. A matching point is a pixel in the second image block that represents an image feature identical to that in the first image block. For example, ... Figure 3 As shown, feature extraction is performed on pixel A in the first image block of the first image, identifying five feature points: B1, B2, B3, B4, and B5. Feature extraction is also performed on pixel A in the corresponding second image block, identifying five matching points: C1, C2, C3, C4, and C5. B1 corresponds to C1, B2 to C2, B3 to C3, B4 to C4, and B5 to C5. A target pixel refers to a specific pixel in the first image block, which can be the center pixel of the first image block. The target pixel can be set according to actual needs. Target displacement refers to the relative displacement of the target pixel in the first image block and its corresponding position in the second image block. It can be understood as the distance between the position of the target pixel in the first image block and its corresponding position in the second image block.

[0066] For example, the terminal determines a feature point in a first image block, obtains a first position of the feature point in the first image, then obtains a second image block corresponding to the first image block, determines a matching point corresponding to the feature point in the second image block, obtains a second position of the matching point in the second image, and determines the target displacement of the target pixel in the first image block based on the first position of the feature point and the second position of the corresponding matching point.

[0067] Step 206: Determine the set of relative velocities based on the target displacement of the target pixels in each first image block.

[0068] Among them, the relative velocity set refers to a set of multiple relative velocities, and each relative velocity corresponds one-to-one with a target pixel.

[0069] For example, the terminal determines a reference displacement based on the target displacement of the target pixel in each first image block, determines the ratio between the target displacement and the reference displacement as the relative velocity, and forms a relative velocity set by combining the relative velocities corresponding to the target pixel in each first image block.

[0070] Step 208: Based on the set of relative velocities, determine the target distortion correction parameters corresponding to the target vehicle.

[0071] The target distortion correction parameters refer to the parameters or set of parameters used to correct distortion in the synthesized image. These distortion correction parameters are influenced by the vehicle's chassis height and are used to correct distortion in the image; in other words, they are related to the vehicle's chassis height.

[0072] For example, the terminal determines the target height level of the target vehicle based on the set of relative speeds, obtains the height mapping relationship between the height level and the candidate distortion correction parameters, and determines the candidate distortion correction parameters corresponding to the target height level as the target distortion correction parameters corresponding to the target vehicle based on the height mapping relationship.

[0073] Step 210: Based on the target distortion correction parameters, perform distortion correction on multiple images to be synthesized corresponding to the target vehicle to obtain multiple corrected images, and synthesize the multiple corrected images to obtain the target image.

[0074] The image to be synthesized refers to multiple images used to synthesize the target image. The image to be synthesized can be a captured image from the terminal's camera, or it can be a selected image from multiple captured images. Distortion correction refers to the process of correcting distorted areas in the image to be synthesized.

[0075] For example, the terminal uses target distortion correction parameters to perform distortion correction on multiple images to be synthesized corresponding to the target vehicle, obtains multiple corrected images, and then synthesizes the multiple corrected images to obtain the target image.

[0076] In the above image synthesis method, the terminal acquires a first image and a second image corresponding to the target vehicle, divides the first image and the second image into multiple corresponding first image blocks and second image blocks, extracts features from local image blocks near the target pixel, and obtains feature points in the local image blocks. Feature points characterize local image features within the local image blocks. Matching points corresponding to the feature points are found in the second image block corresponding to the first image block. A feature point can be understood as a pixel of a component in the first image block, and a matching point can be understood as a pixel of the same component in the second image block. That is, a pixel of the same component moves from a feature point in the first image block to a matching point in the second image block. The displacement of the feature point is determined based on the first position of the feature point and the second position of the matching point. The target displacement of the target pixel is determined by the displacement of multiple feature points, and the matching point corresponding to the feature point is determined by local image features. Compared with determining the matching point corresponding to the target pixel in the second image block, the accuracy of the matching point is improved. The target displacement of the target pixel is determined by the displacement of the feature points, which improves the accuracy of the target displacement, thereby improving the accuracy of the relative velocity set. The relative velocity set reflects the height of the target vehicle's chassis. The target distortion correction parameter is determined based on the relative velocity set, that is, the target distortion correction parameter that matches the height of the vehicle chassis is selected. The target distortion correction parameter is used to correct the distortion of the image to be synthesized, which reduces the imaging ratio deviation in the corrected image. The corrected image is then synthesized to obtain the target image, which improves the accuracy of the target image.

[0077] In one embodiment, such as Figure 4 As shown, based on the first position of feature points in the first image block in the first image and the second position of matching points in the second image block corresponding to the first image block in the second image, the target displacement of the target pixel in the first image block is determined as follows:

[0078] Step 402: For each first image block, determine a local image block of a preset size centered on the target pixel of the first image block.

[0079] The preset size refers to the pre-defined shape and size of a local image block. The preset size can be set based on the width and height of the image. For example, if the local image block is set to be rectangular, the preset size includes both width and height. A local image block is a portion of the image within the first image block; it is smaller than the first image block and contains less image content.

[0080] For example, for each first image block, the terminal determines a local image block centered on the target pixel based on a preset size and the target pixel.

[0081] Step 404: Extract image features from the local image patch to obtain the feature points of the local image patch and the first position of the feature points in the first image.

[0082] Image feature extraction refers to extracting pixels that represent image features within a local image patch. For example, corner detection algorithms can be used to extract image features from local image patches.

[0083] For example, the terminal performs image feature extraction on a local image block to obtain multiple feature points, and then obtains the first position of the feature points in the first image.

[0084] Step 406: Based on the image features corresponding to the feature points, determine the matching point corresponding to the feature points in the second image block corresponding to the first image block, and the second position of the matching point in the second image; the position of the second image block corresponding to the first image block in the second image is the same as the position of the first image block in the first image.

[0085] For example, the terminal obtains a second image block corresponding to the first image block from the second image. Based on the image features corresponding to the feature points, image matching is performed on the second image block to determine the matching image block corresponding to the local image block within the second image block. Image features are extracted from the matching image block to determine the matching points corresponding to the feature points within the matching image block. Here, image matching refers to a method of determining similar image regions by analyzing the correspondence, similarity, and consistency of image content, features, structure, relationships, texture, and grayscale.

[0086] Step 408: Based on the first position and the second position, determine the target displacement of the target pixel in the first image block.

[0087] For example, for each feature point of a local image block in the first image block, the terminal determines the displacement corresponding to the feature point based on the first position corresponding to the feature point and the second position corresponding to the matching point, and determines the target displacement of the target pixel based on the displacement corresponding to each feature point.

[0088] In this embodiment, feature points are obtained by extracting features from local image blocks near the target pixel. These feature points represent local image features within the local image blocks. Matching points corresponding to the feature points are then matched in the second image block corresponding to the first image block. The displacement of the feature points is determined based on the first position of the feature points and the second position of the matching points. The target displacement of the target pixel is determined based on the displacements of multiple feature points. Determining the matching points corresponding to the feature points through local image features improves the accuracy of the matching points compared to determining the matching points corresponding to the target pixel in the second image block. Furthermore, determining the target displacement of the target pixel based on the displacements of the feature points improves the accuracy of the target displacement.

[0089] In one embodiment, determining the target displacement of a target pixel in the first image block based on a first position and a second position includes:

[0090] For each feature point, the first horizontal position corresponding to the feature point is obtained from the first position of the feature point, and the second horizontal position corresponding to the feature point is obtained from the second position of the matching point; the difference between the first horizontal position and the second horizontal position corresponding to the feature point is determined as the displacement of the feature point; the displacements of each feature point are averaged to obtain the target displacement of the target pixel.

[0091] Here, the first lateral position refers to the lateral coordinate value in the first position. For example, if the first position of a feature point is (x, y), then the first lateral position corresponding to the feature point is x. This can be understood as the target vehicle moving along the lateral coordinate axis, that is, along the direction of the x-axis. The first lateral position of a pixel of the same component in the first image is different from the second lateral position in the second image. The difference between the first and second lateral positions represents the movement of that component. The second lateral position refers to the lateral coordinate value in the second position.

[0092] For example, for each feature point, the terminal obtains the first horizontal position corresponding to the feature point from the first position of the feature point, obtains the second horizontal position corresponding to the feature point from the second position of the matching point corresponding to the feature point, subtracts the first horizontal position from the second horizontal position to obtain the displacement of the feature point, and then averages the displacements of each feature point to obtain the target displacement of the target pixel.

[0093] In this embodiment, the target displacement of the target pixel is determined based on the displacement of multiple feature points, and the matching point corresponding to the feature point is determined through local image features. Compared with determining the matching point corresponding to the target pixel in the second image block, the accuracy of the matching point is improved. Determining the target displacement of the target pixel based on the displacement of the feature points improves the accuracy of the target displacement.

[0094] In one embodiment, determining the set of relative velocities based on the target displacement of target pixels in each first image block includes:

[0095] The target displacements of target pixels in each first image block are compared, and the largest target displacement is determined as the reference displacement; the relative velocity set is determined based on the ratio between the target displacement of the target pixels in each first image block and the reference displacement.

[0096] The relative velocity set refers to the set of relative velocities corresponding to multiple target pixels. The ratio of target displacement to reference displacement is equivalent to the ratio of target bit removal time to reference bit removal time, which is the ratio of target velocity to reference velocity. Therefore, the ratio of target displacement to reference displacement is equal to the relative velocity.

[0097] For example, the terminal compares the target displacements of target pixels in each first image block, determines the largest target displacement as the reference displacement, removes the target position of the target pixels in each first image block to obtain the reference displacement, and obtains the relative velocity of the target pixels in each first image block, and combines multiple relative velocities into a relative velocity set.

[0098] In this embodiment, a set of relative velocities consisting of the relative velocities corresponding to the target pixels in each first image block is determined, providing basic data for subsequently determining the target distortion correction parameters corresponding to the target vehicle.

[0099] In one embodiment, such as Figure 5 As shown, based on the set of relative velocities, the target distortion correction parameters corresponding to the target vehicle are determined as follows:

[0100] Step 502: Obtain the mapping relationship between the candidate velocity set and the candidate distortion correction parameters.

[0101] The mapping relationship consists of the correspondence between multiple sets of candidate velocities and candidate distortion correction parameters.

[0102] For example, the terminal obtains the mapping relationship between the candidate velocity set and the candidate distortion correction parameters from the database.

[0103] Step 504: For each candidate velocity set, determine the set similarity between the relative velocity set and the candidate velocity set.

[0104] In this context, set similarity refers to the similarity between a relative velocity set and a candidate velocity set. Set similarity can be calculated using, but is not limited to, the cosine similarity method.

[0105] For example, the terminal obtains multiple candidate speed sets from the mapping relationship, calculates the similarity between each candidate speed set and the relative speed set, and obtains the set similarity corresponding to each candidate speed set.

[0106] Step 506: Compare the set similarity of each candidate velocity set, and determine the candidate velocity set with the highest set similarity as the target velocity set.

[0107] Step 508: Based on the mapping relationship, the candidate distortion correction parameters corresponding to the target velocity set are determined as the target distortion correction parameters for the target vehicle.

[0108] For example, the terminal determines the candidate distortion correction parameters corresponding to the target speed set from the mapping relationship, and determines the candidate distortion correction parameters corresponding to the target speed set as the target distortion correction parameters for the target vehicle.

[0109] In this embodiment, the target distortion correction parameters are determined based on the relative velocity set. That is, the target distortion correction parameters that match the chassis height of the target vehicle are selected. The target distortion correction parameters are used to correct the distortion of the synthesized image, thereby reducing the imaging ratio deviation in the corrected image.

[0110] In one embodiment, for each candidate velocity set, determining the set similarity between the relative velocity set and the candidate velocity set includes:

[0111] Obtain the pixel position of the target pixel corresponding to each relative velocity in the relative velocity set; determine the matching velocity set from the candidate velocity set based on each pixel position; for each candidate velocity set, calculate the similarity between the relative velocity set and the matching velocity set corresponding to the candidate velocity set to obtain the set similarity corresponding to the candidate velocity set.

[0112] Pixel position refers to the data representing the location of a pixel in the image. Pixel position can be the coordinates of the pixel's location in the image, or the pixel's arrangement order among all pixels in the image. The matching velocity set is a subset of the candidate velocity set. This subset includes the same number of relative velocities as the total relative velocity set, and the pixel positions of the pixels corresponding to the relative velocities in this subset are the same as the pixel positions of the target pixels corresponding to the relative velocities in the total relative velocity set. For example, if the first image is divided into 16 blocks, there are 16 target pixels. If each target pixel is the center pixel in a corresponding row of pixels, the relative velocity set includes 16 relative velocities corresponding to the center pixels. If the candidate velocity set includes 256 relative velocities corresponding to the center pixels, then it is necessary to select the target center pixels from the 256 relative velocities in the candidate velocity set that have the same pixel positions as the 16 target pixels, and form the matching velocity set with the relative velocities corresponding to these 16 target center pixels.

[0113] For example, the terminal obtains the pixel position of the target pixel corresponding to each relative speed in the relative speed set. For each candidate speed set, it determines the matching speed set from the candidate speed set based on the position of each pixel. Then, it calculates the similarity between the relative speed set and the matching speed set corresponding to the candidate speed set to obtain the set similarity corresponding to the candidate speed set.

[0114] In this embodiment, a matching speed set corresponding to the relative speed set is selected from the candidate speed set, and then the similarity between the relative speed set and the matching speed set is calculated. The higher the similarity between the relative speed set and the matching speed set, the stronger the similarity between the relative speed set and the candidate speed set corresponding to the matching speed set.

[0115] In one embodiment, such as Figure 6 As shown, before performing distortion correction on multiple images to be synthesized corresponding to the target vehicle based on the target distortion correction parameters, the following steps are also included:

[0116] Step 602: Obtain the image corresponding to the target vehicle.

[0117] Among them, the captured images refer to the images of the target vehicle's chassis taken by the camera.

[0118] For example, the camera takes pictures of the chassis of the target vehicle and saves the captured images in the storage area. The terminal then retrieves the captured images of the target vehicle from the storage area.

[0119] Step 604: Determine the set of relative velocities corresponding to any two adjacent acquired images.

[0120] In this context, two adjacent images refer to two images captured at adjacent times. For example, if four images are captured in sequence according to their capture time, namely Image 1, Image 2, Image 3, and Image 4, then Image 1 and Image 2 are two adjacent images, Image 2 and Image 3 are two adjacent images, and Image 3 and Image 4 are two adjacent images.

[0121] For example, the terminal acquires the acquisition time of multiple acquired images, sorts the multiple acquired images according to the acquisition time to obtain an acquired image sequence, determines two adjacent acquired images in the acquired image sequence as a group of adjacent images, and executes steps 202 to 206 for each group of adjacent images to obtain the set of relative velocities corresponding to the adjacent images.

[0122] Step 606: For each relative velocity set, calculate the proportion of non-zero velocities in the relative velocity set, compare the proportion with a preset threshold value, and if the proportion is greater than the preset threshold value, then determine the two adjacent acquired images as the images to be synthesized.

[0123] Here, non-zero velocity refers to a relative velocity that is not zero. The proportion refers to the ratio between the number of non-zero velocities in the set of relative velocities and the total number of relative velocities. The preset threshold refers to a pre-set proportion. The preset threshold can be set according to actual needs.

[0124] For example, for each set of relative velocities, the terminal counts the non-zero velocities in the set of relative velocities to obtain a first count, counts the relative velocities in the set of relative velocities to obtain a second count, divides the first count by the second count to obtain the proportion of non-zero velocities in the set of relative velocities, compares the proportion with a preset threshold, and if the proportion is greater than the preset threshold, then the two adjacent acquired images are determined as the images to be synthesized.

[0125] Step 608: If the proportion is less than or equal to a preset threshold, then one of the two adjacent acquired images is determined as the image to be synthesized.

[0126] For example, the terminal compares the proportion with a preset threshold value. If the proportion is less than or equal to the preset threshold value, then one of the two adjacent acquired images is determined as the image to be synthesized.

[0127] In this embodiment, the proportion of non-zero velocities in the relative velocity set of two adjacent acquired images is calculated to determine the image to be synthesized in the two adjacent acquired images. It can be understood that if the proportion of non-zero velocities in the relative velocity set is low, it means that there are more pixels with zero displacement in the two adjacent acquired images, that is, the content in the two adjacent acquired images is highly overlapping, and only one acquired image needs to be retained as the image to be synthesized, which reduces the number of images to be acquired that need to be distorted and improves the efficiency of image synthesis.

[0128] In one exemplary embodiment, the vehicle chassis scanning device includes a high frame rate single-camera acquisition unit and an image synthesis and processing unit. The high frame rate single-camera acquisition unit employs a wide-angle fisheye camera or a wide-angle orthogonal camera. The image synthesis unit comprises an embedded processor and a synthesis and processing algorithm program, primarily implementing the following: Figure 8 The image synthesis method described above requires the following steps before the vehicle chassis scanning equipment is officially used: Figure 7 The operation shown is used to debug the vehicle chassis scanning equipment and establish a mapping relationship between the candidate speed set and the candidate distortion correction parameters.

[0129] Before formal use, the vehicle chassis scanning equipment acquires chassis images of the test vehicle. By observing these images, the camera on the scanning equipment is adjusted to be parallel to the road surface, i.e., parallel to the vehicle's direction of travel. Then, based on the chassis height measurement range of the equipment, a measurement midpoint is determined. A test vehicle with this midpoint chassis height drives over the scanning equipment, acquiring multiple test images. For one of these images, different distortion correction parameters are used to correct distortion, resulting in multiple corresponding corrected test images. These corrected images are compared, and the distortion correction parameter corresponding to the image with the lowest distortion is used as the fixed distortion correction parameter for the vehicle chassis scanning equipment. In other words, all images acquired by the camera undergo initial distortion correction using this fixed parameter.

[0130] The chassis height measurement range is divided into multiple height levels. For each height level, a test vehicle with a chassis height corresponding to that level drives over a chassis scanning device to acquire multiple test images for each height level. For each test image corresponding to a height level, the distortion correction parameters corresponding to that height level are determined using the method described above, establishing a first mapping relationship between height levels and candidate distortion correction parameters. For multiple test images corresponding to each height level, for any two adjacent test images, the relative displacement of each pixel on the central axis of the test images is determined. Based on the relative displacement of each pixel, the set of relative displacements between two adjacent test images is obtained. Dividing the set of relative displacements by the relative displacement of the center pixel on the central axis yields the set of relative velocities between two adjacent test images, as shown below:

[0131]

[0132] S(p)={Sc(p,0),Sc(p,1),Sc(p,2),…,Sc(p,H-1)} Formula (2)

[0133] Where S is the set of relative velocities, cx is the coordinate of the central axis, H is the total number of pixels on the central axis, M(cx,0) is the relative displacement of the first pixel on the central axis, cy is the coordinate of the middle pixel on the central axis, M(cx,cy) is the relative displacement of the middle pixel on the central axis, P is the number of two adjacent test images, Sc(p,0) is the relative displacement of the first pixel in two adjacent test images in the p-th group, Sc(p,n) is the relative displacement of the n-th pixel in two adjacent test images in the p-th group, and the value of n is in the range of [0, H-1].

[0134] Then, the average of the relative velocities between all adjacent pairs of test images is taken to obtain the average velocity set Savg corresponding to the height level, as shown below:

[0135]

[0136] Where m is the total number of adjacent test images.

[0137] Based on the average velocity set corresponding to each altitude level, a second mapping relationship is established between the altitude level and the candidate velocity set. Based on the first and second mapping relationships, a mapping relationship between the candidate velocity set and the candidate distortion correction parameters is established and saved.

[0138] Once the vehicle chassis scanning equipment is officially put into use, when a target vehicle drives past the vehicle chassis scanning equipment, the camera of the vehicle chassis scanning equipment will take pictures of the vehicle chassis of the target vehicle and obtain multiple captured images. Two adjacent captured images are selected as the first image and the second image. The first image is divided according to a preset division method to obtain multiple first image blocks. The second image is also divided according to a preset division method to obtain multiple second image blocks. For each first image block, the vehicle chassis scanning device determines a local image block centered on the target pixel based on a preset size and target pixel. Image features are extracted from the local image block to obtain multiple feature points. The first position of each feature point in the first image is obtained. Then, a second image block corresponding to the first image block is obtained from the second image. Based on the image features corresponding to the feature points, image matching is performed on the second image block to determine the matching image block corresponding to the local image block. Image features are extracted from the matching image block to determine the matching point corresponding to the feature point. For each feature point, the vehicle chassis scanning device obtains the first lateral position corresponding to the feature point from the first position of the feature point and the second lateral position corresponding to the feature point from the second position of the matching point. The displacement of the feature point is obtained by subtracting the first lateral position from the second lateral position. The displacements of all feature points are then averaged to obtain the target displacement of the target pixel. The vehicle chassis scanning device compares the target displacements of target pixels in each first image block, determines the largest target displacement as the reference displacement, removes the target position of the target pixels in each first image block to obtain the reference displacement, and obtains the relative velocity of the target pixels in each first image block. The multiple relative velocities are then combined into a relative velocity set.

[0139] The vehicle chassis scanning equipment obtains the mapping relationship between candidate speed sets and candidate distortion correction parameters from the database. Multiple candidate speed sets are obtained from the mapping relationship. Then, the pixel positions of target pixels corresponding to each relative speed in the relative speed set are obtained. For each candidate speed set, a matching speed set is determined based on the pixel positions. The similarity between the relative speed set and the matching speed set corresponding to the candidate speed set is calculated to obtain the set similarity corresponding to the candidate speed set. The set similarities corresponding to each candidate speed set are then compared, and the candidate speed set with the highest set similarity is determined as the target speed set. The candidate distortion correction parameters corresponding to the target speed set are determined from the mapping relationship, and the candidate distortion correction parameters corresponding to the target speed set are determined as the target distortion correction parameters for the target vehicle.

[0140] The vehicle chassis scanning device acquires the acquisition time of multiple images, sorts the images according to the acquisition time to obtain an image sequence, and identifies two adjacent images in the sequence as a group of adjacent images. For each group of adjacent images, the above steps are performed to obtain a set of relative velocities corresponding to the adjacent images. For each set of relative velocities, the vehicle chassis scanning device counts the non-zero velocities in the set to obtain a first statistical count, and counts the relative velocities in the set to obtain a second statistical count. The first statistical count is divided by the second statistical count to obtain the proportion of non-zero velocities in the set of relative velocities. The proportion is compared with a preset threshold. If the proportion is greater than the preset threshold, the two adjacent images are identified as the images to be synthesized; if the proportion is less than or equal to the preset threshold, one of the two adjacent images is identified as the image to be synthesized.

[0141] The vehicle chassis scanning equipment uses target distortion correction parameters to correct the distortion of multiple images to be synthesized corresponding to the target vehicle, resulting in multiple corrected images. Then, the multiple corrected images are synthesized to obtain the target image.

[0142] The aforementioned image synthesis method, apparatus, computer equipment, storage medium, and computer program product involve a terminal acquiring a first image and a second image corresponding to a target vehicle, dividing the first and second images into multiple corresponding first image blocks and second image blocks, extracting features from local image blocks near target pixels to obtain feature points within these local image blocks, where each feature point represents a local image feature. Matching points corresponding to the feature points are then identified in the second image block corresponding to the first image block. A feature point can be understood as a pixel of a component in the first image block, and a matching point can be understood as a pixel of the same component in the second image block. That is, a pixel of the same component moves from a feature point in the first image block to a matching point in the second image block. The matching point is determined based on the first position of the feature point and the second position of the matching point. The displacement of feature points is determined, and the target displacement of the target pixel is determined based on the displacement of multiple feature points. Matching points corresponding to the feature points are determined through local image features. Compared with determining the matching points corresponding to the target pixel in the second image block, the accuracy of the matching points is improved. Determining the target displacement of the target pixel based on the displacement of feature points improves the accuracy of the target displacement, thereby improving the accuracy of the relative velocity set. The relative velocity set reflects the height of the target vehicle's chassis. Target distortion correction parameters are determined based on the relative velocity set, i.e., target distortion correction parameters that match the height of the vehicle chassis are selected. The target distortion correction parameters are used to correct the distortion of the image to be synthesized, reducing the imaging ratio deviation in the corrected image. The corrected image is then synthesized to obtain the target image, improving the accuracy of the target image.

[0143] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0144] Based on the same inventive concept, this application also provides an image compositing apparatus for implementing the image compositing method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more image compositing apparatus embodiments provided below can be found in the limitations of the image compositing method described above, and will not be repeated here.

[0145] In one embodiment, such as Figure 9 As shown, an image synthesis apparatus is provided, comprising: an acquisition module 902, a displacement determination module 904, a velocity determination module 906, a parameter determination module 908, and a synthesis module 910, wherein:

[0146] The acquisition module 902 is used to acquire a first image and a second image corresponding to the target vehicle, divide the first image into multiple first image blocks, and divide the second image into multiple second image blocks; the first image blocks and the second image blocks correspond one-to-one.

[0147] The displacement determination module 904 is used to determine the target displacement of the target pixel in the first image block based on the first position of the feature point in the first image block in the first image and the second position of the matching point in the second image block corresponding to the first image block in the second image; the feature point and the matching point correspond.

[0148] The velocity determination module 906 is used to determine the set of relative velocities based on the target displacement of the target pixels in each first image block.

[0149] The parameter determination module 908 is used to determine the target distortion correction parameters corresponding to the target vehicle based on the set of relative velocities.

[0150] The synthesis module 910 is used to perform distortion correction on multiple images to be synthesized corresponding to the target vehicle based on the target distortion correction parameters, to obtain multiple corrected images, and to synthesize the multiple corrected images to obtain the target image.

[0151] In one embodiment, the displacement determination module 904 is further configured to: for each first image block, determine a local image block of a preset size centered on the target pixel of the first image block; extract image features from the local image block to obtain feature points of the local image block and a first position of the feature points in the first image; based on the image features corresponding to the feature points, determine a matching point corresponding to the feature points in a second image block corresponding to the first image block and a second position of the matching point in the second image; the position of the second image block corresponding to the first image block in the second image is the same as the position of the first image block in the first image; and determine the target displacement of the target pixel in the first image block based on the first position and the second position.

[0152] In one embodiment, the displacement determination module 904 is further configured to: for each feature point, obtain the first lateral position corresponding to the feature point from the first position of the feature point, and obtain the second lateral position corresponding to the feature point from the second position of the matching point; determine the difference between the first lateral position and the second lateral position corresponding to the feature point as the displacement of the feature point; and average the displacements of each feature point to obtain the target displacement of the target pixel.

[0153] In one embodiment, the velocity determination module 906 is further configured to: compare the target displacements of target pixels in each first image block, determine the largest target displacement as the reference displacement; and determine a set of relative velocities based on the ratio between the target displacements of target pixels in each first image block and the reference displacement.

[0154] In one embodiment, the parameter determination module 908 is further configured to: obtain the mapping relationship between the candidate speed set and the candidate distortion correction parameters; for each candidate speed set, determine the set similarity corresponding to the candidate speed set based on the relative speed set and the candidate speed set; compare the set similarities corresponding to each candidate speed set, and determine the candidate speed set corresponding to the largest set similarity as the target speed set; and based on the mapping relationship, determine the candidate distortion correction parameters corresponding to the target speed set as the target distortion correction parameters for the target vehicle.

[0155] In one embodiment, the parameter determination module 908 is further configured to: obtain the pixel position of the target pixel corresponding to each relative velocity in the relative velocity set; determine the matching velocity set from the candidate velocity set based on each pixel position; and calculate the similarity between the relative velocity set and the matching velocity set corresponding to the candidate velocity set for each candidate velocity set, thereby obtaining the set similarity corresponding to the candidate velocity set.

[0156] In one embodiment, the image synthesis apparatus further includes a selection module, which is configured to: acquire a captured image corresponding to the target vehicle; determine a set of relative speeds corresponding to any two adjacent captured images; for each set of relative speeds, calculate the proportion of non-zero speeds in the set of relative speeds, compare the proportion with a preset threshold value, and if the proportion is greater than the preset threshold value, determine the two adjacent captured images as images to be synthesized; if the proportion is less than or equal to the preset threshold value, determine one of the two adjacent captured images as the image to be synthesized.

[0157] Each module in the aforementioned image synthesis device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0158] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 10As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an image synthesis method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0159] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0160] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0161] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0162] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0163] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0164] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0165] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.

[0166] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. An image synthesis method, characterized in that, The method includes: The chassis of the target vehicle is photographed to obtain multiple images. A first image and a second image are selected from the multiple images. The first image is divided into multiple first image blocks, and the second image is divided into multiple second image blocks. The first image blocks and the second image blocks correspond one-to-one. Based on the first position of the feature point in the first image block in the first image, and the second position of the matching point in the second image block corresponding to the first image block in the second image, the target displacement of the target pixel in the first image block is determined; the feature point corresponds to the matching point. Based on the target displacement of the target pixels in each of the first image blocks, a set of relative velocities is determined; Based on the set of relative speeds, the target distortion correction parameters corresponding to the target vehicle are determined, including: based on the set of relative speeds, the target height level of the target vehicle is determined; the height level and candidate distortion correction parameters are obtained; and based on the height mapping relationship, the candidate distortion correction parameters corresponding to the target height level are determined as the target distortion correction parameters corresponding to the target vehicle. Based on the target distortion correction parameters, distortion correction is performed on multiple images to be synthesized corresponding to the target vehicle to obtain multiple corrected images. The multiple corrected images are then synthesized to obtain the target image.

2. The method according to claim 1, characterized in that, The step of determining the target displacement of a target pixel in the first image block based on the first position of a feature point in the first image block in the first image and the second position of a matching point in the second image block corresponding to the first image block in the second image includes: For each of the first image blocks, a local image block of a preset size is determined with the target pixel of the first image block as the center; Image features are extracted from the local image patch to obtain the feature points of the local image patch and the first position of the feature points in the first image; Based on the image features corresponding to the feature points, a matching point corresponding to the feature points is determined in a second image block corresponding to the first image block, and the second position of the matching point in the second image is determined; the position of the second image block corresponding to the first image block in the second image is the same as the position of the first image block in the first image. Based on the first position and the second position, the target displacement of the target pixel in the first image block is determined.

3. The method according to claim 2, characterized in that, Determining the target displacement of the target pixel in the first image block based on the first position and the second position includes: For each feature point, the first horizontal position corresponding to the feature point is obtained from the first position of the feature point, and the second horizontal position corresponding to the feature point is obtained from the second position of the matching point; The difference between the first lateral position and the second lateral position corresponding to the feature point is determined as the displacement of the feature point; The target displacement of the target pixel is obtained by averaging the displacements of each feature point.

4. The method according to claim 1, characterized in that, The determination of the relative velocity set based on the target displacement of target pixels in each of the first image blocks includes: The target displacements of target pixels in each of the first image blocks are compared, and the largest target displacement is determined as the reference displacement. The relative velocity set is determined based on the ratio between the target displacement of the target pixel in each of the first image blocks and the reference displacement.

5. The method according to claim 1, characterized in that, The determination of the target distortion correction parameters corresponding to the target vehicle based on the set of relative velocities includes: Obtain the mapping relationship between the candidate velocity set and the candidate distortion correction parameters; For each candidate velocity set, a set similarity is determined based on the relative velocity set and the candidate velocity set. The set similarity of each candidate velocity set is compared, and the candidate velocity set with the highest set similarity is determined as the target velocity set. Based on the mapping relationship, the candidate distortion correction parameters corresponding to the target velocity set are determined as the target distortion correction parameters for the target vehicle.

6. The method according to claim 5, characterized in that, The step of determining the set similarity corresponding to each candidate velocity set based on the relative velocity set and the candidate velocity set includes: Obtain the pixel position of the target pixel corresponding to each relative velocity in the set of relative velocities; Based on the position of each pixel, a matching velocity set is determined from the candidate velocity set; For each candidate velocity set, the similarity between the relative velocity set and the matching velocity set corresponding to the candidate velocity set is calculated to obtain the set similarity corresponding to the candidate velocity set.

7. The method according to claim 1, characterized in that, Before performing distortion correction on the multiple images to be synthesized corresponding to the target vehicle based on the target distortion correction parameters, the process further includes: Acquire the image corresponding to the target vehicle; Determine the set of relative velocities corresponding to any two adjacent acquired images; For each set of relative velocities, the proportion of non-zero velocities in the set of relative velocities is counted, and the proportion is compared with a preset threshold. If the proportion is greater than the preset threshold, then two adjacent acquired images are determined as images to be synthesized. If the percentage is less than or equal to the preset threshold, then one of the two adjacent acquired images is determined as the image to be synthesized.

8. An image synthesis apparatus, characterized in that, The device includes: The acquisition module is used to capture images of the chassis of a target vehicle that has passed by, obtain multiple captured images, select a first image and a second image from the multiple captured images, divide the first image into multiple first image blocks, and divide the second image into multiple second image blocks; the first image blocks and the second image blocks correspond one-to-one. The displacement determination module is used to determine the target displacement of a target pixel in the first image block based on the first position of a feature point in the first image block in the first image and the second position of a matching point in the second image block corresponding to the first image block in the second image; the feature point corresponds to the matching point. The velocity determination module is used to determine a set of relative velocities based on the target displacement of the target pixels in each of the first image blocks; The parameter determination module is used to determine the target distortion correction parameters corresponding to the target vehicle based on the relative speed set, including: determining the target height level of the target vehicle based on the relative speed set, obtaining the height mapping relationship between the height level and the candidate distortion correction parameters, and determining the candidate distortion correction parameters corresponding to the target height level as the target distortion correction parameters corresponding to the target vehicle based on the height mapping relationship. The synthesis module is used to perform distortion correction on multiple images to be synthesized corresponding to the target vehicle based on the target distortion correction parameters, to obtain multiple corrected images, and to synthesize the multiple corrected images to obtain the target image.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

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

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.