An image fusion method and system

By combining multi-scale image enhancement processing and HED edge detection with regional entropy calculation, the problem of inaccurate selection of the region to be fused in traditional image fusion is solved, and higher quality image fusion effect is achieved.

CN116091375BActive Publication Date: 2026-06-30BEIJING NORMAL UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING NORMAL UNIVERSITY
Filing Date
2023-01-07
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Traditional image fusion methods cannot accurately select the region to be fused, resulting in a decline in image fusion quality.

Method used

A combined approach of multi-scale image enhancement processing, HED edge detection, and region entropy calculation is adopted. The preprocessed image is generated by multi-scale image enhancement processing, closed regions are generated by HED edge detection, the entropy value of the closed regions is calculated and selected, and finally the image to be fused is fused into the region corresponding to the lowest entropy value of the closed region.

Benefits of technology

It improves the accuracy and quality of image fusion, generating clearer and more precise fused images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116091375B_ABST
    Figure CN116091375B_ABST
Patent Text Reader

Abstract

This invention proposes an image fusion method and system, relating to the field of image processing technology. The image fusion method involves acquiring an image to be fused and a target image; then, performing multi-scale image enhancement processing on the target image to generate a preprocessed image; next, using the HED edge detection method to perform edge detection on the preprocessed image, generating multiple closed regions; then, calculating the region entropy value for each closed region to generate multiple closed region entropy values; finally, filtering these entropy values ​​to obtain the lowest entropy value, thereby determining the fusion region and making the fusion region more accurate; finally, fusing the image to be fused into the closed region corresponding to the lowest entropy value to generate the final fused image, thus improving the image fusion quality.
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 fusion method and system. Background Technology

[0002] Image fusion technology, a classic technique in the field of image processing, has played an increasingly important role in the digital media era. It can fuse target objects extracted from other images into a target image to form a new image with richer semantics.

[0003] While traditional image fusion methods can achieve relatively ideal image fusion, they often fail to accurately select the fusion region, thus reducing the quality of the fusion. Typically, the fusion region is a relatively smooth area without pixel abrupt changes, a characteristic that traditional methods often do not adequately consider, thereby degrading the quality of image fusion. Summary of the Invention

[0004] The purpose of this invention is to provide an image fusion method and system to improve the problem in the prior art where the region to be fused cannot be accurately selected, which reduces the quality of image fusion.

[0005] In a first aspect, embodiments of this application provide an image fusion method, which includes the following steps:

[0006] Obtain the image to be fused and the target image;

[0007] The target image is subjected to multi-scale image enhancement processing to generate a preprocessed image;

[0008] The HED edge detection method is used to perform edge detection on the preprocessed image to generate multiple closed regions;

[0009] Calculate the entropy value of each closed region to generate multiple entropy values ​​for closed regions.

[0010] By filtering through multiple entropy values ​​of closed regions, the lowest entropy value of the closed region is obtained;

[0011] The images to be fused are merged into the closed region corresponding to the lowest entropy value of the closed region to generate the final fused image.

[0012] In the above implementation process, the image to be fused and the target image are acquired. Then, the target image undergoes multi-scale image enhancement processing to generate a preprocessed image. Multi-scale image enhancement processing allows for processing from multiple angles, making the generated preprocessed image clearer. Next, the HED edge detection method is used to detect edges in the preprocessed image, generating multiple closed regions. The HED edge detection method is a process of continuously integrating and learning during the output generation to obtain a more accurate edge prediction map, thus obtaining more accurate edges and making the closed regions clearer and more precise. Then, the region entropy value of each closed region is calculated to generate multiple closed region entropy values. Then, the multiple closed region entropy values ​​are filtered to obtain the lowest closed region entropy value, thereby determining the fusion region through the region entropy value, making the fusion region more accurate. Finally, the image to be fused is fused into the closed region corresponding to the lowest closed region entropy value to generate the final fused image, thereby improving the image fusion quality.

[0013] Based on the first aspect, in some embodiments of the present invention, the step of performing multi-scale image enhancement processing on the target image to generate a preprocessed image includes the following steps:

[0014] The target image is subjected to Gaussian blurring at multiple different scales to generate multiple blurred images.

[0015] Each blurred image is subtracted from the target image to generate multiple detail information;

[0016] Multiple details are weighted separately and applied to the target image to generate a preprocessed image.

[0017] Based on the first aspect, in some embodiments of the present invention, the step of calculating the entropy value of each closed region to generate multiple closed region entropy values ​​includes the following steps:

