Brightness compensation method, device and equipment for image stitching and image stitching method

By analyzing the overlap relationship and brightness difference of each Fov image, calculating the global compensation data and performing global and local compensation, the problem of uneven brightness in image stitching is solved, and the brightness consistency of the image after stitching is significantly improved.

CN119417698APending Publication Date: 2025-02-11창추안 테크놀로지 (수저우) 컴퍼니 리미티드
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411411981.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The traditional image stitching scheme fails to effectively solve the brightness difference in the image itself, resulting in obvious wave changes in brightness of the overall image after stitching, affecting the consistency of the overall brightness of the image after stitching.

Method used

By obtaining the position mapping relationship between each Fov image and the target stitching map, the overlap relationship and overlap area information of each Fov image are determined, and the coefficient matrix representing the stitching relationship of each Fov image is analyzed to obtain the brightness difference matrix representing the brightness difference of adjacent Fov images. . Then, the global compensation data is obtained based on the coefficient matrix and the brightness difference matrix, and the global compensation is performed, and local compensation is performed based on the brightness difference matrix and the global compensation data, and a combination of global compensation and local compensation is adopted.

Benefits of technology

Through the combination of global and local compensation, the brightness difference between Fov images is solved as a whole, and the brightness difference between adjacent Fov images after global compensation is solved, significantly improving the consistency of the overall brightness of the image after stitching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119417698A_ABST
    Figure CN119417698A_ABST
Patent Text Reader

Abstract

The invention relates to a brightness compensation method, device and equipment for image splicing and an image splicing method. The brightness compensation method comprises the following steps: acquiring a position mapping relationship between each Fov image and a target spliced image; according to the position mapping relationship, determining an overlapping relationship and overlapping region information of each Fov image; according to the overlapping relation and the overlapping area information of the Fov images, a coefficient matrix representing the splicing relation of the Fov images and a brightness difference matrix representing the brightness difference of the adjacent Fov images are obtained through analysis; calculating global compensation data according to the coefficient matrix and the brightness difference matrix, and performing global compensation on each Fov image by using the global compensation data; and performing local compensation on the Fov image after global compensation according to the brightness difference matrix and the global compensation data. According to the method, global compensation and local compensation are combined, global compensation data are calculated to integrally solve the brightness difference between the Fov images and the brightness difference between the adjacent Fov images after global compensation, and the consistency of the overall brightness of the spliced images is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a brightness compensation method, device, equipment and image stitching method for image stitching. Background Art

[0002] With the rapid development of digital image acquisition and processing technologies, image fusion technology has garnered widespread attention and application. Image fusion technology is widely used in many fields, such as remote sensing image processing, medical image processing, panoramic image stitching, and industrial visual inspection. Traditional image stitching solutions use image fusion algorithms to smooth the transition between overlapping areas, but this does not address the inherent brightness differences in the images. Consequently, the overall brightness of the fused image can fluctuate significantly, affecting the overall brightness consistency of the stitched image. Summary of the Invention

[0003] Based on this, it is necessary to provide a brightness compensation method, device, computer equipment, computer-readable storage medium, computer program product and image stitching method for image stitching that can improve the consistency of the overall brightness of the stitched image to address the above problems.

[0004] A first aspect of the present application provides a brightness compensation method for image stitching, comprising:

[0005] Obtain the position mapping relationship between each Fov image and the target mosaic image;

[0006] Determining the overlapping relationship and overlapping area information of each Fov image according to the position mapping relationship;

[0007] According to the overlapping relationship and overlapping area information of each Fov image, the coefficient matrix representing the splicing relationship of each Fov image and the brightness difference matrix representing the brightness difference between adjacent Fov images are analyzed;

[0008] Calculating global compensation data according to the coefficient matrix and the brightness difference matrix, and performing global compensation on each Fov image using the global compensation data;

[0009] Local compensation is performed on the globally compensated Fov image according to the brightness difference matrix and the global compensation data.

