Coincident image diagonal splicing method and device and electronic equipment

By using the overlapping image diagonal stitching method in the on-board panoramic image system, and using the Poisson fusion algorithm to achieve high-quality seamless stitching, the problems of high computational complexity and poor stitching effect in the prior art are solved.

CN120047322APending Publication Date: 2025-05-27SAIC GM WULING AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411995024.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

The existing on-board panoramic image stitching technology has high computational complexity and poor splicing effect, making it difficult to achieve high-quality seamless splicing when dealing with camera viewing angle limitations and light changes.

Method used

The diagonal stitching method of overlapping images is used to determine the overlapping area of ​​the image, determine the fusion area based on the diagonal line, perform image fusion, use the Poisson fusion algorithm to achieve a smooth transition, and complete the final stitching through the existing stitching algorithm.

Benefits of technology

It reduces the computational complexity while ensuring high-quality seamless splicing effect, and is suitable for on-board panoramic imaging systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120047322A_ABST
    Figure CN120047322A_ABST
Patent Text Reader

Abstract

The invention relates to a superposed image diagonal splicing method and device and electronic equipment, and belongs to the technical field of vehicle-mounted panoramic image.The method comprises the steps that a superposed area of a first image and a second image is determined, and a fusion area in the superposed area is determined according to the diagonal of the superposed area, performing image fusion on the fusion region according to the width of the fusion region to obtain a first to-be-fused image, obtaining a second to-be-fused image according to an image in the overlapping region in the first image and an image in the overlapping region in the second image, and obtaining a target fusion image through a Poisson fusion algorithm according to the first to-be-fused image and the second to-be-fused image, removing the image of the fusion region, replacing the image with a target fusion image, and splicing the first image, the target fusion image and the second image through an existing image splicing algorithm to obtain a target spliced image; the Poisson fusion algorithm realizes fusion by minimizing the image gradient field difference value, so that the calculation complexity is low, and a good image splicing effect can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of vehicle-mounted panoramic imaging, and particularly to a method, device and electronic device for diagonal stitching of overlapping images. Background Art

[0002] In the field of intelligent driving, vehicle-mounted panoramic imaging systems are crucial for enhancing safety and driving experience. Such systems capture and stitch images around the vehicle through multiple cameras to form a 360-degree seamless view, broadening the driver's field of vision. However, traditional stitching techniques often struggle to achieve high-quality seamless stitching when dealing with camera view limitations and light changes.

[0003] There are numerous image fusion stitching techniques, including direct stitching, weighted fusion, multi-resolution spline interpolation, and optimal seam line methods. The direct stitching method is simple but has a rigid stitching effect with obvious fragmentation; the weighted fusion method is fast but is easily affected by the transition bandwidth, resulting in unevenness and ghosting; the multi-resolution spline interpolation method can achieve smooth fusion transitions, but requires multiple image filtrations, which easily lose image information and cause image blurring; the optimal seam line method based on dynamic programming has high computational complexity and high registration requirements; therefore, there is an urgent need for a method with moderate computational complexity and better stitching effect. Summary of the Invention

[0004] To this end, the present invention provides a method, device and electronic device for diagonal stitching of overlapping images to solve the problems of excessive computational complexity and poor stitching effect in the prior art.

[0005] In a first aspect, a method for diagonal stitching of overlapping images is provided, the method comprising:

[0006] Determine the overlapping region between the first image and the second image;

[0007] Determine the fusion region within the overlapping region according to the diagonal of the overlapping region;

[0008] Perform image fusion on the fusion region according to the width of the fusion region to obtain a first to-be-fused image;

[0009] Obtain a second to-be-fused image according to the image within the overlapping region in the first image and the image within the overlapping region in the second image;

[0010] Obtain a target fused image through Poisson fusion algorithm according to the first to-be-fused image and the second to-be-fused image;

[0011] Remove the image of the fusion region and replace it with the target fused image, and then stitch the first image, the target fused image and the second image through an existing image stitching algorithm to obtain a target stitched image.

