Method, system, electronic device and storage medium for dual-light image fusion

By using a hardware acceleration unit on a microcontroller for image preprocessing and fusion calculations, the problems of complex calculations and high costs in the existing technology are solved, low-cost and real-time image fusion is achieved, and the application of dual-light fusion functions is expanded.

CN114882327BActive Publication Date: 2025-10-03WUHAN GAODE CHUANGSEN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210272068.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-18
Publication Date
2025-10-03
Estimated Expiration
2042-03-18

AI Technical Summary

Technical Problem

The existing dual-light fusion algorithm is computationally complex, requires large amounts of computation, and occupies a lot of hardware resources, resulting in high costs and limiting the application expansion of this function in the market.

Method used

The system uses a microcontroller as the hardware platform, paired with a single infrared imaging module and an onboard visible light module, and utilizes the hardware acceleration unit in the MCU chip to perform image preprocessing and fusion calculations, reducing the CPU computing workload and improving computing efficiency.

Benefits of technology

It realizes real-time image fusion on a low-cost microcontroller, reduces the cost and power consumption of terminal accessories, and expands the application scope of the dual-light fusion function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114882327B_ABST
    Figure CN114882327B_ABST
Patent Text Reader

Abstract

This application provides a method, system, electronic device, and storage medium for dual-light image fusion, including: obtaining raw image data through an infrared imaging module and an onboard visible light module, wherein the raw image data includes: a visible light grayscale image and an infrared grayscale image; utilizing a hardware acceleration unit in an MCU chip to assist in calculations, and performing image fusion on the raw image data according to a preset dual-light fusion algorithm and fusion parameters. This method not only reduces the amount of CPU computation but also improves the efficiency of the fusion calculation. A method for calculating the dual-light image fusion coefficient is proposed. This method is simple to calculate, has a small amount of computation, and is suitable for most MCU chips and other embedded platforms.
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, and in particular to a method, system, electronic device, and storage medium for dual-light image fusion. Background Art

[0002] Infrared images can reflect the thermal radiation of objects. Due to their high cost, the resolution of infrared thermal imagers equipped with microcontrollers is generally low. Low-resolution infrared images can only reflect the regional information of the object and cannot clearly distinguish the boundaries of the object, making it difficult for the human eye to identify which object the imaging target is. Therefore, the dual-light image fusion method is used to clearly distinguish the thermal distribution of each object.

[0003] The industry's common dual-optical fusion algorithm is computationally complex, requires a large amount of computation, and consumes a lot of hardware resources, increasing the cost and power consumption of terminal components. Therefore, dual-optical fusion is currently only available on high-end devices. This is limited by product pricing, significantly limiting its market application and expansion. Summary of the Invention

[0004] The main purpose of the embodiments of the present invention is to provide a method, system, electronic device and storage medium for dual-light image fusion, which performs fusion calculations through a hardware acceleration unit, thereby not only reducing the computational workload of the CPU in the MCU chip, but also improving the computational efficiency of image fusion.

[0005] In a first aspect, a method for bi-optical image fusion is provided, the method comprising:

[0006] Obtaining raw image data through an infrared imaging module and an onboard visible light module, wherein the raw image data includes: a visible light grayscale image and an infrared grayscale image;

[0007] Processing the raw image data using a hardware acceleration unit in the MCU chip;

[0008] Image fusion is performed on the processed original image data according to a preset dual-light fusion algorithm and fusion parameters.

[0009] In one possible implementation, processing the raw image data using a hardware acceleration unit in an MCU chip includes:

[0010] Performing a first preprocessing on the visible light image to obtain a visible light grayscale image, wherein the first preprocessing includes: image rotation processing, image magnification processing, and image grayscale processing; and

[0011] The infrared image is subjected to a second preprocessing to obtain an infrared grayscale image, wherein the second preprocessing includes: image rotation processing, light adjustment processing, and image grayscale processing.