[0010] In one embodiment, the analysis of the overlap relationship and overlap area information of each FOV image to obtain a coefficient matrix representing the splicing relationship of each FOV image and a brightness difference matrix representing the brightness difference between adjacent FOV images includes:

[0011] Constructing a coefficient matrix based on the overlapping relationship of each Fov image; wherein each row of the coefficient matrix represents the overlapping relationship of each pair of Fov images, and each column represents each Fov image;

[0012] According to the overlapping relationship and overlapping area information of each Fov image, the brightness difference of adjacent Fov images is analyzed, and a brightness difference matrix is ​​generated based on the brightness difference of adjacent Fov images.

[0013] In one embodiment, the brightness difference of adjacent FOV images is quantitatively represented by the grayscale mean difference or grayscale median difference of the overlapping area.

[0014] In one embodiment, the calculating the global compensation data based on the coefficient matrix and the brightness difference matrix includes: constructing a linear equation system based on the coefficient matrix and the brightness difference matrix, and solving the linear equation system to obtain the global compensation data.

[0015] In one embodiment, the locally compensating the globally compensated Fov image according to the brightness difference matrix and the global compensation data includes: analyzing the brightness difference between the globally compensated Fov images according to the brightness difference matrix and the global compensation data to generate a gradient compensation map, and locally compensating the Fov image based on the gradient compensation map.

[0016] In one embodiment, for an Fov image that needs to be compensated in a single direction along a preset stitching direction, the gradient compensation map is a first-order gradient compensation map; for an Fov image that needs to be compensated in at least two directions along a preset stitching direction, the gradient compensation map is a second-order gradient compensation map.

[0017] A second aspect of the present application provides an image stitching method, comprising:

[0018] According to the above brightness compensation method, brightness compensation is performed on the Fov image;

[0019] Image stitching is performed on each FOV image with brightness compensation according to the target stitching image and the preset stitching direction.

[0020] A third aspect of the present application provides a brightness compensation device for image splicing, comprising:

[0021] An information acquisition module is used to obtain the position mapping relationship between each Fov image and the target mosaic image;

[0022] A data analysis module is used to determine the overlapping relationship and overlapping area information of each FOV image based on the position mapping relationship; based on the overlapping relationship and overlapping area information of each FOV image, analyze and obtain a coefficient matrix representing the splicing relationship of each FOV image and a brightness difference matrix representing the brightness difference between adjacent FOV images;

[0023] An image compensation module is configured to calculate global compensation data based on the coefficient matrix and the brightness difference matrix, perform global compensation on each Fov image using the global compensation data, and perform local compensation on the globally compensated Fov image based on the brightness difference matrix and the global compensation data.

[0024] A fourth aspect of the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0025] A fifth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor.

[0026] In a sixth aspect, the present application provides a computer program product, comprising a computer program, which implements the steps of the above method when executed by a processor.

[0027] The brightness compensation method, device, computer equipment, computer-readable storage medium, computer program product, and image stitching method for image stitching obtain the position mapping relationship between each Fov image and the target stitching image, and determine the overlapping relationship and overlapping area information of each Fov image based on the position mapping relationship. Based on the overlapping relationship and overlapping area information of each Fov image, a coefficient matrix representing the stitching relationship of each Fov image and a brightness difference matrix representing the brightness difference between adjacent Fov images are analyzed and obtained. Global compensation data is calculated based on the coefficient matrix and the brightness difference matrix, and global compensation is performed on each Fov image using the global compensation data. Based on the brightness difference matrix and the global compensation data, the globally compensated Fov image is locally compensated. A combination of global compensation and local compensation is used to calculate global compensation data to comprehensively resolve the brightness difference between Fov images, as well as the brightness difference between adjacent Fov images after global compensation, thereby improving the consistency of the overall brightness of the stitched image. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 is a flow chart of a brightness compensation method for image stitching in one embodiment;

[0029] Figure 2 A flowchart of an embodiment of analyzing and obtaining a coefficient matrix representing the splicing relationship of each FOV image and a brightness difference matrix representing the brightness difference between adjacent FOV images based on the overlapping relationship and overlapping area information of each FOV image;