[0012] Further, obtaining the target fusion graph according to the first graph to be fused and the second graph to be fused through the Poisson fusion algorithm includes:

[0013] Obtaining the target fusion graph through the solution formula of the Poisson fusion algorithm, and the solution formula is:

[0014]

[0015] where is the gradient operator, where (x, y) are the image pixel coordinates of the first graph to be fused and the second graph to be fused; v is the gradient field of the second graph to be fused, div(v) is the divergence of the gradient field v; Ω is the fusion region; f is the target fusion graph, that is, an unknown scalar function defined on Ω; is the boundary of the fusion region; f * are the first graph to be fused and the second graph to be fused, that is, known scalar functions defined on .

[0016] Further, the overlapping region is a rectangle; determining the fusion region within the overlapping region according to the diagonal of the overlapping region includes:

[0017] Taking the cutting diagonal of the overlapping region as the midline, and the cutting diagonal is the diagonal whose extension line does not pass through the first image and the second image; making a straight line parallel to the midline on both sides of the midline; the distances from the midline to the straight lines on both sides are equal and are both a preset distance;

[0018] Taking the region enclosed by the straight lines on both sides of the midline and the side lines of the overlapping region as the fusion region; the width of the fusion region is the distance between the straight lines on both sides of the midline.

[0019] Further, fusing the fusion region according to the width of the fusion region to obtain the first graph to be fused includes:

[0020] If the width of the fusion region is less than or equal to the preset width, then through the mean fusion method, fusing the image of the first image within the fusion region and the image of the second image within the fusion region to obtain an intermediate fusion graph;

[0021] If the width of the fusion region is greater than the preset width, then through the fade-in and fade-out fusion method, fusing the image of the first image within the fusion region and the image of the second image within the fusion region to obtain an intermediate fusion graph;

[0022] According to the intermediate fusion graph, splicing the first image and the second image, and obtaining the image of the overlapping region as the first graph to be fused.

[0023] Further, obtaining the second image to be fused based on the image in the overlapping region of the first image and the image in the overlapping region of the second image includes:

[0024] Taking the midline as the dividing line to divide the first image and the second image and then directly splicing them to obtain a straight splicing image;

[0025] Taking the image in the overlapping region of the straight splicing image as the second image to be fused.

[0026] Further, determining the overlapping region between the first image and the second image includes:

[0027] Obtaining two adjacent bird's-eye views from the initial bird's-eye views in the front, back, left, and right directions of the vehicle body as the first image and the second image;

[0028] Placing the first image and the second image in the same pixel coordinate system, and taking the region formed by the pixel points with the same pixel coordinates as the overlapping region.

[0029] Further, before determining the overlapping region between the first image and the second image, the method further includes:

[0030] Judging whether there is color deviation between the first image and the second image according to the color channel mean ratio;

[0031] If there is color deviation in the first image or the second image, preprocessing the image with color deviation by the gray processing method.

[0032] Further, judging whether there is color deviation between the first image and the second image according to the color channel mean ratio includes:

[0033] And judging whether there is color deviation between the first image and the second image through a color deviation judgment algorithm;

[0034] The color deviation judgment algorithm includes: obtaining the R-channel mean value, G-channel mean value, and B-channel mean value of the image;

[0035] If the ratio of the R-channel mean value to the G-channel mean value is not within the preset ratio range, the image has color deviation,

[0036] Or,

[0037] If the ratio of the G-channel mean value to the B-channel mean value is not within the preset ratio range, the image has color deviation.

[0038] In a second aspect, a diagonal splicing device for overlapping images is provided, and the device includes:

[0039] An area determination module, configured to determine an overlapping area between a first image and a second image;

[0040] It is further configured to determine a fusion area within the overlapping area according to the diagonal of the overlapping area;

[0041] An image-to-be-fused picture module, configured to perform image fusion on the fusion area according to the width of the fusion area to obtain a first image-to-be-fused picture;

[0042] It is further configured to obtain a second image-to-be-fused picture according to the image within the overlapping area in the first image and the image within the overlapping area in the second image;

