Image gray level fusion method based on histogram mapping

The grayscale difference problem during infrared image strip stitching was solved by using histogram mapping and weighted fusion methods, achieving smooth image transition and coherence, and improving the stitching effect and the accuracy of subsequent processing.

CN121860848APending Publication Date: 2026-04-14CENT CHINA OPTOELECTRONICS TECH RES INST (CHINA STATE SHIPBUILDING CORP 717TH RES INST) +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

When infrared image stripes are stitched together, differences in grayscale can cause visual discontinuity, affecting the viewing experience and reducing the precision and accuracy of subsequent image processing.

Method used

A histogram-based mapping method is adopted. By constructing a histogram mapping table and a distance function, gray-level distribution matching and weighted fusion are performed on the overlapping areas of adjacent frame images to reduce gray-level differences. Furthermore, the image gray-level is truncated by the global gray-level maximum value to ensure that the image gray-level is within a uniform range.

Benefits of technology

It effectively reduces abrupt changes in grayscale at image stitching points, enhances the integrity and coherence of the images, and provides a good foundation for subsequent processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860848A_ABST
    Figure CN121860848A_ABST
Patent Text Reader

Abstract

The invention discloses an image gray level fusion method based on histogram mapping, and relates to the technical field of image processing, the method can process two adjacent frames of images with an overlapping region in a video stream, firstly, a global gray level extreme value is obtained based on a current frame of image, and is applied to current global image processing, and the maximum value of the global gray level is obtained; the method comprises the following steps: synchronously calculating an accumulative histogram of an image overlapping area of a current frame and a previous frame, constructing a histogram mapping table, then performing histogram mapping on the image of the current frame based on the histogram mapping table, obtaining a mapping calculation graph, introducing a weight coefficient based on a distance function, performing nonlinear weighted stacking on the original image of the current frame and the mapping calculation graph, and finally obtaining an original image of the current frame. And finally, splicing and fusing the superposed image and the previous frame of image, and splicing subsequent images frame by frame to form a complete image strip. According to the technical scheme, the gray level of the splicing area between the front frame image and the rear frame image can be effectively smoothed, the problem that the gray level at the seam of the two frame images is suddenly changed is solved, and the integrity and the continuity of the whole splicing strip graph are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more specifically, to an image grayscale fusion method based on histogram mapping. Background Technology

[0002] During the sector or perimeter scanning process of imaging equipment, the generated infrared image strips are affected by various factors such as fluctuations in the thermal radiation intensity of the target itself and changes in ambient lighting. These factors lead to significant differences in grayscale distribution when stitching together the various image strips. Due to these differences, the stitched image strips appear visually "disjointed," lacking continuity and appearing unnatural. This phenomenon not only affects the overall image's visual appeal but also negatively impacts subsequent image processing, such as target recognition, analysis, and comparison. Grayscale differences make it difficult for subsequent algorithms to achieve high-precision target detection or feature extraction when processing these images, thus reducing the accuracy of the processing results. Summary of the Invention

[0003] The purpose of this invention is to address the problem of significant grayscale differences between adjacent frames during infrared image strip stitching. This invention provides an image grayscale fusion method based on histogram mapping, which performs histogram mapping matching between the infrared image frames to be stitched to form an approximate overall grayscale. This allows for better fusion and stitching of image frames with large grayscale differences, ultimately forming infrared image stripes with more uniform grayscale for subsequent observation and other image processing.

[0004] The technical solution of this invention is: to provide an image grayscale fusion method based on histogram mapping, which is used to process i-frame images acquired by a single camera cycle scan, where there are overlapping regions with corresponding positions in two adjacent frames, including:

[0005] Step 1: For the (i+1)th frame image acquired in the current cycle, determine the global grayscale maximum value of the current processing cycle based on its grayscale value, and truncate the grayscale of the (i+1)th frame image based on the global grayscale maximum value of the previous processing cycle. At the same time, calculate the cumulative histogram for the overlapping regions corresponding to the positions in the (i)th frame image and the (i+1)th frame image respectively, and construct a histogram mapping table from the overlapping region of the (i+1)th frame image to the overlapping region of the (i)th frame image.