[0030] Figure 3 Schematic diagram of 3*3Fov image stitching relationship in one embodiment;

[0031] Figure 4 A schematic diagram of coefficient matrix construction in one embodiment;

[0032] Figure 5 A schematic cross-sectional view of a unidirectional first-order compensation process in one embodiment;

[0033] Figure 6 A schematic plan view of a unidirectional first-order compensation process in one embodiment;

[0034] Figure 7 A schematic diagram of a bidirectional compensation process in one embodiment;

[0035] Figure 8 is a structural block diagram of a brightness compensation device for image splicing in one embodiment;

[0036] Figure 9 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0038] Image fusion technology is a key research area in computer vision and image processing. With the rapid development of digital image acquisition and processing technologies, image fusion has garnered widespread attention and application. The development of image fusion technology relies on advances in the following areas: Feature extraction and matching: Image fusion requires feature extraction and matching of multiple images to determine their correspondence. Feature extraction algorithms such as SIFT, SURF, and ORB can extract key points from images, enabling image matching. Image registration and alignment: Image fusion requires registering and aligning multiple images to ensure consistent spatial positions and scales. Image registration involves aligning multiple images to ensure consistent spatial positions and scales. Registration and alignment algorithms can be implemented through methods such as feature point matching and camera parameter estimation. Feature points are points with significant features in an image, such as corners and edges. Image fusion algorithms: The goal of image fusion is to fuse multiple images together to produce a single image with higher quality and richer information. Common image fusion algorithms include weighted fusion, multi-band fusion, and Laplacian pyramid fusion.

[0039] Image fusion technology has been widely used in many fields. The following are some common application scenarios. Remote sensing image processing: multiple satellite or aerial images are fused together to improve the resolution, contrast and information richness of the image. Remote sensing image fusion has important application value in agriculture, urban planning, environmental monitoring and other fields; Medical image processing: multiple medical images (such as CT, MRI, etc.) are fused together to provide more comprehensive and accurate diagnostic information. Medical image fusion plays an important role in disease diagnosis, surgical planning and other aspects; Panoramic stitching: multiple local images are stitched together to form a panoramic image. Panoramic stitching is widely used in panoramic photography, virtual reality, map making and other fields; Industrial visual inspection: multiple images are fused into a large image to show the overall appearance of the inspection object, such as the appearance of a wafer.

[0040] One of the common challenges in image stitching is the uneven brightness between Fov (field of view) frames. This uneven brightness phenomenon may be caused by factors such as shooting conditions, lighting changes, or camera parameters. In the current image stitching process, some image fusion algorithms are usually adopted, such as weighted fusion, multi-band fusion, or Laplace pyramid fusion, to smoothly transition the brightness of different images to reduce the uneven brightness phenomenon. These image fusion algorithms essentially smooth the overlapping areas and do not actually solve the brightness differences in the images themselves. As a result, the overall image after fusion will have obvious wavy changes in brightness, affecting the consistency of the overall brightness of the stitched image. This wavy change will also have a relatively large impact on visual inspection algorithms based on threshold segmentation, especially affecting the calculation of defect area.

[0041] Based on this, the present application provides a brightness compensation method for image stitching, which determines the overlapping relationship and overlapping area information of each Fov image according to the position mapping relationship between each Fov image and the target stitching image. According to the overlapping relationship and overlapping area information of each Fov image, a coefficient matrix representing the stitching relationship of each Fov image and a brightness difference matrix representing the brightness difference of adjacent Fov images are analyzed to obtain global compensation data based on the coefficient matrix and the brightness difference matrix, and the global compensation data is used to perform global compensation on each Fov image. According to the brightness difference matrix and the global compensation data, the globally compensated Fov image is locally compensated. A combination of global compensation and local compensation is used to calculate the global compensation data to comprehensively solve the brightness difference between Fov images, as well as the brightness difference between adjacent Fov images after global compensation, thereby improving the consistency of the overall brightness of the stitched image.