[0043] A fusion module, configured to obtain a target fusion picture through a Poisson fusion algorithm according to the first image-to-be-fused picture and the second image-to-be-fused picture;

[0044] A splicing module, configured to remove the image of the fusion area and replace it with the target fusion picture, and then splice the first image, the target fusion picture and the second image through an existing image splicing algorithm to obtain a target spliced picture.

[0045] In a third aspect, an electronic device is provided, including:

[0046] At least one processor; and

[0047] A memory communicatively connected to the at least one processor; wherein,

[0048] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the above overlapping image diagonal splicing methods.

[0049] The present invention adopts the above technical solutions and at least has the following beneficial effects:

[0050] An overlapping image diagonal splicing method, device and electronic device are provided. The overlapping area between a first image and a second image is determined. The fusion area within the overlapping area is determined according to the diagonal of the overlapping area. The fusion area is subjected to image fusion according to the width of the fusion area to obtain a first image-to-be-fused picture. A second image-to-be-fused picture is obtained according to the image within the overlapping area in the first image and the image within the overlapping area in the second image. A target fusion picture is obtained through a Poisson fusion algorithm according to the first image-to-be-fused picture and the second image-to-be-fused picture. The image of the fusion area is removed and replaced with the target fusion picture, and then the first image, the target fusion picture and the second image are spliced through an existing image splicing algorithm to obtain a target spliced picture. In this method, the Poisson fusion algorithm realizes fusion by minimizing the difference in the image gradient field, which not only has a low computational complexity, but also can ensure a good image splicing effect.

[0051] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and do not limit this application. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0053] Figure 1 is a flowchart of a method for splicing the diagonals of overlapping images shown in an exemplary embodiment of the present invention;

[0054] Figure 2 is a schematic diagram A of the overlapping area of the first image and the second image shown in an exemplary embodiment of the present invention;

[0055] Figure 3 is a schematic diagram B of the overlapping area of the first image and the second image shown in an exemplary embodiment of the present invention;

[0056] Figure 4 is a schematic diagram of the first image to be fused shown in an exemplary embodiment of the present invention;

[0057] Figure 5 is a schematic diagram of the second image to be fused shown in an exemplary embodiment of the present invention;

[0058] Figure 6 is a schematic block diagram of a device for splicing the diagonals of overlapping images shown in an exemplary embodiment of the present invention;

[0059] Figure 7 is a schematic block diagram of an electronic device shown in an exemplary embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0060] In order to make the objectives, technical solutions and advantages of this application more clear and understandable, the following further details this application in conjunction with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.

[0061] Existing image fusion and stitching techniques include direct stitching, weighted fusion, multi-resolution spline interpolation, and optimal seam methods. The direct stitching method is simple but the stitching effect is rigid and the sense of fragmentation is obvious; the weighted fusion method is fast but is easily affected by the transition bandwidth, resulting in unevenness and ghosting; the multi-resolution spline interpolation method can achieve smooth fusion transitions, but multiple image filters need to be performed, and it is easy to lose image information and cause image blurring; the optimal seam method based on dynamic programming is computationally complex, has high requirements for registration, and is not easy to implement.

[0062] In the embodiments of the present application, a method, device, and electronic device for stitching overlapping image diagonals are provided. Pictures with reduced color differences in the overlapping area through color consistency processing are used to obtain a target image and a background image through weighted fusion and direct stitching methods respectively, and Poisson fusion is used to achieve smooth transitions and seamless stitching between the images, and finally a high-quality seamless stitched image is obtained.

[0063] The methods and devices in the present application will be described below through specific embodiments.

[0064] Please refer to Figure 1 , Figure 1 which is a flowchart of a method for stitching overlapping image diagonals shown in an exemplary embodiment of the present invention. Refer to Figure 1 and the method includes:

[0065] Step S11: Determine the overlapping area between the first image and the second image;

[0066] Step S12: Determine the fusion area within the overlapping area according to the diagonal of the overlapping area;