[0012] In another possible implementation, performing image fusion on the original image data according to a preset dual-light fusion algorithm and fusion parameters includes:

[0013] Filtering the visible light grayscale image using a preset filtering template to obtain a smooth visible light grayscale image;

[0014] Set the fusion coefficient detail according to the historical edge grayscale image array and the preset grayscale-color comparison table;

[0015] Acquire a visible light edge grayscale image according to a preset edge grayscale formula, the fusion coefficient, the visible light grayscale image, and the smoothed visible light grayscale image;

[0016] fusing the infrared grayscale image and the visible light edge grayscale image using the dual-light fusion algorithm to obtain a fused grayscale image;

[0017] The fused grayscale image is converted into a color image by looking up the grayscale-color comparison table.

[0018] In another possible implementation, setting the fusion coefficient detail according to the historical edge grayscale image array and a preset grayscale-color comparison table includes:

[0019] Obtain the average RGB value of the color corresponding to the grayscale according to the grayscale-color comparison table and the average color formula;

[0020] The fusion coefficient is obtained according to the historical edge grayscale image array, the color average RGB value and a preset fusion coefficient formula.

[0021] In a second aspect, a system for dual-light image fusion is provided, the system comprising:

[0022] The raw image data acquisition module is used to acquire raw image data through the infrared imaging module and the onboard visible light module. The raw image data includes: visible light grayscale image and infrared grayscale image; and the raw image data is processed by the hardware acceleration unit in the MCU chip;

[0023] The fusion module is used to perform image fusion on the original image data according to a preset dual-light fusion algorithm and fusion parameters.

[0024] In one possible implementation, the original image data acquisition module includes:

[0025] A first preprocessing unit is configured to perform a first preprocessing on the visible light image to obtain a visible light grayscale image, wherein the first preprocessing includes: image rotation processing, image magnification processing, and image grayscale processing;

[0026] The second preprocessing unit is used to perform a second preprocessing on the infrared image to obtain an infrared grayscale image, wherein the second preprocessing includes: image rotation processing, light adjustment processing, and image grayscale processing.

[0027] In another possible implementation, the fusion module includes:

[0028] a smoothed visible light grayscale image acquisition unit, configured to filter the visible light grayscale image using a preset filtering template to acquire a smoothed visible light grayscale image;

[0029] A fusion coefficient setting unit is used to set the fusion coefficient detail according to the historical edge grayscale image array and the preset grayscale-color comparison table;

[0030] An edge grayscale image acquisition unit, configured to acquire a visible light edge grayscale image according to a preset edge grayscale formula, the fusion coefficient, the visible light grayscale image, and the smoothed visible light grayscale image;

[0031] a fused grayscale image acquisition unit, configured to fuse the infrared grayscale image and the visible light edge grayscale image using the dual-light fusion algorithm to acquire a fused grayscale image;

[0032] The conversion unit is used to convert the fused grayscale image into a color image by looking up the grayscale-color comparison table.

[0033] In another possible implementation, the fusion coefficient setting unit includes:

[0034] A color average RGB value acquisition unit is used to acquire the color average RGB value corresponding to the grayscale according to the grayscale-color comparison table and the average color formula;

[0035] The fusion coefficient acquisition unit is used to obtain the fusion coefficient according to the historical edge grayscale image array, the color average RGB value and a preset fusion coefficient formula.

[0036] In a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for dual-light image fusion as provided in the first aspect is implemented.

[0037] In a fourth aspect, a non-transitory computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for bi-optical image fusion provided in the first aspect is implemented.

[0038] Unlike existing technologies, the method of this application uses a microcontroller as the hardware platform for algorithm implementation, paired with a single infrared imaging module and an onboard visible light module, to achieve dual-light fusion within a fixed distance range. Furthermore, the hardware acceleration unit assists in reducing CPU computational effort and ensuring real-time performance. This method can be applied to low-cost microcontrollers, achieving real-time processing capabilities and enabling widespread application of this function on low-end devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments of the present application.