[0018] A grayscale algorithm is used to calculate the grayscale value of each pixel in each closed region;

[0019] Calculate the probability of each pixel's grayscale value falling within its corresponding closed region;

[0020] The entropy values ​​of multiple closed regions are generated by calculating the probability of each pixel's grayscale value in the corresponding closed region using the image entropy calculation formula.

[0021] Based on the first aspect, in some embodiments of the present invention, the above-mentioned image entropy calculation formula is as follows: in, Let H be the probability of each pixel's grayscale value falling within its corresponding closed region; and let H be the entropy value of the closed region. Based on the first aspect, in some embodiments of the present invention, the step of filtering multiple closed region entropy values ​​to obtain the lowest closed region entropy value includes the following steps:

[0022] Sort the entropy values ​​of each closed region according to their magnitude to obtain a list of entropy values ​​for the closed regions;

[0023] Extract the entropy value of the closed region from the list of entropy values ​​and use it as the lowest entropy value of the closed region.

[0024] Secondly, embodiments of this application provide an image fusion system, including:

[0025] The image acquisition module is used to acquire the image to be fused and the target image;

[0026] The preprocessing module is used to perform multi-scale image enhancement processing on the target image to generate a preprocessed image;

[0027] The edge detection module is used to perform edge detection on the preprocessed image using the HED edge detection method to generate multiple closed regions;

[0028] The entropy calculation module is used to calculate the entropy value of each closed region and generate multiple entropy values ​​for closed regions.

[0029] The filtering module is used to filter the entropy values ​​of multiple closed regions to obtain the lowest entropy value of the closed region.

[0030] The image fusion module is used to fuse the images to be fused into the closed region corresponding to the lowest entropy value of the closed region, generating the final fused image.

[0031] Based on the second aspect, in some embodiments of the present invention, the above-mentioned preprocessing module includes:

[0032] The blurring unit is used to perform Gaussian blurring on the target image at multiple different scales to generate multiple blurred images.

[0033] The detail generation unit is used to perform subtraction operations between each blurred image and the target image to generate multiple detail information;

[0034] The image enhancement unit is used to weight multiple details into the target image to generate a preprocessed image.

[0035] Based on the second aspect, in some embodiments of the present invention, the above-mentioned entropy calculation module includes:

[0036] The grayscale value calculation unit is used to calculate the grayscale value of each pixel in each closed region using a grayscale algorithm.

[0037] The grayscale probability calculation unit is used to calculate the probability of each pixel's grayscale value in the corresponding closed region;

[0038] The image entropy calculation unit is used to calculate and generate multiple entropy values ​​for closed regions based on the probability of each pixel's gray value in the corresponding closed region using the image entropy calculation formula.

[0039] In the above implementation process, the image acquisition module acquires the image to be fused and the target image; then, the preprocessing module performs multi-scale image enhancement processing on the target image to generate a preprocessed image. Multi-scale image enhancement processing can process from multiple angles, making the generated preprocessed image clearer; then, the edge detection module uses the HED edge detection method to perform edge detection on the preprocessed image, generating multiple closed regions. The HED edge detection method is a process of obtaining a more accurate edge prediction map through continuous integration and learning during the generation output, thus obtaining more accurate edges, and making the closed regions clearer and more accurate; then, the entropy calculation module calculates the region entropy value of each closed region, generating multiple closed region entropy values; then, the filtering module filters the multiple closed region entropy values ​​to obtain the lowest closed region entropy value, thereby determining the fusion region through the region entropy value, making the fusion region more accurate; finally, the image fusion module fuses the image to be fused into the closed region corresponding to the lowest closed region entropy value to generate the final fused image, thereby improving the image fusion quality.

[0040] Thirdly, embodiments of this application provide an electronic device including a memory for storing one or more programs; and a processor. When the one or more programs are executed by the processor, the methods described in any of the first aspects above are implemented.

[0041] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the methods described in any of the first aspects above.

[0042] The embodiments of the present invention have at least the following advantages or beneficial effects:

[0043] This invention provides an image fusion method and system. The method involves acquiring an image to be fused and a target image; then, performing multi-scale image enhancement processing on the target image to generate a preprocessed image. Multi-scale image enhancement processing allows for processing from multiple angles, resulting in a clearer preprocessed image. Next, the preprocessed image is edge-detected using the Heated Edge Detection (HED) method, generating multiple closed regions. The HED method involves continuous integration and learning during the output process to obtain a more accurate edge prediction map, thus yielding more precise edges and making the closed regions clearer and more accurate. Then, the entropy values ​​of each closed region are calculated, generating multiple closed region entropy values. These entropy values ​​are then filtered to obtain the lowest entropy value, which is used to determine the fusion region, making the fusion region more accurate. Finally, the image to be fused is fused into the closed region corresponding to the lowest entropy value, generating the final fused image, thereby improving the image fusion quality. Attached Figure Description

[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 A flowchart of an image fusion method provided in an embodiment of the present invention;

[0046] Figure 2 A structural block diagram of an image fusion system provided in an embodiment of the present invention;

[0047] Figure 3 This is a structural block diagram of an electronic device provided in an embodiment of the present invention.

[0048] Icons: 110 - Image acquisition module; 120 - Preprocessing module; 121 - Blur processing unit; 122 - Detail generation unit; 123 - Image enhancement unit; 130 - Edge detection module; 140 - Entropy calculation module; 141 - Grayscale value calculation unit; 142 - Grayscale value probability calculation unit; 143 - Image entropy calculation unit; 150 - Filtering module; 151 - Sorting unit; 152 - Region entropy extraction unit; 160 - Image fusion module; 101 - Memory; 102 - Processor; 103 - Communication interface. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0050] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application. Example

[0051] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the various embodiments and features described below can be combined with each other.

[0052] Please check Figure 1 , Figure 1 A flowchart of an image fusion method provided in an embodiment of the present invention. The image fusion method includes the following steps:

[0053] Step S110: Obtain the image to be fused and the target image; the image to be fused can be extracted from other images or it can be a complete image. The target image is the image that needs to be processed. For example, if image A needs to be fused into image B, then image A is the image to be fused, and image B is the target image.

[0054] Step S120: Perform multi-scale image enhancement processing on the target image to generate a preprocessed image. Enhancing the target image improves its contrast, facilitating image fusion. Multi-scale image enhancement allows for processing from multiple angles, resulting in a clearer preprocessed image. The multi-scale image enhancement process includes the following steps:

[0055] First, the target image is subjected to Gaussian blurring at multiple scales, generating multiple blurred images. These different scales can be set according to the actual situation, generally three different scales are used. Gaussian blurring is performed at each scale separately to obtain multiple blurred images. Applying Gaussian blurring to the image reduces image noise and detail, resulting in a more detailed image. Furthermore, performing Gaussian blurring at multiple scales reduces image noise and detail from multiple angles, facilitating subsequent image comparison. The Gaussian blurring technique described above is existing technology and will not be elaborated upon further. For example, after applying Gaussian blurring to target image A at three different scales, blurred images A1, A2, and A3 are obtained.

[0056] Then, each blurred image is subtracted from the target image to generate multiple detail information. This subtraction operation involves subtracting the target image from the resulting blurred image, thus obtaining multiple detail information. Subtraction identifies the differences between the blurred image and the target image; subtracting from multiple blurred images yields multiple detail information. Since these blurred images are obtained from blurring at multiple different scales, the resulting detail information reflects the differences from the target image at different scales. For example, if the resulting blurred images include blurred image A1, blurred image A2, and blurred image A3, and the target image is image A, subtracting image A from blurred image A1 yields detail information D1; subtracting image A from blurred image A2 yields detail information D2; and subtracting image A from blurred image A3 yields detail information D3.

[0057] Finally, multiple detail information elements are weighted and added to the target image to generate a preprocessed image. This weighting of detail information elements means adding each element to the target image according to its weight. These weights can be pre-set, and the weights of each detail information element can be the same or different. When all detail information elements have the same weight (i.e., each element has a weight of 1), they are directly added to the target image. When the weights are different, each detail information element is multiplied by its corresponding weight before being added to the target image. By weighting multiple detail information elements to the target image, the resulting preprocessed image contains more detail information than the target image, thus enhancing the target image. For example, if detail information elements D1, D2, and D3 all have the same weight, then after weighting D1, D2, and D3 into the target image A, the resulting preprocessed image is: Target Image A + Detail Information D1, D2, and D3. The weights of detail information D1, D2, and D3 are 0.5, 0.2, and 0.3, respectively. The preprocessed image is: target image A + detail information D1 × 0.5 + detail information D2 × 0.2 + detail information D3 × 0.3.