[0067] Step S13: Perform image fusion on the fusion area according to the width of the fusion area to obtain a first image to be fused;

[0068] Step S14: Obtain a second image to be fused according to the image within the overlapping area in the first image and the image within the overlapping area in the second image;

[0069] Step S15: Obtain a target fusion image through the Poisson fusion algorithm according to the first image to be fused and the second image to be fused;

[0070] Step S16: After removing the image in the fusion area and replacing it with the target fusion image, stitch the first image, the target fusion image, and the second image through an existing image stitching algorithm to obtain a target stitched image.

[0071] It should be noted that the technical solution provided in this embodiment can be added to the existing in-vehicle system in the form of a small program in specific practice, or it can also be in the form of an independent application program, providing an interface externally to complete the image stitching function; applicable scenarios include but are not limited to: in-vehicle panoramic image synthesis.

[0072] It should be noted that before splicing by this method, the color consistency of the first image and the second image can be adjusted first to make the splicing effect better.

[0073] It can be understood that for the method provided in this embodiment, first, the overlapping region between the first image and the second image is determined. The fusion region within the overlapping region is determined based on the diagonal of the overlapping region. The fusion region is subjected to image fusion according to the width of the fusion region to obtain a first image to be fused. The second image to be fused is obtained based on the image within the overlapping region in the first image and the image within the overlapping region in the second image. The target fusion image is obtained according to the first image to be fused and the second image to be fused through the Poisson fusion algorithm. After removing the image of the fusion region, it is replaced with the target fusion image, and then the first image, the target fusion image, and the second image are spliced through the existing image splicing algorithm to obtain the target splicing image. In this method, the Poisson fusion algorithm realizes fusion by minimizing the difference of the image gradient field, which not only has a low computational complexity but also can ensure a good image splicing effect.

[0074] Please refer to Figure 2 , Figure 2 which is the schematic diagram A of the overlapping region between the first image and the second image shown in an exemplary embodiment of the present invention. Refer to Figure 2 , in specific practice, step S11 "determine the overlapping region between the first image and the second image" includes: obtaining two adjacent bird's-eye views from the initial bird's-eye views in the front, rear, left, and right directions of the vehicle body as the first image and the second image; placing the first image and the second image in the same pixel coordinate system, and the region formed by the pixel points with the same pixel coordinates is used as the overlapping region.

[0075] It should be noted that the vehicle-mounted surround-view camera of the vehicle collects four fisheye images of the front, rear, left, and right of the vehicle body, and generates four bird's-eye views in RGB color format through any bird's-eye view algorithm; all four bird's-eye views are rectangles. Taking the centroid of the vehicle top view graph as the center, the four bird's-eye views are respectively placed in the front, left, right, and rear of the corresponding vehicle. A plane rectangular coordinate system is established with the center as the origin, and the region formed by the pixel points with the same pixel coordinates is used as the overlapping region, and the overlapping region is a rectangle; this method defines that the bird's-eye views are scattered in the front, rear, left, and right of the vehicle body in the same pixel coordinate system, and the part with the same coordinates is the overlapping region of the bird's-eye views; the present invention defines the image fusion region as a splicing seam with a width of a preset number of pixels based on the diagonal of the overlapping region.

[0076] Please refer to Figure 3 , Figure 3 which is the schematic diagram B of the overlapping region between the first image and the second image shown in an exemplary embodiment of the present invention. Refer to Figure 3, in specific practice, step S12 "determine the fusion region within the overlapping region according to the diagonal line of the overlapping region" includes: using the cutting diagonal line of the overlapping region as the median line, where the cutting diagonal line is the diagonal line whose extension line does not pass through the first image and the second image; making a straight line parallel to the median line on each side of the median line; the distances from the median line to the two side lines are equal and both are the preset distance; taking the region enclosed by the two side lines on both sides of the median line and the side lines of the overlapping region as the fusion region; the width of the fusion region is the distance between the two side lines on both sides of the median line.