[0006] Step 2: Perform histogram mapping operation on the overlapping region in the (i+1)th frame image based on the histogram mapping table, so that the pixel value distribution of the overlapping region after mapping is close to the pixel value distribution of the corresponding overlapping region in the i-th frame image, and obtain the mapped calculated image.

[0007] Step 3: Construct a distance function based on the pixel distance from the overlapping region pixels in the (i+1)th frame image to the front edge of the overlapping region in the i-th frame image, and generate weight coefficients based on the distance function. Then, perform weighted fusion of the calculated image and the original (i+1)th frame image in the overlapping region based on the weight coefficients to obtain the fused image. The weight coefficients are dynamically adjusted as the pixel distance from the pixel to the front edge of the overlapping region in the i-th frame image changes.

[0008] Step 4: Stitch the fused image with the i-th frame image after removing the overlapping areas;

[0009] Step 5: Iterate through each subsequent frame of the (i+1)th frame sequentially and stitch them together to form a complete image strip. When processing each subsequent frame, the image grayscale is truncated based on the global grayscale maximum value of the current processing cycle.

[0010] Further, in step 1, cumulative histograms are calculated for the overlapping regions corresponding to the positions in the i-th frame image and the (i+1)-th frame image, respectively, and a histogram mapping table is constructed from the overlapping region of the (i+1)-th frame image to the overlapping region of the i-th frame image, specifically including:

[0011] For the overlapping region in the (i+1)th frame of the image, the number of pixels at each gray level k is counted, and represented as:

[0012] ;

[0013] In the formula, This is the initial histogram. W represents the (i+1)th frame image acquired in the current weekly scan. s Let H be the pixel width of the overlapping region, H be the pixel height of the overlapping region, and (x, y) be the coordinates of the pixels in the overlapping region. The function... Only = The time value is 1; for the initial histogram Normalization is performed to obtain a normalized histogram. and normalized histogram By performing cumulative calculations, the cumulative distribution function is obtained. , represented as:

[0014] ;

[0015] ;

[0016] In the formula, j is the gray value index in the accumulation process, j=0,1,...,k;

[0017] The cumulative distribution function of the i-th frame image is calculated in the same way. ; Cumulative distribution function based on the (i+1)th frame image The cumulative distribution function of the i-th frame image Construct a histogram mapping table from the overlapping region of the (i+1)th frame image to the overlapping region of the ith frame image, represented as:

[0018] ;

[0019] In the formula, s is the gray value in the overlapping region of the (i+1)th frame image, and t is the gray value in the overlapping region of the i-th frame image.

[0020] Furthermore, step 2 specifically includes:

[0021] Based on the histogram mapping table, grayscale values ​​are calculated for all pixels in the overlapping region of the (i+1)th frame image to obtain the mapped image, represented as follows:

[0022] ;

[0023] In the formula, This refers to the overlapping region in the (i+1)th frame of the image. The overlapping region in the mapped computational image is the same as the pixel region in the original i+1 frame image, except for the overlapping region.

[0024] Furthermore, in step 3, the distance function is constructed, specifically including:

[0025] A distance function is constructed based on the pixel distance D from the overlapping region pixels in the (i+1)th frame image to the front edge of the overlapping region in the i-th frame image. , represented as:

[0026] ;

[0027] In the formula, d is the normalized pixel distance. , b and c are constant coefficients, and the function The expression is:

[0028] ;

[0029] In the formula, r is a function The independent variable.

[0030] Furthermore, step 3 also includes:

[0031] According to the distance function Generate weight coefficients for the calculated image The weight coefficients of the original (i+1)th frame image Based on weight coefficients and The calculated image and the original (i+1)th frame image are weighted and fused within the overlapping region to obtain the fused image. The fusion process is represented as follows:

[0032] ;

[0033] In the formula, The overlapping region in the fused image is the same as the pixel value of the original (i+1)th frame image in the fused image except for the overlapping region.