[0058] Step S130: Perform edge detection on the preprocessed image using the HED edge detection method to generate multiple closed regions. Edge detection refers to using the HED edge detection method to identify points with significant brightness changes in the digital image, and connecting these points divides the preprocessed image into multiple closed regions. The HED edge detection method involves continuous integration and learning during the output generation process to obtain a more accurate edge prediction map, thus resulting in more precise edges and clearer, more accurate closed regions. The HED edge detection method described above is existing technology and will not be elaborated further here.

[0059] Step S140: Calculate the region entropy value for each closed region to generate multiple closed region entropy values. The above region entropy value calculation refers to calculating the image entropy of each closed region separately. The larger the image entropy value, the clearer the image in that region. The process of calculating the region entropy value includes the following steps:

[0060] First, a grayscale algorithm is used to calculate the grayscale value of each pixel in each closed region. This calculation can be achieved by using a grayscale algorithm to determine the grayscale value of each pixel, dividing the white and black regions into several levels based on a logarithmic relationship; these are called "grayscale levels." The range is generally from 0 to 255. The grayscale value represents the brightness of each pixel. The grayscale algorithm described above is existing technology and can be calculated using existing software; therefore, it will not be elaborated upon further.

[0061] Then, the probability of each pixel's grayscale value appearing in its corresponding closed region is calculated. This calculation can be done by separately calculating the grayscale value of each pixel, then counting the number of times that grayscale value appears in the pixels within the closed region, and finally calculating the probability of that grayscale value within that closed region. Multiple pixel grayscale values ​​are calculated separately to obtain the probability of each pixel's grayscale value appearing in its corresponding closed region. This calculation process can be performed using probability statistics. For example, if closed region A1 contains 100 pixels, and 10 of them have a grayscale value of 99, then the probability of grayscale value 99 appearing in closed region A1 is 0.1. If closed region A2 contains 200 pixels, and 10 of them have a grayscale value of 99, then the probability of grayscale value 99 appearing in closed region A1 is 0.05.

[0062] Finally, based on the probability of each pixel's grayscale value within its corresponding closed region, the image entropy calculation formula is used to generate multiple closed region entropy values. The above calculation process involves substituting the probability of each pixel's grayscale value within each closed region into the image entropy calculation formula to obtain the entropy value for each closed region. The image entropy calculation formula is as follows: in, H represents the probability of each pixel's grayscale value falling within its corresponding closed region; H is the entropy value of the closed region.

[0063] Step S150: Filter the entropy values ​​of multiple closed regions to obtain the lowest entropy value of the closed region. This filtering involves comparing each pair of entropy values ​​of the multiple closed regions to find the one with the smallest entropy value. This filtering can be achieved through the following steps:

[0064] The first step is to sort the entropy values ​​of each closed region according to their magnitude, resulting in a list of entropy values ​​for the closed regions. This sorting can be done in ascending or descending order of entropy values. The resulting list of entropy values ​​for the closed regions is an entropy value list arranged in ascending or descending order.

[0065] The second step is to extract the entropy value of the closed region with the smallest entropy value from the list of entropy values ​​of the closed regions, and take it as the lowest entropy value of the closed region. For example, if the list of entropy values ​​of the closed regions is 0.2, 0.3, 0.4, 0.5, and 0.8, then the lowest entropy value of the closed region is 0.2.

[0066] Step S160: Fuse the image to be fused into the closed region corresponding to the lowest entropy value of the closed region to generate the final fused image. The fusion process described above refers to first finding the closed region corresponding to the lowest entropy value of the closed region, and then using image fusion technology to fuse the image to be fused into this closed region, thereby generating a new fused image as the final fused image. The image fusion technology described above is existing technology, therefore, it will not be elaborated further here. For example: Target image A includes closed regions E1, E2, E3, and E4, where the closed region corresponding to the lowest entropy value of the closed region is closed region E1. Then, the image to be fused is fused into closed region E1 to obtain the final fused image.

[0067] In the above implementation process, the image to be fused and the target image are acquired. Then, the target image undergoes multi-scale image enhancement processing to generate a preprocessed image. Multi-scale image enhancement processing allows for processing from multiple angles, making the generated preprocessed image clearer. Next, the HED edge detection method is used to detect edges in the preprocessed image, generating multiple closed regions. The HED edge detection method is a process of continuously integrating and learning during the output generation to obtain a more accurate edge prediction map, thus obtaining more accurate edges and making the closed regions clearer and more precise. Then, the region entropy value of each closed region is calculated to generate multiple closed region entropy values. Then, the multiple closed region entropy values ​​are filtered to obtain the lowest closed region entropy value, thereby determining the fusion region through the region entropy value, making the fusion region more accurate. Finally, the image to be fused is fused into the closed region corresponding to the lowest closed region entropy value to generate the final fused image, thereby improving the image fusion quality.