[0040] Figure 1 A flowchart of a method for bi-optical image fusion provided by one embodiment of the present invention;

[0041] Figure 2 A flowchart of a method for bi-optical image fusion provided by another embodiment of the present invention;

[0042] Figure 3 A flowchart of a method for bi-optical image fusion provided in yet another embodiment of the present invention;

[0043] Figure 4 A structural diagram of a system for bi-optical image fusion provided by one embodiment of the present invention;

[0044] Figure 5 A structural diagram of a system for bi-optical image fusion provided by another embodiment of the present invention;

[0045] Figure 6 A structural diagram of a system for bi-optical image fusion provided in yet another embodiment of the present invention;

[0046] Figure 7 A structural diagram of a system for bi-optical image fusion provided in yet another embodiment of the present invention;

[0047] Figure 8 The figure is a schematic diagram of the physical structure of an electronic device of the present invention.

[0048] Specific implementation method

[0049] The following describes embodiments of the present application in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar modules or modules having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and are not to be construed as limiting the present invention.

[0050] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of this application refers to the presence of the features, integers, steps, operations, modules and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, modules, components and / or groups thereof. It should be understood that when we refer to a module as being "connected" or "coupled" to another module, it may be directly connected or coupled to the other module, or there may be an intermediate module. In addition, "connected" or "coupled" as used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any modules and all combinations of one or more associated listed items.

[0051] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation of this application will be further described in detail below with reference to the accompanying drawings.

[0052] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0053] In actual application scenarios, the fusion algorithm can be directly applied to low-cost microcontrollers to reduce the cost and power consumption of terminal accessories. However, this method is difficult to achieve real-time computing and processing effects. Real-time computing can be achieved by increasing the frame rate. However, after increasing the frame rate, the support of a higher-performance chip platform is required, which will still increase the manufacturing cost of the product.

[0054] In order to take into account real-time performance, low cost, and low power consumption, this embodiment provides a dual-light image fusion method, which is described below for details.

[0055] like Figure 1 FIG2 is a flow chart of a method for bi-optical image fusion provided by an embodiment of the present invention, wherein the method includes:

[0056] Step 101: acquiring raw image data through an infrared imaging module and an onboard visible light module, wherein the raw image data includes: a visible light grayscale image and an infrared grayscale image;

[0057] Step 102: Process the original image data using the hardware acceleration unit in the MCU chip; and perform image fusion on the original image data according to a preset dual-light fusion algorithm and fusion parameters.

[0058] In the embodiment of the present invention, the hardware acceleration unit is a hardware acceleration module built into the MCU chip device. The hardware acceleration unit assists in computing, thereby reducing the CPU computation workload and ensuring data real-time performance. The hardware acceleration unit may be a PXP computing unit.

[0059] The method of obtaining raw image data through the infrared imaging module and the onboard visible light module includes:

[0060] Performing a first preprocessing on the visible light image to obtain a visible light grayscale image, wherein the first preprocessing includes: image rotation processing, image magnification processing, and image grayscale processing; and

[0061] The infrared image is subjected to a second preprocessing to obtain an infrared grayscale image, wherein the second preprocessing includes: image rotation processing, light adjustment processing, and image grayscale processing.

[0062] In an optional embodiment, the visible light image can be an RGB565 image, and the ARM PXP computing unit is used to rotate and enlarge the visible light image, and then the ARM PXP computing unit is used to convert the visible light image format to convert the visible light image in RGB565 format into a visible light grayscale image in Y8 format.

[0063] In an optional embodiment, the infrared image can be a Y16 image, and the ARM PXP computing unit is used to rotate and enlarge the infrared image, and the rotated and enlarged image is dimmed, and then the ARM PXP computing unit is used to convert the infrared image format, and the visible light image in Y16 format is converted into an infrared grayscale image in Y8 format.