[0034] Further, in step 1, for the (i+1)th frame image acquired in the current cycle scan, the global maximum and minimum grayscale values ​​for the current processing cycle are determined based on its grayscale values, specifically including:

[0035] Statistical Images Maximum grayscale value and minimum gray value , the maximum gray value and minimum gray value The global grayscale maximum value in the preprocessing cycle is represented as:

[0036] ;

[0037] ;

[0038] In the formula, This represents the 2nd percentile of the extracted image grayscale values. This represents the 98th percentile of the extracted image grayscale values.

[0039] Further, in step 1, the grayscale of the (i+1)th frame image is truncated based on the global grayscale maximum value of the previous processing cycle, specifically including:

[0040] The upper and lower limits of the grayscale values ​​in the (i+1)th frame are truncated using the global grayscale maximum and minimum values ​​from the previous processing cycle. The global grayscale maximum and minimum values ​​from the previous processing cycle include the maximum grayscale value. and minimum gray value , in the (i+1)th frame of the image, the value greater than The grayscale value is uniformly set to , in the (i+1)th frame of the image, the value less than The grayscale value is uniformly set to Complete the upper limit truncation and lower limit truncation operations.

[0041] The beneficial effects of this invention are:

[0042] The technical solution of this invention uses the basic calculation method of histogram mapping to approximate the gray-level distribution of overlapping areas in adjacent frames, reducing the gray-level difference between infrared images of adjacent frames. At the same time, it adopts a non-linear superposition method of the original image and the mapped calculation image to make the transition of the overlapping area smoother and more natural, effectively alleviating the problem of abrupt gray-level changes at the seam between two frames. The technical solution of this invention effectively smooths the gray-level of the splicing area between two consecutive frames, enhancing the integrity and coherence of the entire spliced ​​strip image, making the pixel transition of the spliced ​​image uniform and without obvious dividing lines, providing a good foundation for subsequent visual tasks or human eye observation tasks based on strips. Attached Figure Description

[0043] The advantages of the above and additional aspects of the present invention will become apparent and readily understood in the description of the embodiments in conjunction with the following drawings, wherein:

[0044] Figure 1 This is a schematic flowchart of an image grayscale fusion method based on histogram mapping according to an embodiment of the present invention;

[0045] Figure 2 This is a schematic flowchart illustrating the process of grayscale overlay of the original image of frame i+1 and its histogram mapping according to an embodiment of the present invention using a distance function;

[0046] Figure 3 This is a comparison diagram showing the effects of generating striped images using existing techniques and the method of the present invention, respectively, according to Example 1 of the present invention.

[0047] Figure 4 It is from Example 1 of the present invention Figure 3 The comparison image shows a partial detail of the effect. Detailed Implementation

[0048] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.

[0049] In the following description, many specific details are set forth in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0050] like Figure 1 As shown, this embodiment provides an image grayscale fusion method based on histogram mapping. This method is used to process i-frame images acquired by a single camera cycle scan, where there are overlapping regions at corresponding positions in two adjacent frames. The method includes:

[0051] Step 1: For the (i+1)th frame image acquired in the current cycle, determine the global grayscale maximum value of the current processing cycle based on its grayscale value, and truncate the grayscale of the (i+1)th frame image based on the global grayscale maximum value of the previous processing cycle. At the same time, calculate the cumulative histogram for the overlapping regions corresponding to the positions in the (i)th frame image and the (i+1)th frame image respectively, and construct a histogram mapping table from the overlapping region of the (i+1)th frame image to the overlapping region of the (i)th frame image.

[0052] In this embodiment, let i be the image frame formed by the camera completing one circumferential scan (circumferential scan refers to the camera rotating at a certain angle along a fixed trajectory to complete one full scan; during the circumferential scan, one image frame is acquired every time the camera rotates at a certain angle). The area of ​​the overlapping region between two adjacent image frames is assumed to be fixed, and its pixel width is W. s The image frame height is H. The complete calculation process of the method of this invention requires image information based on two adjacent frames in the video stream.