[0068] Based on the same inventive concept, this invention also proposes an image fusion system, please refer to... Figure 2 , Figure 2 A block diagram of an image fusion system provided in an embodiment of the present invention. The image fusion system includes:

[0069] Image acquisition module 110 is used to acquire the image to be fused and the target image;

[0070] Preprocessing module 120 is used to perform multi-scale image enhancement processing on the target image to generate a preprocessed image;

[0071] Edge detection module 130 is used to perform edge detection on the preprocessed image using the HED edge detection method to generate multiple closed regions;

[0072] Entropy calculation module 140 is used to calculate the entropy value of each closed region and generate multiple entropy values ​​of closed regions.

[0073] The filtering module 150 is used to filter the entropy values ​​of multiple closed regions to obtain the lowest entropy value of the closed region.

[0074] The image fusion module 160 is used to fuse the image to be fused into the closed region corresponding to the lowest entropy value of the closed region, and generate the final fused image.

[0075] In the above implementation process, the image acquisition module 110 acquires the image to be fused and the target image; then, the preprocessing module 120 performs multi-scale image enhancement processing on the target image to generate a preprocessed image. Multi-scale image enhancement processing can process from multiple angles, making the generated preprocessed image clearer; then, the edge detection module 130 uses the HED edge detection method to perform edge detection on the preprocessed image, generating multiple closed regions. The HED edge detection method is a process of obtaining a more accurate edge prediction map through continuous integration and learning during the output process, thus obtaining more accurate edges, and making the closed regions clearer and more accurate; then, the entropy calculation module 140 calculates the region entropy value of each closed region, generating multiple closed region entropy values; then, the filtering module 150 filters the multiple closed region entropy values ​​to obtain the lowest closed region entropy value, thereby determining the fusion region through the region entropy value, making the fusion region more accurate; finally, the image fusion module 160 fuses the image to be fused into the closed region corresponding to the lowest closed region entropy value to generate the final fused image, thereby improving the image fusion quality.

[0076] The preprocessing module 120 includes:

[0077] The blurring unit 121 is used to perform Gaussian blurring on the target image at multiple different scales to generate multiple blurred images.

[0078] The detail generation unit 122 is used to perform subtraction operations between each blurred image and the target image to generate multiple detail information;

[0079] The image enhancement unit 123 is used to weight multiple detail information into the target image to generate a preprocessed image.

[0080] The entropy calculation module 140 mentioned above includes:

[0081] The grayscale value calculation unit 141 is used to calculate the grayscale value of each pixel in each closed region using a grayscale algorithm.

[0082] The grayscale probability calculation unit 142 is used to calculate the probability of each pixel's grayscale value in the corresponding closed region;

[0083] Image entropy calculation unit 143 is used to calculate and generate multiple entropy values ​​of closed regions based on the probability of each pixel gray value in the corresponding closed region using the image entropy calculation formula.

[0084] The filtering module 150 includes:

[0085] The sorting unit 151 is used to sort the entropy values ​​of each closed region according to their entropy values ​​to obtain a list of entropy values ​​of the closed regions.

[0086] The region entropy extraction unit 152 is used to extract the entropy value of the closed region with the smallest entropy value from the list of closed region entropy values ​​as the lowest closed region entropy value.

[0087] Please see Figure 3 , Figure 3 This is a schematic structural block diagram of an electronic device provided in an embodiment of this application. The electronic device includes a memory 101, a processor 102, and a communication interface 103. The memory 101, processor 102, and communication interface 103 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The memory 101 can be used to store software programs and modules, such as the program instructions / modules corresponding to the image fusion system provided in an embodiment of this application. The processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 101. The communication interface 103 can be used to communicate with other node devices for signaling or data.

[0088] The memory 101 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0089] The processor 102 can be an integrated circuit chip with signal processing capabilities. The processor 102 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0090] Understandable. Figure 3 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 3 The more or fewer components shown, or having the same Figure 3 The different configurations shown. Figure 3 The components shown can be implemented using hardware, software, or a combination thereof.