[0042] In one embodiment, Figure 1 As shown, a brightness compensation method for image splicing is provided, comprising:

[0043] Step S110: Obtain the position mapping relationship between each Fov image and the target mosaic. Global compensation is based on the coordinate information after image registration. Therefore, after image registration, it is first necessary to locate the position mapping relationship between each Fov image and the target mosaic during the stitching process. Among them, the target mosaic serves as the target image that needs to be stitched together by each Fov image. The position mapping relationship represents the position of each Fov image in the target mosaic, as well as the overlapping relationship between different Fov images. The position mapping relationship can be determined by parameter entry after determining the position relationship between each Fov image and the target mosaic in the actual stitching scene, or it can be determined by directly importing data from an external device.

[0044] Step S120: Determine the overlap relationship and overlapping area information of each FOV image based on the position mapping relationship. After determining the position mapping relationship between each FOV image and the target mosaic, the overlap relationship and overlapping area information of the FOV images are determined based on the position mapping relationship. For example, which FOV images overlap can be determined. The size and grayscale value of the overlapping area can be used as the overlapping area information.

[0045] Step S130: Based on the overlapping relationship and overlapping area information of each FOV image, a coefficient matrix representing the stitching relationship of each FOV image and a brightness difference matrix representing the brightness difference between adjacent FOV images are analyzed. Based on the overlapping relationship and corresponding overlapping area information between each FOV image, the stitching relationship of each FOV image and the brightness difference between adjacent FOV images are analyzed to determine the coefficient matrix and the brightness difference matrix.

[0046] In one embodiment, Figure 2 As shown, step S130 includes step S132 and step S134.

[0047] Step S132: construct a coefficient matrix based on the overlapping relationship of each Fov image, wherein each row of the coefficient matrix represents the overlapping relationship of each pair of Fov images, and each column represents each Fov image.

[0048] Step S134: Analyze the brightness difference between adjacent FOV images based on the overlap relationship and overlap area information of each FOV image, and generate a brightness difference matrix based on the brightness difference between adjacent FOV images. The brightness difference between adjacent FOV images can be quantitatively represented by the grayscale mean difference or grayscale median difference of the overlap area.

[0049] Specifically, taking the splicing of nine Fov images as an example, the splicing relationship is as follows: Figure 3 As shown, Xi represents the Fov image and i represents the preset stitching direction. Figure 3The stitching relationship shown has 12 adjacent Fov image pairs. If Xi' is used to represent the brightness compensation value required for the Fov image Xi, then an equation can be used for each adjacent Fov image pair to express the brightness difference between them before and after compensation as follows:

[0050] D′ 12 =D 12 -(X′2-X′1)

[0051] D′ 23 =D 23 -(X′3-X′2)

[0052] D′ 45 =D 45 -(X′5-X′4)

[0053] D′ 56 =D 56 -(X′6-X′5)

[0054] D′ 78 =D 78 -(X′8-X′7)

[0055] D′ 89 =D 89 -(X′9-X′8)

[0056] D′ 14 =D 14 -(X′4-X′1)

[0057] D′ 25 =D 25 -(X′5-X′2)

[0058] D′ 36 =D 36 -(X′6-X′3)

[0059] D′ 47 =D 47 -(X′7-X′4)

[0060] D′ 58 =D 58 -(X′8-X′5)

[0061] D′ 69 =D 69 -(X′9-X′6)

[0062] Among them, D12 is the brightness difference between adjacent Fov images: X1 and X2. The brightness difference between adjacent Fov images is quantitatively expressed by the grayscale mean difference or grayscale median of the overlapping area. Specifically, the grayscale mean difference of the overlapping area of ​​two adjacent Fov images is calculated to quantitatively describe the brightness difference between the two Fov images. The larger the grayscale mean difference, the greater the brightness deviation; the overlapping area of ​​the two adjacent Fov images is subtracted to obtain a difference map, and the grayscale median of the pixels in the difference map is calculated. The grayscale median is used to quantitatively describe the brightness deviation. The larger the grayscale median, the greater the brightness deviation. Both of the above methods use adjacent Fov images to subtract the former from the latter according to the preset splicing direction. The positive or negative value of the result represents positive or reverse compensation (i.e., an increase or decrease in brightness).