[0053] Specifically, for the (i+1)th frame image acquired in the current cycle scan, the global maximum and minimum grayscale values ​​for the current processing cycle are determined based on its grayscale values, including:

[0054] Let the (i+1)th frame image obtained in the current weekly scan be denoted as Statistical images Maximum grayscale value and minimum gray value , the maximum gray value and minimum gray value The global grayscale maximum value in the preprocessing cycle is represented as:

[0055] ;

[0056] ;

[0057] In the formula, This represents the 2nd percentile of the extracted image grayscale values. This indicates the 98th percentile of the extracted image grayscale values; setting the percentile can handle extreme brightness or darkness in the image.

[0058] The grayscale values ​​of the (i+1)th frame are truncated based on the global grayscale maximum and minimum values ​​from the previous processing cycle. Specifically, this includes:

[0059] The upper and lower limits of the grayscale values ​​in the (i+1)th frame are truncated using the global grayscale maximum and minimum values ​​from the previous processing cycle. Specifically, the global grayscale maximum and minimum values ​​from the previous processing cycle include the maximum grayscale value. and minimum gray value , in the (i+1)th frame of the image, the value greater than The grayscale value is uniformly set to , in the (i+1)th frame of the image, the value less than The grayscale value is uniformly set to Complete the upper limit truncation and lower limit truncation operations.

[0060] It should be noted that the maximum gray value among the global grayscale extremes of the previous processing cycle. and minimum gray value Given a known quantity, if the current processing cycle is the first processing cycle, i.e., i=0, then the maximum grayscale value is... and minimum gray value The maximum and minimum gray values ​​are selected from the statistics of the first frame image.

[0061] Calculate the cumulative histogram for the overlapping regions corresponding to the positions in the i-th frame and the (i+1)-th frame, and construct a histogram mapping table from the overlapping region of the (i+1)-th frame to the overlapping region of the i-th frame, specifically including:

[0062] For the overlapping region in the (i+1)th frame of the image, the number of pixels at each gray level k is counted, and represented as:

[0063] ;

[0064] In the formula, For the initial histogram, W s Let H be the pixel width of the overlapping region, H be the pixel height of the overlapping region, and (x, y) be the coordinates of the pixels in the overlapping region. For the Kronecker delta function, only = When the condition is met, the function value is 1; otherwise, it is 0. This applies to the initial histogram. Normalization is performed to obtain a normalized histogram. and normalized histogram By performing cumulative calculations, the cumulative distribution function is obtained. , represented as:

[0065] ;

[0066] ;

[0067] In the formula, j is the gray value index in the accumulation process, j=0,1,...,k. The cumulative distribution function of the i-th frame image is calculated in the same way. This will not be elaborated upon here.

[0068] Based on the cumulative distribution function of the (i+1)th frame image The cumulative distribution function of the i-th frame image Construct a histogram mapping table from the overlapping region of the (i+1)th frame image to the overlapping region of the ith frame image, represented as:

[0069] ;

[0070] In the formula, s is the gray value in the overlapping region of the (i+1)th frame image, and t is the gray value in the overlapping region of the ith frame image; histogram mapping table This means: For a certain grayscale value s in the (i+1)th frame of the image, examine the grayscale value t in the i-th frame of the image (i.e., the target image) and find the value that satisfies H. T (t)≥H S (s) The minimum gray value t under condition (s) maps the value of s to the value of target t.

[0071] It should be noted that the histogram mapping table can satisfy the condition by minimizing it. The corresponding target pixel value t, such that each grayscale value s maps to the first pixel in the target histogram that satisfies... t, to achieve histogram mapping.

[0072] Step 2: Perform histogram mapping operation on the overlapping region in the (i+1)th frame image based on the histogram mapping table, so that the pixel value distribution of the overlapping region after mapping is close to the pixel value distribution of the corresponding overlapping region in the i-th frame image, and obtain the mapped calculated image.