[0077] It should be noted that, referring to Figure 3 , the line ab is the cutting diagonal line, the lines cd and ef are the straight lines parallel to the cutting diagonal line; the region formed by a, c, d, b, f, e is the fusion region; the lines ea, ac, cd, db, bf, and ef are all the boundary lines of the fusion region; the distance between the lines cd and ef is the width of the fusion region; the preset distance is the length formed by a preset number of pixels, which is set according to the splicing accuracy. The higher the splicing accuracy is set, the more the preset number of pixels, and the larger the preset distance.

[0078] Please refer to Figure 4 , Figure 4 is a schematic diagram of the first image to be fused shown in an exemplary embodiment of the present invention. Referring to Figure 4 , in specific practice, step S13 "fuse the fusion region according to the width of the fusion region to obtain the first image to be fused" includes: if the width of the fusion region is less than or equal to the preset width, then through the mean fusion method, fuse the image within the fusion region in the first image and the image within the fusion region in the second image to obtain an intermediate fusion image; if the width of the fusion region is greater than the preset width, then through the fade-in and fade-out fusion method, fuse the image within the fusion region in the first image and the image within the fusion region in the second image to obtain an intermediate fusion image; according to the intermediate fusion image, splice the first image and the second image and then obtain the image of the overlapping region as the first image to be fused.

[0079] Please refer to Figure 5 , Figure 5 is a schematic diagram of the second image to be fused shown in an exemplary embodiment of the present invention. Referring to Figure 5 , in specific practice, step S14 "obtain the second image to be fused based on the image within the overlapping region in the first image and the image within the overlapping region in the second image" includes: directly splicing the first image and the second image after dividing them with the median line as the dividing line to obtain a direct splicing image; taking the image within the overlapping region of the direct splicing image as the second image to be fused.

[0080] In specific practice, step S15 "obtain the target fusion image according to the first image to be fused and the second image to be fused through the Poisson fusion algorithm" includes: obtaining the target fusion image through the solution formula of the Poisson fusion algorithm, and the solution formula is:

[0081]

[0082] Among them, is the gradient operator, where (x, y) are the image pixel coordinates of the first image to be fused and the second image to be fused; v is the gradient field of the second image to be fused, and div(v) is the divergence of the gradient field v; Ω is the fusion region; f is the target fused image, that is, an unknown scalar function defined on Ω; is the boundary of the fusion region; f * are the first image to be fused and the second image to be fused, that is, known scalar functions defined on the known scalar function.

[0083] It should be noted that the Poisson formula under the boundary conditions of the fusion region of the first image to be fused is:

[0084] ; where Ω is the fusion region; ▽ is the gradient operator; f is the target fused image, that is, an unknown scalar function defined on Ω; is the boundary of the fusion region; f * are the first image to be fused and the second image to be fused, that is, known scalar functions defined on the known scalar function; combined with the Euler - Lagrange equation, a solution formula is obtained; an iterative method (such as the Gauss - Seidel iterative method) is used to solve the Poisson equation, and the stitched image of the fusion region is obtained as the target fused image.

[0085] In specific practice, before determining the overlapping region of the first image and the second image, the method further includes: judging whether there is a color deviation between the first image and the second image according to the mean ratio of color channels; if there is a color deviation in the first image or the second image, the image with the color deviation is pre - processed by the gray - scale processing method.

[0086] Specifically, judging whether there is a color deviation between the first image and the second image according to the mean ratio of color channels includes: judging whether there is a color deviation between the first image and the second image through a color - deviation judgment algorithm; the color - deviation judgment algorithm includes: obtaining the mean value of the R channel, the mean value of the G channel, and the mean value of the B channel of the image; if the ratio of the mean value of the R channel to the mean value of the G channel is not within the preset ratio range, the image has a color deviation, or, if the ratio of the mean value of the G channel to the mean value of the B channel is not within the preset ratio range, the image has a color deviation.

[0087] It should be noted that the common color temperature range is 2500K - 7500K, and the preset ratio range is defined according to empirical values.