[0063] First, construct a coefficient matrix A to describe Figure 3 As shown in the splicing relationship, each row of the coefficient matrix A represents the overlapping relationship of each pair of Fov images, and each column represents each Fov image (Xi). Since the positive and negative relationship of the brightness difference has been defined (the positive and negative values ​​of the result represent positive or negative compensation), -1 can be used to represent the former and 1 to represent the latter, so Figure 3 The splicing relationship shown can construct a coefficient matrix A, such as Figure 4 As shown in Figure 2, the number of the overlapping area of ​​the Fov image (1-12) corresponds to each row of the coefficient matrix A.

[0064] Then, a brightness difference matrix B (12 rows * 1 column) is constructed: [D12, D23, D45, D56, D78, D89, D14, D25, D36, D47, D58, D69], which describes the brightness difference between the above adjacent Fov images and is quantitatively calculated by the grayscale mean difference or grayscale median difference of the overlapping areas of adjacent Fov images.

[0065] Step S140: Global compensation data is calculated based on the coefficient matrix and the brightness difference matrix, and each FOV image is globally compensated using the global compensation data. A linear equation system can be constructed based on the coefficient matrix and the brightness difference matrix, and the linear equation system is solved to obtain the global compensation data.

[0066] Specifically, the least squares method is used to find the optimal solution to the linear equation system AXi'=B. This calculation yields the compensation value Xi'(X1'-X9') used to compensate for the global optimal brightness of each FOV image, which serves as the global compensation data. Global compensation is then performed by superimposing the corresponding global compensation value Xi' on each FOV image. While there are various mathematical methods for solving linear equations in the prior art, this case only uses the least squares method as an example, and does not exhaustively enumerate other methods.

[0067] Step S150: Locally compensate the globally compensated FOV image based on the brightness difference matrix and global compensation data. The brightness differences between the globally compensated FOV images can be analyzed based on the brightness difference matrix and global compensation data to generate a gradient compensation map. Locally compensate the FOV image based on the gradient compensation map. For FOV images that require compensation in a single direction along a preset stitching direction, the gradient compensation map is a first-order gradient compensation map. For FOV images that require compensation in at least two directions along the preset stitching direction, the gradient compensation map is a second-order gradient compensation map.

[0068] Specifically, the brightness difference between each Fov image after global compensation is still different from the actual brightness difference (D′ in the above formula ij value), the value of Xi'(X1'-X9') can be obtained by global compensation to calculate the corresponding D' ij (D12'-D69'...), then use D' ij The values ​​of (D12'-D69'...) are used to generate a first-order or second-order gradient compensation map, which is then superimposed on the adjacent FOV image to perform local compensation. Generating the gradient compensation map involves two methods: unidirectional and bidirectional, corresponding to first-order and second-order gradient compensation images, respectively.

[0069] For single direction (only left and right or only up and down splicing overlap relationship), if you follow Figure 3 The Fov image of the first row (X1, X2, X3) or the first column (X1, X4, X7) of the splicing order X1→X9 only needs to be calculated based on D′ ij The value of generates a first-order gradient image in the corresponding direction for the latter of the adjacent Fov images, such as Figure 5 Cross-sectional diagram, Figure 6 As shown in the plane diagram. It can be understood that different splicing orders will change the Fov image that needs to generate the first-order gradient map. For example Figure 3 In the example, when the splicing order of the Fov images is from right to left and from top to bottom, the Fov images located in the first row (X3, X2, X1) and the last column (X3, X6, X9) need to generate first-order gradient images in the corresponding directions.