[0073] Specifically, based on the histogram mapping table, grayscale calculations are performed on all pixels in the overlapping region of the (i+1)th frame image to complete the histogram mapping operation, resulting in the mapped calculated image, represented as:

[0074] ;

[0075] In the formula, This refers to the overlapping region in the (i+1)th frame of the image. The overlapping region in the mapped computational image is the same as the pixel region in the original i+1 frame image, except for the overlapping region.

[0076] Step 3: Construct a distance function based on the pixel distance from the overlapping region pixels in the (i+1)th frame image to the front edge of the overlapping region in the i-th frame image, and generate weight coefficients based on the distance function. Perform weighted fusion of the calculated image and the original (i+1)th frame image in the overlapping region based on the weight coefficients to obtain the fused image. The weight coefficients are dynamically adjusted as the pixel distance from the pixel to the front edge of the overlapping region in the i-th frame image changes, so as to achieve a smooth transition of pixel values ​​in the overlapping region and reduce the brightness abruptness or color discontinuity at the splicing boundary.

[0077] Specifically, a distance function is constructed based on the pixel distance D from the overlapping region pixels in the (i+1)th frame image to the front edge of the overlapping region in the i-th frame image. , represented as:

[0078] ;

[0079] In the formula, d is the normalized pixel distance. , b and c are constant coefficients, b=0.3, c=5, function The expression is:

[0080] ;

[0081] In the formula, r is a function The independent variable.

[0082] According to this distance function Generate weight coefficients for the calculated image The weight coefficients of the original (i+1)th frame image Based on weight coefficients and The calculated image and the original (i+1)th frame image are weighted and fused within the overlapping region to obtain the fused image. The fusion process is represented as follows:

[0083] ;

[0084] In the formula, The overlapping region in the fused image is the same as the pixel value of the original (i+1)th frame image in the fused image except for the overlapping region.

[0085] In this embodiment, the front edge of the overlapping area of ​​the i-th frame image refers to the starting edge where the current frame image and the previous frame image touch in the overlapping area, that is, the front end of the overlapping area, which is usually the part where the images begin to overlap during the stitching process.

[0086] Step 4: Stitch the fused image with the i-th frame image after removing the overlapping areas.

[0087] like Figure 2 As shown, for the i-th frame image, the overlapping area corresponding to the (i+1)-th frame image is removed, and the fused image is stitched together with the i-th frame image after removing the overlapping area to form a complete image.

[0088] Step 5: Sequentially traverse each subsequent frame of the (i+1)th frame and stitch them together frame by frame to form a complete image strip. When processing each subsequent frame, the image grayscale is truncated based on the global grayscale maximum value of the current processing cycle to ensure that the grayscale values ​​of each frame are within a uniform scale range during the stitching process, thereby reducing the visual disjointedness caused by grayscale differences.

[0089] Specifically, for the (i+2)th frame, the grayscale of the (i+1)th frame is truncated based on the global maximum and minimum grayscale values ​​in the current processing cycle, i.e., the maximum grayscale value is used. and minimum gray value Upper and lower bound truncation are performed. Simultaneously, cumulative histograms are calculated for the corresponding overlapping regions in the (i+2)th and (i+1)th frames, and a histogram mapping table is constructed from the overlapping regions of the (i+2)th frame to the (i+1)th frame. Based on this histogram mapping table, the overlapping regions in the (i+2)th frame are mapped to obtain the mapped calculated image. Then, using the constructed distance function, weight coefficients are calculated based on the pixel distance from the overlapping region pixels in the (i+2)th frame to the front edge of the overlapping region in the (i+1)th frame. Based on these weight coefficients, the calculated image and the original (i+2)th frame are weighted and fused within the overlapping region to obtain the fused image. Finally, the fused image is stitched together with the (i+1)th frame image after removing the overlapping region. This process is repeated for each subsequent frame, stitching each frame to form a complete image strip.

[0090] Example 1:

[0091] Multiple frames of images are acquired by scanning the camera around the perimeter, and then the images are stitched together using common image stitching methods in the prior art (i.e., after truncating the grayscale based on the global grayscale maximum value, the two frames are directly stitched together using linear weighted superposition) and the method of this invention, respectively, to obtain two sets of striped images.