[0091] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can also be implemented in other ways. The system embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0092] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0093] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0094] In summary, the image fusion method and system provided in this application involves acquiring an image to be fused and a target image; then, performing multi-scale image enhancement processing on the target image to generate a preprocessed image. Multi-scale image enhancement processing allows for processing from multiple angles, resulting in a clearer preprocessed image. Next, the HED edge detection method is used to detect edges in the preprocessed image, generating multiple closed regions. The HED edge detection method involves continuous integration and learning during the output process to obtain a more accurate edge prediction map, thus yielding more precise edges and making the closed regions clearer and more accurate. Then, region entropy values ​​are calculated for each closed region, generating multiple closed region entropy values. These entropy values ​​are then filtered to obtain the lowest entropy value, which is used to determine the fusion region, making the fusion region more accurate. Finally, the image to be fused is fused into the closed region corresponding to the lowest entropy value, generating the final fused image, thereby improving the image fusion quality.

[0095] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

[0096] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within this application. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. An image fusion method, characterized by, Includes the following steps: Obtain the image to be fused and the target image; The target image is subjected to multi-scale image enhancement processing to generate a preprocessed image; The HED edge detection method is used to perform edge detection on the preprocessed image to generate multiple closed regions; Calculate the entropy value of each closed region to generate multiple entropy values ​​for closed regions. By filtering through multiple entropy values ​​of closed regions, the lowest entropy value of the closed region is obtained; The images to be fused are merged into the closed region corresponding to the lowest entropy value of the closed region to generate the final fused image; The step of performing multi-scale image enhancement processing on the target image to generate a preprocessed image includes the following steps: The target image is subjected to Gaussian blurring at multiple different scales to generate multiple blurred images. Each blurred image is subtracted from the target image to generate multiple detail information; Multiple details are weighted separately and applied to the target image to generate a preprocessed image; The step of calculating the entropy value of each closed region to generate multiple closed region entropy values ​​includes the following steps: A grayscale algorithm is used to calculate the grayscale value of each pixel in each closed region; Calculate the probability of each pixel's grayscale value falling within its corresponding closed region; The entropy values ​​of multiple closed regions are generated by calculating the probability of each pixel's gray value in the corresponding closed region using the image entropy calculation formula. The image entropy calculation formula is: Wherein, The probability of each pixel gray value in the corresponding closed region; H is the closed region entropy value; The step of screening the plurality of closed region entropy values to obtain the lowest closed region entropy value comprises the following steps: Sort the entropy values ​​of each closed region according to their magnitude to obtain a list of entropy values ​​for the closed regions; Extract the entropy value of the closed region from the list of entropy values ​​and use it as the lowest entropy value of the closed region.

2. An image fusion system, characterized in that, include: The image acquisition module is used to acquire the image to be fused and the target image; The preprocessing module is used to perform multi-scale image enhancement processing on the target image to generate a preprocessed image; The edge detection module is used to perform edge detection on the preprocessed image using the HED edge detection method to generate multiple closed regions; The entropy calculation module is used to calculate the entropy value of each closed region and generate multiple entropy values ​​for closed regions. The filtering module is used to filter the entropy values ​​of multiple closed regions to obtain the lowest entropy value of the closed region. The image fusion module is used to fuse the images to be fused into the closed region corresponding to the lowest entropy value of the closed region, and generate the final fused image. The step of performing multi-scale image enhancement processing on the target image to generate a preprocessed image includes: The target image is subjected to Gaussian blurring at multiple different scales to generate multiple blurred images. Each blurred image is subtracted from the target image to generate multiple detail information; Multiple details are weighted separately and applied to the target image to generate a preprocessed image; The step of calculating the entropy value of each closed region to generate multiple closed region entropy values ​​includes: A grayscale algorithm is used to calculate the grayscale value of each pixel in each closed region; Calculate the probability of each pixel's grayscale value falling within its corresponding closed region; The entropy values ​​of multiple closed regions are generated by calculating the probability of each pixel's gray value in the corresponding closed region using the image entropy calculation formula. The formula for calculating image entropy is: in, H represents the probability of each pixel's grayscale value falling within its corresponding closed region; H is the entropy value of the closed region. The process of filtering multiple closed region entropy values ​​to obtain the lowest closed region entropy value includes the following steps: Sort the entropy values ​​of each closed region according to their magnitude to obtain a list of entropy values ​​for the closed regions; Extract the entropy value of the closed region from the list of entropy values ​​and use it as the lowest entropy value of the closed region.

3. An electronic device, characterized in that, include: Memory, used to store one or more programs; processor; When the one or more programs are executed by the processor, the method of claim 1 is implemented.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method as described in claim 1.