[0088] Please refer to Figure 6 , Figure 6 which is a schematic block diagram of an overlapping image diagonal stitching device shown in an exemplary embodiment of the present invention. Refer to Figure 6, the overlapping image diagonal stitching device 100 includes:

[0089] An area determination module 101 for determining the overlapping area of the first image and the second image;

[0090] It is also used to determine the fusion area within the overlapping area according to the diagonal of the overlapping area;

[0091] A to-be-fused picture module 102 for performing image fusion on the fusion area according to the width of the fusion area to obtain a first to-be-fused picture;

[0092] It is also used to obtain a second to-be-fused picture according to the image within the overlapping area in the first image and the image within the overlapping area in the second image;

[0093] A fusion module 103 for obtaining a target fusion picture through a Poisson fusion algorithm based on the first to-be-fused picture and the second to-be-fused picture;

[0094] A stitching module 104 for removing the image of the fusion area and replacing it with the target fusion picture, and then stitching the first image, the target fusion picture, and the second image through an existing image stitching algorithm to obtain a target stitched picture.

[0095] It should be noted that the scenarios where the technical solution provided in this embodiment can be applied in specific practices include, but are not limited to: vehicle-mounted panoramic image synthesis.

[0096] It should be noted that before stitching through this device, the color consistency of the first image and the second image can be adjusted first to make the stitching effect better.

[0097] It can be understood that the device provided in this embodiment first determines the overlapping area of the first image and the second image, determines the fusion area within the overlapping area according to the diagonal of the overlapping area, performs image fusion on the fusion area according to the width of the fusion area to obtain a first to-be-fused picture, obtains a second to-be-fused picture according to the image within the overlapping area in the first image and the image within the overlapping area in the second image, obtains a target fusion picture through a Poisson fusion algorithm based on the first to-be-fused picture and the second to-be-fused picture, removes the image of the fusion area and replaces it with the target fusion picture, and then stitches the first image, the target fusion picture, and the second image through an existing image stitching algorithm to obtain a target stitched picture; in this method, the Poisson fusion algorithm realizes fusion by minimizing the difference of the image gradient field, which not only has a low computational complexity but also can ensure a good image stitching effect.

[0098] Please refer to Figure 7 , Figure 7 is a schematic block diagram of an electronic device shown in an exemplary embodiment of the present invention. Refer to Figure 7 , the electronic device 200 includes:

[0099] At least one processor 202; and

[0100] A memory 201 communicatively connected to the at least one processor 202; wherein

[0101] The memory 201 stores instructions executable by the at least one processor 202, and the instructions are executed by the at least one processor 202 to enable the at least one processor 202 to execute any one of the above-mentioned overlapping image diagonal stitching methods.

[0102] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can be made, 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 appended claims.

[0103] Those of ordinary skill in the art can understand that all or part of the processes of implementing the above-mentioned embodiment methods can be completed by instructing relevant hardware through a computer program. 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 above-mentioned method embodiments. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided by the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), 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), etc.

[0104] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope recorded in this specification.

[0105] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.

Claims

1. A diagonal stitching method for overlapping images, characterized in that: The method comprises: determining an overlapping area between the first image and the second image; Determining a fusion area within the overlapping area according to a diagonal line of the overlapping area; Performing image fusion on the fusion area according to the width of the fusion area to obtain a first image to be fused; Obtaining a second image to be fused according to the image in the overlapped area of ​​the first image and the image in the overlapped area of ​​the second image; Obtaining a target fusion image by using a Poisson fusion algorithm according to the first image to be fused and the second image to be fused; The image of the fusion area is removed and replaced with the target fusion image, and then the first image, the target fusion image and the second image are spliced ​​by an existing image splicing algorithm to obtain a target splicing image.