[0092] like Figure 3 As shown in the figure, the upper half of the image is a striped image generated using existing technology, and the lower half of the image is a striped image generated using the method of the present invention. Comparing the two striped images, it can be seen that when faced with abrupt changes in grayscale between adjacent frames, the existing technology only performs an overall grayscale adjustment during frame stitching, and there are still many places where the grayscale is uneven. However, the method of the present invention uses a distance function and a grayscale overlay strategy of overlaying the original image of the (i+1)th frame and its histogram mapping to achieve a smoother grayscale distribution, making the grayscale transition at the stitching point more natural and the overall striped image more holistic.

[0093] Among them, the smooth splicing details are as follows: Figure 4As shown, when transitioning from a high-grayscale image of a water scene to a low-grayscale image of a forest scene, the method of the present invention handles the grayscale transition details of the preceding and following frames better, with no obvious grayscale distinction. In contrast, the corresponding images of the prior art methods show obvious grayscale distinction and poor grayscale transition detail handling. Compared with the prior art methods, the method of the present invention is equivalent to performing preprocessing of splicing strips, making the pixel transition of the spliced ​​image uniform and without obvious dividing lines, which can lay the groundwork for subsequent visual tasks or human eye observation tasks based on strips.

[0094] The steps in this invention can be adjusted, combined, or deleted according to actual needs.

[0095] The units in the device of the present invention can be merged, divided, or reduced according to actual needs.

[0096] In this invention, the terms "installation," "connection," "linking," and "fixing" should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; "linking" can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of these terms in this invention according to the specific circumstances.

[0097] The shapes of the components in the accompanying drawings are schematic and may differ from their actual shapes. The drawings are only used to illustrate the principles of the present invention and are not intended to limit the present invention.

[0098] Although the invention has been disclosed in detail with reference to the accompanying drawings, it should be understood that these descriptions are merely exemplary and not intended to limit the application of the invention. The scope of protection of the invention is defined by the appended claims and may include various modifications, alterations, and equivalents made to the invention without departing from the scope and spirit of the invention.

Claims

1. An image grayscale fusion method based on histogram mapping, characterized in that, The method is used to process i-frame images acquired in a single camera rotation scan, where adjacent frames contain overlapping regions corresponding to their positions, including: Step 1: For the (i+1)th frame image acquired in the current cycle, determine the global grayscale maximum value of the current processing cycle based on its grayscale value, and truncate the grayscale of the (i+1)th frame image based on the global grayscale maximum value of the previous processing cycle. At the same time, calculate the cumulative histogram for the overlapping regions corresponding to the positions in the (i)th frame image and the (i+1)th frame image respectively, and construct a histogram mapping table from the overlapping region of the (i+1)th frame image to the overlapping region of the (i)th frame image. Step 2: Perform histogram mapping operation on the overlapping region in the (i+1)th frame image based on the histogram mapping table, so that the pixel value distribution of the overlapping region after mapping is close to the pixel value distribution of the corresponding overlapping region in the i-th frame image, and obtain the mapped calculated image. Step 3: Construct a distance function based on the pixel distance from the overlapping region pixels in the (i+1)th frame image to the front edge of the overlapping region in the i-th frame image, and generate weight coefficients based on the distance function. Then, perform weighted fusion of the calculated image and the original (i+1)th frame image in the overlapping region based on the weight coefficients to obtain the fused image. The weight coefficients are dynamically adjusted as the pixel distance from the pixel to the front edge of the overlapping region in the i-th frame image changes. Step 4: Stitch the fused image with the i-th frame image after removing the overlapping areas; Step 5: Iterate through each subsequent frame of the (i+1)th frame sequentially and stitch them together to form a complete image strip. When processing each subsequent frame, the image grayscale is truncated based on the global grayscale maximum value of the current processing cycle.