[0064] In this embodiment, the image rotation, magnification, and color conversion are implemented using the PXP hardware acceleration unit within the chip, which can greatly reduce the amount of CPU computation and shorten the algorithm execution time.

[0065] In an embodiment of the present invention, the visible light imaging module in the MCU device can generate visible light images, and the infrared imaging module can generate infrared images. Different preprocessing methods are used to generate visible light images and infrared images, respectively, to obtain corresponding visible light grayscale images and infrared grayscale images. The visible light image undergoes a first preprocessing process, which includes image rotation, image magnification, and image grayscale processing; the infrared image undergoes a second preprocessing process, which includes image rotation, light adjustment, and image grayscale processing.

[0066] In this embodiment of the present invention, an infrared imaging module and an onboard visible light module are used to acquire raw image data, including visible light grayscale images and infrared light grayscale images. The hardware acceleration unit in the MCU chip assists in the calculation, and the raw image data is fused according to a preset dual-light fusion algorithm and fusion parameters. Using the hardware acceleration unit for fusion calculations not only reduces the computational workload of the MCU chip's CPU but also improves the efficiency of the fusion calculation.

[0067] like Figure 2 FIG. 1 is a flow chart of a method for dual-light image fusion provided by another embodiment of the present application, wherein the method utilizes a hardware acceleration unit in an MCU chip to assist in calculations and performs image fusion on the original image data according to a preset dual-light fusion algorithm and fusion parameters, including:

[0068] Step 201: filtering the visible light grayscale image using a preset filtering template to obtain a smoothed visible light grayscale image;

[0069] Step 202, setting the fusion coefficient detail according to the historical edge grayscale image array and the preset grayscale-color comparison table;

[0070] Step 203: Obtain a visible light edge grayscale image according to a preset edge grayscale formula, the fusion coefficient, the visible light grayscale image, and the smoothed visible light grayscale image. The edge grayscale formula is:

[0071] Wherein, width represents the width of the visible light grayscale image, height represents the height of the visible light grayscale image, m and n represent the index of the window, i and j represent the index of the current image, vis represents visible light, and vis[i][j] represents the visible light grayscale image. Represents a smooth visible light grayscale image;

[0072] Step 204: fuse the infrared grayscale image and the visible light edge grayscale image using the dual-light fusion algorithm to obtain a fused grayscale image. The dual-light fusion algorithm is: des Im age[i][j]=IR_Im age[i][j]+VisEdge[i][j], i∈[0,width),j∈(0,height]);

[0073] Step 205: Convert the fused grayscale image into a color image by looking up the grayscale-color comparison table.

[0074] In the embodiments of the present invention, the filter template can be configured based on actual needs. A common filter template is a 3*3 filter template. The historical edge grayscale image array is a set of arrays calculated based on historical statistics. The colors corresponding to grayscale are also fixed, typically with one grayscale corresponding to multiple fixed colors. Grayscale-color mapping tables are well-known techniques and will not be described in detail here.

[0075] In actual application scenarios, during the image fusion process, if the fusion coefficient detail is too small, visible light edge details will be weakened, resulting in unclear edge information in the fused image. If the fusion coefficient detail is too large, the noise information in the visible light image will be greatly amplified, resulting in a noisy fused image and poor image quality. To solve this problem, the fusion coefficient detail value can be set according to the color band set by the user. The specific setting method is described below.

[0076] like Figure 3 FIG. 1 is a flow chart of a method for bi-optical image fusion according to another embodiment of the present invention, wherein the method of setting the fusion coefficient detail according to the historical edge grayscale image array and the preset grayscale-color comparison table includes:

[0077] Step 301: Obtain the average RGB value of the color corresponding to the grayscale according to the grayscale-color comparison table and the average color formula. The average color formula is:

[0078] Among them, the values ​​of R, G, and B in the above formula depend on the color band information set by the user. Specifically, the color band information set by the user is obtained, mapped based on the grayscale-color comparison table, and the values ​​of R, G, and B corresponding to the color band information are determined, and then the average RGB value of the color corresponding to the grayscale is obtained according to the average color formula.

[0079] Step 302: Obtain a fusion coefficient based on the historical edge grayscale image array, the color average RGB value, and a preset fusion coefficient formula. The fusion coefficient formula is:

[0080] Among them, VisHist[i] is the historical edge grayscale image array, and threshold is a constant with a default value of 10.

[0081] In this embodiment, the color band set by the user is obtained, and a reasonable fusion coefficient detail is set according to the color band set by the user to avoid excessive noise in the fused image while ensuring that the fused image has clear edge information.

[0082] Unlike existing technologies, this embodiment uses a microcontroller as the hardware platform for algorithm implementation, paired with a single infrared imaging module and an onboard visible light module, achieving dual-light fusion within a fixed distance range. Simultaneously, dual-light fusion utilizes the high-frequency and color information of visible light and the thermal information of infrared images, resulting in high-quality dual-light fusion images in a variety of colors. This method can be applied to low-cost microcontrollers, achieving real-time processing capabilities, enabling widespread application of this function on low-end devices.

[0083] like Figure 4 FIG. 1 is a structural diagram of a system for bi-optical image fusion according to an embodiment of the present invention, wherein the system includes:

[0084] The original image data acquisition module 401 is used to acquire original image data through the infrared imaging module and the onboard visible light module. The original image data includes: visible light grayscale image and infrared grayscale image.

[0085] The fusion module 402 is configured to process the original image data using a hardware acceleration unit in the MCU chip; and perform image fusion on the original image data according to a preset dual-light fusion algorithm and fusion parameters.

[0086] In an embodiment of the present invention, the hardware acceleration unit is a hardware acceleration module built into the device of the MCU chip. Through the calculation of the hardware acceleration unit, the fusion data can be obtained quickly and accurately while reducing the CPU calculation amount, and subsequent image fusion processing can be performed.

[0087] In this embodiment of the present invention, an infrared imaging module and an onboard visible light module are used to acquire raw image data, including visible light grayscale images and infrared light grayscale images. The hardware acceleration unit in the MCU chip assists in the calculation, and the raw image data is fused according to a preset dual-light fusion algorithm and fusion parameters. Using the hardware acceleration unit for fusion calculations not only reduces the computational workload of the MCU chip's CPU but also improves the efficiency of the fusion calculation.

[0088] like Figure 5 FIG. 4 is a structural diagram of a system for bi-optical image fusion according to another embodiment of the present invention. The original image data acquisition module 401 includes:

[0089] A first preprocessing unit 501 is configured to perform a first preprocessing on the visible light image to obtain a visible light grayscale image, wherein the first preprocessing includes: image rotation processing, image magnification processing, and image grayscale processing;

[0090] The second preprocessing unit 502 is used to perform a second preprocessing on the infrared image to obtain an infrared grayscale image. The second preprocessing includes: image rotation processing, light adjustment processing, and image grayscale processing.

[0091] In an embodiment of the present invention, the visible light imaging module in the MCU device can generate visible light images, and the infrared imaging module can generate infrared images. Different preprocessing methods are used to generate visible light images and infrared images, respectively, to obtain corresponding visible light grayscale images and infrared grayscale images. Among them, the visible light image is subjected to a first preprocessing, and the first preprocessing includes: image rotation processing, image magnification processing, and image grayscale processing; the infrared image is subjected to a second preprocessing, and the second preprocessing includes: image rotation processing, dimming processing, and image grayscale processing. The specific rotation processing, magnification processing, dimming processing, and grayscale processing all use existing technologies, which are not limited in this application and will not be described in detail here.

[0092] like Figure 6 FIG. 4 is a structural diagram of a system for bi-optical image fusion according to another embodiment of the present invention. The fusion module 402 includes:

[0093] a smoothed visible light grayscale image acquisition unit 601, configured to filter the visible light grayscale image using a preset filtering template to acquire a smoothed visible light grayscale image;

[0094] A fusion coefficient setting unit 602 is used to set a fusion coefficient detail according to the historical edge grayscale image array and a preset grayscale-color comparison table;

[0095] The edge grayscale image acquisition unit 603 is configured to acquire a visible light edge grayscale image according to a preset edge grayscale formula, the fusion coefficient, the visible light grayscale image, and the smoothed visible light grayscale image. The edge grayscale formula is:

[0096] Wherein width represents the width of the visible light grayscale image, and height represents the height of the visible light grayscale image;

[0097] The fused grayscale image acquisition unit 604 is configured to fuse the infrared grayscale image and the visible light edge grayscale image using the dual-light fusion algorithm to acquire a fused grayscale image. The dual-light fusion algorithm is: des Im age[i][j]=IR-Im age[i][j]+VisEdge[i][j], i∈[0, width), j∈(0, height]);

[0098] The conversion unit 605 is configured to convert the fused grayscale image into a color image by looking up the grayscale-color comparison table.

[0099] In the embodiments of the present invention, the filter template can be configured based on actual needs. A common filter template is a 3*3 filter template. The historical edge grayscale image array is a set of arrays calculated based on historical statistics. The colors corresponding to grayscale are also fixed, typically with one grayscale corresponding to multiple fixed colors. Grayscale-color mapping tables are well-known techniques and will not be described in detail here.

[0100] like Figure 7 FIG. 6 is a structural diagram of a system for bi-optical image fusion according to another embodiment of the present invention. The fusion coefficient setting unit 602 includes:

[0101] The color average RGB value acquisition unit 701 is used to obtain the color average RGB value corresponding to the grayscale according to the grayscale-color comparison table and the average color formula. The average color formula is:

[0102]

[0103] The fusion coefficient acquisition unit 702 is used to obtain the fusion coefficient according to the historical edge grayscale image array, the color average RGB value and a preset fusion coefficient formula. The fusion coefficient formula is:

[0104] Among them, VisHist[i] is the historical edge grayscale image array, and threshold is a constant with a default value of 10.

[0105] Figure 8 An example of a physical structure diagram of an electronic device is shown below. Figure 7 As shown, the electronic device may include: a processor (processor) 801, a communications interface (Communications Interface) 802, a memory (memory) 803, and a communication bus 804, wherein the processor, communications interface, and memory communicate with each other via the communication bus. The processor may call logic instructions in the memory to execute a method for dual-light image fusion, which includes: obtaining fusion data through a hardware acceleration unit in the MCU chip, the fusion data including: a visible light grayscale image and an infrared grayscale image; and performing image fusion based on a preset dual-light fusion algorithm and the fusion data through the hardware acceleration unit in the MCU chip. The electronic device may be an infrared temperature measurement device, a gun sight device, etc.

[0106] In addition, the logical instructions in the above-mentioned memory can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0107] On the other hand, an embodiment of the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the method of dual-light image fusion provided by the above-mentioned method embodiments, the method including: obtaining fusion data through a hardware acceleration unit in an MCU chip, the fusion data including: a visible light grayscale image and an infrared grayscale image; performing image fusion according to a preset dual-light fusion algorithm and fusion data through the hardware acceleration unit in the MCU chip.

[0108] On the other hand, an embodiment of the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for dual-light image fusion provided in the above embodiments is implemented, the method comprising: obtaining fusion data through a hardware acceleration unit in an MCU chip, the fusion data comprising: a visible light grayscale image and an infrared grayscale image; and performing image fusion according to a preset dual-light fusion algorithm and the fusion data through the hardware acceleration unit in the MCU chip.