[0070] For bidirectional images (with both left-right overlapping and top-down overlapping), such as non-first-row and non-first-column Fov images, we can first generate a first-order compensation map in the left-right direction, and then compensate the first-order compensation map in the top-bottom direction to form a second-order compensation, such as Figure 7 As shown. Figure 3For example, the stitching order X1→X9 in [1] requires compensation in at least two directions for the FOV images X5, X6, X8, and X9. It is understandable that if the stitching order is X3, X2, X1, X6, X5, X4, X9, X8, and X7, then the FOV images requiring second-order compensation are X4, X5, X7, and X8.

[0071] In addition, because the compensation value can be positive or negative, and the pixel value of the image is not allowed to be negative, the initial pixels of the image can be increased by a set grayscale value (such as 128) in advance, and then the grayscale value is subtracted from the set grayscale value when the compensation image is superimposed on the FOV image.

[0072] After global and local compensation, the FOV image is then stitched together, and the overall brightness of the stitched image is uniform without obvious brightness difference.

[0073] The brightness compensation method for image stitching described above utilizes a combination of global and local compensation to calculate global compensation data to comprehensively address the brightness differences between FOV images, as well as the brightness differences between adjacent FOV images after global compensation. Global compensation is a baseline constant compensation method that solves the optimal baseline constant by constructing a system of least squares equations. The grayscale values ​​of each FOV image are then superimposed on the corresponding baseline constant to complete global compensation, thereby reducing the overall brightness differences between FOV images. Local compensation constructs a first-order or second-order gradient map based on the global compensation results, and uses this gradient map to superimpose the FOV images to address the brightness differences between adjacent FOV images after global compensation. This brightness compensation method has a mathematical analytical solution and can complete the calculation of the brightness compensation amount in a relatively short time, improving the overall brightness consistency of the stitched image and reducing the impact on subsequent defect area calculations.

[0074] In one embodiment, an image stitching method is also provided, comprising: performing brightness compensation on the FOV images according to the brightness compensation method described above; and stitching the brightness-compensated FOV images together according to a target stitching diagram and a preset stitching direction. This combination of global and local compensation improves the overall brightness consistency of the stitched image and reduces the impact on subsequent defect area calculations.

[0075] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0076] Based on the same inventive concept, embodiments of the present application also provide a device for image stitching brightness compensation for implementing the aforementioned method for image stitching brightness compensation. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more embodiments of the device for image stitching brightness compensation provided below can be found in the aforementioned definition of the method for image stitching brightness compensation, and will not be further elaborated here.

[0077] In one embodiment, Figure 8 As shown, a brightness compensation device for image splicing is provided, comprising: an information acquisition module 110, a data analysis module 120 and an image compensation module 130, wherein:

[0078] The information acquisition module 110 is used to obtain the position mapping relationship between each FOV image and the target mosaic image.

[0079] The data analysis module 120 is used to determine the overlapping relationship and overlapping area information of each FOV image based on the position mapping relationship; based on the overlapping relationship and overlapping area information of each FOV image, analyze and obtain a coefficient matrix representing the splicing relationship of each FOV image, and a brightness difference matrix representing the brightness difference between adjacent FOV images.

[0080] The image compensation module 130 is used to calculate global compensation data based on the coefficient matrix and the brightness difference matrix, and use the global compensation data to perform global compensation on each Fov image; and perform local compensation on the globally compensated Fov image based on the brightness difference matrix and the global compensation data.

[0081] In one embodiment, the data analysis module 120 is further configured to construct a coefficient matrix based on the overlap relationship between the FOV images; analyze the brightness difference between adjacent FOV images based on the overlap relationship and overlapping area information of the FOV images; and generate a brightness difference matrix based on the brightness difference between adjacent FOV images. Each row of the coefficient matrix represents the overlap relationship between each pair of FOV images, and each column represents each FOV image. The brightness difference between adjacent FOV images is quantitatively represented by the grayscale mean difference or grayscale median difference in the overlapping area.

[0082] In one embodiment, the image compensation module 130 constructs a linear equation system according to the coefficient matrix and the brightness difference matrix, and solves the linear equation system by the least square method to obtain global compensation data.