2. The method according to claim 1, characterized in that The step of obtaining a target fusion image by using a Poisson fusion algorithm according to the first image to be fused and the second image to be fused includes: The target fusion graph is obtained by the solution formula of the Poisson fusion algorithm, and the solution formula is: in, is the gradient operator, Where (x, y) is the image pixel coordinates of the first image to be fused and the second image to be fused; v is the gradient field of the second image to be fused, div(v) is the divergence of the gradient field v; Ω is the fusion area; f is the target fusion image, that is, the unknown scalar function defined on Ω; is the boundary of the fusion area; f * is the first image to be fused and the second image to be fused, that is, defined in A known scalar function of .

3. The method according to claim 2, characterized in that The overlapping area is a rectangle; and determining the fusion area within the overlapping area according to the diagonal of the overlapping area includes: The cutting diagonal line of the overlapped area is used as the midline, and the cutting diagonal line is the diagonal line of the first image and the second image that is extended and does not pass through; a straight line parallel to the midline is drawn on both sides of the midline; the distances between the midline and the straight lines on both sides are equal and are preset distances; The area enclosed by the straight lines on both sides of the center line and the edge lines of the overlapping area is taken as the fusion area; the width of the fusion area is the distance between the straight lines on both sides of the center line.

4. The method according to claim 3, characterized in that The step of fusing the fusion regions according to the width of the fusion regions to obtain a first image to be fused includes: If the width of the fusion area is less than or equal to the preset width, the image in the fusion area of ​​the first image and the image in the fusion area of ​​the second image are fused by a mean fusion method to obtain an intermediate fusion image; If the width of the fusion area is greater than the preset width, the image in the fusion area of ​​the first image and the image in the fusion area of ​​the second image are fused by a fade-in and fade-out fusion method to obtain an intermediate fusion image; The first image and the second image are spliced ​​together according to the intermediate fusion image to obtain an image of the overlapping area as a first image to be fused.

5. The method according to claim 3, characterized in that: The step of obtaining a second image to be fused according to the image in the overlapped area of ​​the first image and the image in the overlapped area of ​​the second image comprises: The first image and the second image are divided by taking the center line as a dividing line and then directly spliced ​​together to obtain a straight puzzle; The image in the overlapping area of ​​the straight puzzle is used as the second image to be fused.

6. The method according to claim 1, characterized in that The determining the overlapping area between the first image and the second image includes: Acquire two adjacent bird's-eye views from the initial bird's-eye view of the vehicle body in four directions, front, back, left, and right, as the first image and the second image; The first image and the second image are placed in the same pixel coordinate system, and the area formed by the pixels with the same pixel coordinates is used as the overlapping area.

7. The method according to claim 1, characterized in that Before determining the overlapping area between the first image and the second image, the method further includes: Determining whether the first image and the second image have color cast according to the color channel mean ratio; If the first image or the second image has color cast, the image with color cast is preprocessed by a grayscale processing method.

8. The method according to claim 7, characterized in that The step of judging whether the first image and the second image have color cast according to the color channel mean ratio includes: and determining whether the first image and the second image have color deviation by using a color deviation determination algorithm; The color deviation judgment algorithm includes: obtaining the R channel mean, the G channel mean and the B channel mean of the image; If the ratio of the mean value of the R channel to the mean value of the G channel is not within the preset ratio range, the image has color cast. or, If the ratio of the mean value of the G channel to the mean value of the B channel is not within the preset ratio range, the image has color cast.

9. A device for splicing overlapping images diagonally, characterized in that: The device comprises: An area determination module, used to determine an overlapping area between the first image and the second image; Also used for determining a fusion area within the overlapped area according to a diagonal line of the overlapped area; A module for images to be fused, used for performing image fusion on the fusion area according to the width of the fusion area to obtain a first image to be fused; Also used for obtaining a second image to be fused according to the image in the overlapped area in the first image and the image in the overlapped area in the second image; A fusion module, configured to obtain a target fusion image by using a Poisson fusion algorithm according to the first image to be fused and the second image to be fused; The stitching module is used to remove the image in the fusion area and replace it with the target fusion image, and then stitch the first image, the target fusion image and the second image by an existing image stitching algorithm to obtain a target stitching image.

10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the overlapping image diagonal stitching method according to any one of claims 1 to 8.