2. The image grayscale fusion method based on histogram mapping as described in claim 1, characterized in that, In step 1, cumulative histograms are calculated for the overlapping regions corresponding to the positions in the i-th frame image and the (i+1)-th frame image, respectively, and a histogram mapping table is constructed from the overlapping region of the (i+1)-th frame image to the overlapping region of the i-th frame image, specifically including: For the overlapping region in the (i+1)th frame of the image, the number of pixels at each gray level k is counted, and represented as: ; In the formula, This is the initial histogram. W represents the (i+1)th frame image acquired in the current weekly scan. s Let H be the pixel width of the overlapping region, H be the pixel height of the overlapping region, and (x, y) be the coordinates of the pixels in the overlapping region. The function... Only = The time value is 1; for the initial histogram Normalization is performed to obtain a normalized histogram. and normalized histogram By performing cumulative calculations, the cumulative distribution function is obtained. , represented as: ; ; In the formula, j is the gray value index in the accumulation process, j=0,1,...,k; The cumulative distribution function of the i-th frame image is calculated in the same way. ; Cumulative distribution function based on the (i+1)th frame image The cumulative distribution function of the i-th frame image Construct a histogram mapping table from the overlapping region of the (i+1)th frame image to the overlapping region of the ith frame image, represented as: ; In the formula, s is the gray value in the overlapping region of the (i+1)th frame image, and t is the gray value in the overlapping region of the i-th frame image.

3. The image grayscale fusion method based on histogram mapping as described in claim 2, characterized in that, Step 2 specifically includes: Based on the histogram mapping table, grayscale values ​​are calculated for all pixels in the overlapping region of the (i+1)th frame image to obtain the mapped image, represented as follows: ; In the formula, This refers to the overlapping region in the (i+1)th frame of the image. The overlapping region in the mapped computational image is the same as the pixel region in the original i+1 frame image, except for the overlapping region.

4. The image grayscale fusion method based on histogram mapping as described in claim 1, characterized in that, Step 3, constructing the distance function, specifically includes: A distance function is constructed based on the pixel distance D from the overlapping region pixels in the (i+1)th frame image to the front edge of the overlapping region in the i-th frame image. , represented as: ; In the formula, d is the normalized pixel distance. , b and c are constant coefficients, and the function The expression is: ; In the formula, r is a function The independent variable.

5. The image grayscale fusion method based on histogram mapping as described in claim 4, characterized in that, Step 3 also includes: According to the distance function Generate weight coefficients for the calculated image The weight coefficients of the original (i+1)th frame image Based on weight coefficients and The calculated image and the original (i+1)th frame image are weighted and fused within the overlapping region to obtain the fused image. The fusion process is represented as follows: ; In the formula, The overlapping region in the fused image is the same as the pixel value of the original (i+1)th frame image in the fused image except for the overlapping region.

6. The image grayscale fusion method based on histogram mapping as described in claim 2, characterized in that, In step 1, for the (i+1)th frame image acquired in the current cycle scan, the global maximum and minimum grayscale values ​​for the current processing cycle are determined based on its grayscale values, specifically including: Statistical Images Maximum grayscale value and minimum gray value , the maximum gray value and minimum gray value The global grayscale maximum value in the preprocessing cycle is represented as: ; ; In the formula, This represents the 2nd percentile of the extracted image grayscale values. This represents the 98th percentile of the extracted image grayscale values.

7. The image grayscale fusion method based on histogram mapping as described in claim 6, characterized in that, In step 1, the grayscale of the (i+1)th frame image is truncated based on the global grayscale maximum value of the previous processing cycle, specifically including: The upper and lower limits of the grayscale values ​​in the (i+1)th frame are truncated using the global grayscale maximum and minimum values ​​from the previous processing cycle. The global grayscale maximum and minimum values ​​from the previous processing cycle include the maximum grayscale value. and minimum gray value , in the (i+1)th frame of the image, the value greater than The grayscale value is uniformly set to , in the (i+1)th frame of the image, the value less than The grayscale value is uniformly set to Complete the upper limit truncation and lower limit truncation operations.