[0083] In one embodiment, the image compensation module 130 analyzes the brightness differences between the globally compensated FOV images based on the brightness difference matrix and the global compensation data to generate a gradient compensation map. Local compensation is performed on the FOV images based on the gradient compensation map. For FOV images that require compensation in a single direction along a preset stitching direction, the gradient compensation map is a first-order gradient compensation map. For FOV images that require compensation in at least two directions along the preset stitching direction, the gradient compensation map is a second-order gradient compensation map.

[0084] Each module in the aforementioned image stitching brightness compensation device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0085] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 9As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a brightness compensation method for image splicing is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.

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

[0087] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0088] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.

[0089] In one embodiment, a computer program product is provided, comprising a computer program, which implements the steps of the above method when executed by a processor.

[0090] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may 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 may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0091] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned 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.

[0092] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A brightness compensation method for image splicing, characterized in that: include: Obtain the position mapping relationship between each Fov image and the target mosaic image; Determine the overlapping relationship and overlapping area information of each Fov image according to the position mapping relationship; According to the overlapping relationship and overlapping area information of each Fov image, the coefficient matrix representing the splicing relationship of each Fov image and the brightness difference matrix representing the brightness difference of adjacent Fov images are analyzed and obtained; Calculate global compensation data according to the coefficient matrix and the brightness difference matrix, and use the global compensation data to perform global compensation on each Fov image; According to the brightness difference matrix and the global compensation data, local compensation is performed on the globally compensated Fov image.

2. The method according to claim 1, characterized in that The method of analyzing the overlap relationship and overlap area information of each Fov image to obtain a coefficient matrix representing the splicing relationship of each Fov image and a brightness difference matrix representing the brightness difference of adjacent Fov images includes: According to the overlapping relationship of each Fov image, a coefficient matrix is ​​constructed; wherein each row of the coefficient matrix represents the overlapping relationship of each pair of Fov images, and each column represents each Fov image; According to the overlapping relationship and overlapping area information of each Fov image, the brightness difference of adjacent Fov images is analyzed, and a brightness difference matrix is ​​generated based on the brightness difference of adjacent Fov images.

3. The method according to claim 2, characterized in that The brightness difference of adjacent Fov images is quantitatively represented by the grayscale mean difference or grayscale median difference of the overlapping area.

4. The method according to claim 1, characterized in that: The step of calculating the global compensation data according to the coefficient matrix and the brightness difference matrix includes: constructing a linear equation group according to the coefficient matrix and the brightness difference matrix, and solving the linear equation group to obtain the global compensation data.

5. The method according to claim 1, characterized in that The locally compensating the globally compensated Fov image according to the brightness difference matrix and the global compensation data comprises: analyzing the brightness difference between the globally compensated Fov images according to the brightness difference matrix and the global compensation data to generate a gradient compensation map, and locally compensating the Fov image based on the gradient compensation map.

6. The method according to claim 5, characterized in that For a Fov image that needs to be compensated in a single direction along a preset stitching direction, the gradient compensation map is a first-order gradient compensation map; for a Fov image that needs to be compensated in at least two directions along a preset stitching direction, the gradient compensation map is a second-order gradient compensation map.

7. An image stitching method, characterized in that: include: According to the brightness compensation method according to any one of claims 1 to 6, brightness compensation is performed on the Fov image; According to the target stitching map and the preset stitching direction, the brightness compensated Fov images are stitched.

8. A brightness compensation device for image splicing, characterized in that: include: An information acquisition module is used to obtain the position mapping relationship between each Fov image and the target mosaic image; A data analysis module is used to determine the overlapping relationship and overlapping area information of each Fov image according to the position mapping relationship; according to the overlapping relationship and overlapping area information of each Fov image, analyze and obtain a coefficient matrix representing the splicing relationship of each Fov image, and a brightness difference matrix representing the brightness difference of adjacent Fov images; The image compensation module is used to calculate the global compensation data according to the coefficient matrix and the brightness difference matrix, and use the global compensation data to perform global compensation on each Fov image; according to the brightness difference matrix and the global compensation data, perform local compensation on the globally compensated Fov image.

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

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

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