[0109] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0110] The above is only a partial implementation of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for bi-optical image fusion, characterized in that: The method includes: acquiring raw image data through an infrared imaging module and an onboard visible light module, the raw image data including a visible light grayscale image and an infrared grayscale image; processing the raw image data using a hardware acceleration unit in an MCU chip; and performing image fusion on the processed raw image data according to a preset dual-light fusion algorithm and fusion parameters; The image fusion is performed on the processed original image data according to a preset dual-light fusion algorithm and fusion parameters, including: filtering the visible light grayscale image through a preset filtering template to obtain a smoothed visible light grayscale image; setting a fusion coefficient detail according to a historical edge grayscale image array and a preset grayscale-color comparison table; obtaining a visible light edge grayscale image according to a preset edge grayscale formula, the fusion coefficient detail, the visible light grayscale image, and the smoothed visible light grayscale image; fusing the infrared grayscale image and the visible light edge grayscale image through the dual-light fusion algorithm to obtain a fused grayscale image; and converting the fused grayscale image into a color image by searching the grayscale-color comparison table.

2. The method according to claim 1, wherein The processing of the raw image data using the hardware acceleration unit in the MCU chip includes: performing a first preprocessing on the visible light image to obtain a visible light grayscale image, wherein the first preprocessing includes: image rotation processing, image magnification processing, and image grayscale processing; and performing a second preprocessing on the infrared image to obtain an infrared grayscale image, wherein the second preprocessing includes: image rotation processing, dimming processing, and image grayscale processing.

3. The method according to claim 1, wherein The step of setting the fusion coefficient detail according to the historical edge grayscale image array and the preset grayscale-color comparison table includes: obtaining the color average RGB value corresponding to the grayscale according to the grayscale-color comparison table and the average color formula; and obtaining the fusion coefficient according to the historical edge grayscale image array, the color average RGB value and the preset fusion coefficient formula.

4. A system for dual-light image fusion, characterized in that: The system includes: a raw image data acquisition module, which is used to acquire raw image data through an infrared imaging module and an onboard visible light module, and the raw image data includes: a visible light grayscale image and an infrared grayscale image; and uses a hardware acceleration unit in an MCU chip to process the raw image data; a fusion module, which is used to perform image fusion on the processed raw image data according to a preset dual-light fusion algorithm and fusion parameters; The fusion module includes: a smoothed visible light grayscale image acquisition unit, used to filter the visible light grayscale image through a preset filtering template to obtain a smoothed visible light grayscale image; a fusion coefficient setting unit, used to set the fusion coefficient detail according to the historical edge grayscale image array and the preset grayscale-color comparison table; an edge grayscale image acquisition unit, used to obtain a visible light edge grayscale image according to a preset edge grayscale formula, the fusion coefficient, the visible light grayscale image and the smoothed visible light grayscale image; a fused grayscale image acquisition unit, used to fuse the infrared grayscale image and the visible light edge grayscale image through the dual-light fusion algorithm to obtain a fused grayscale image; and a conversion unit, used to convert the fused grayscale image into a color image by searching the grayscale-color comparison table.

5. The system according to claim 4, wherein: The raw image data acquisition module includes: a first preprocessing unit, used to perform a first preprocessing on the visible light image to obtain a visible light grayscale image, wherein the first preprocessing includes: image rotation processing, image magnification processing, and image grayscale processing; a second preprocessing unit, used to perform a second preprocessing on the infrared image to obtain an infrared grayscale image, wherein the second preprocessing includes: image rotation processing, light adjustment processing, and image grayscale processing.

6. The system according to claim 4, wherein: The fusion coefficient setting unit includes: a color average RGB value acquisition unit, which is used to obtain the color average RGB value corresponding to the grayscale according to the grayscale-color comparison table and the average color formula; and a fusion coefficient acquisition unit, which is used to obtain the fusion coefficient according to the historical edge grayscale image array, the color average RGB value and a preset fusion coefficient formula.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for bi-optical image fusion according to any one of claims 1 to 3 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for bi-optical image fusion according to any one of claims 1 to 3 is implemented.