Image fusion method, device and computer readable storage medium
Patent Information
- Application Number
- CN202010567733.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-19
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-10-15
AI Technical Summary
During the fusion process of infrared images and visible light images, the existing technology only uses the contour and edge information of the visible light images, and cannot fully extract all the effective information of the two, resulting in poor quality of the fused image and failure to meet user needs.
By acquiring the infrared image and the visible light image of the same target, determine the coordinate mapping relationship between the two, convert them into the same coordinate system, and extract the pseudo-color image of the infrared image and the brightness component information of the visible light image respectively. Based on this information, under the target type color space Calculate the fused color image.
It is possible to fully extract all effective information from infrared and visible light images and fuse the two images, retain the overall information and color information of the image, and improve the quality and detail analysis capabilities of the fused image.
Smart Images

Figure CN111738970B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image fusion method, device and computer-readable storage medium. Background Art
[0002] Infrared images and visible light are two very practical image types that are widely used in all walks of life. According to the blackbody radiation theory, any object with a temperature above absolute zero will radiate electromagnetic waves. The main component of electromagnetic waves radiated by most objects in nature is infrared rays, which have a wavelength higher than visible light and cannot be directly observed by the human eye. Infrared detectors are special instruments that can receive and "sense" infrared rays. Infrared thermal imagers developed based on infrared detectors can display the infrared information radiated by objects in the form of images, which are so-called infrared images. Because infrared images reflect the energy information actively radiated outward by objects, they can work normally regardless of day or night, sunny or rainy and foggy days, and the external environment has little impact on them. Visible light images can be photos or videos taken by mobile phones, cameras, etc. Visible light is the part of the electromagnetic spectrum that can be perceived by the human eye. Visible light images generally contain rich details and texture information of objects, which are easier for humans and machines to understand and analyze.
[0003] It is understandable that most objects in nature cannot actively "shine". For these objects, visible light images capture the light reflected by them, so the image quality is greatly affected by lighting. Too bright or too dark environments will seriously affect the image quality and details. For example, photos or videos taken under strong sunlight or at night without lighting conditions are generally not very good. However, since the energy radiated by an object is almost the same as the object itself, infrared images generally cannot obtain information such as texture details on the surface of the object. In addition, due to the limitations of infrared wavelength and manufacturing process, the pixel size of infrared detectors is larger than that of visible light, and its image resolution or image pixel number is not as high as that of visible light images, which further increases the difficulty of infrared images to capture object details. The lack of image texture detail information will bring difficulties to further quality and detail analysis of the image. It can be seen that infrared images and visible light images have their own advantages and disadvantages, and provide complementary information about objects or scenes. Using an infrared camera and a visible light camera to observe a scene or object at the same time can provide a more comprehensive understanding of its characteristics under a wider range of environmental conditions. In practical applications, if infrared and visible light images are displayed separately, it will cause a waste of display resources such as the need for two monitors or reduce the display quality of the image such as the need to divide a monitor into two parts. This has prompted the birth of image fusion technology that merges infrared images and visible light images into one image.
[0004] In the process of fusing infrared images and visible light images, the related technology usually resamples the infrared and visible light images respectively, and then fuses the infrared and visible light images based on the contour and edge information of the extracted visible light image. However, only using the contour / edge information in the visible light image and other high-frequency information cannot contain all the effective information of the image. The fused image only contains image details and ignores other low-frequency information, resulting in poor fused image quality, which cannot meet user needs.
[0005] In view of this, how to achieve image fusion of the visible light and infrared images while fully extracting all effective information of the two is a technical problem that technicians in the relevant field need to solve. Summary of the invention
[0006] The present application provides an image fusion method, device and computer-readable storage medium, which realize the image fusion of visible light image and infrared image on the premise of fully extracting all effective information of the two.
[0007] To solve the above technical problems, the embodiments of the present invention provide the following technical solutions:
[0008] An embodiment of the present invention provides an image fusion method, including:
[0009] Obtain visible light images and infrared images of the same target with the same image size and resolution;
[0010] Determining a coordinate mapping relationship between the infrared image and the visible light image based on a relative geometric position relationship between the infrared camera and the visible light camera, and aligning pixel coordinates of the infrared image and the visible light image to the same coordinate system based on the coordinate mapping relationship;
[0011] Respectively converting the pseudo-color image corresponding to the infrared image and the visible light image from the original color space to the target type color space, and extracting the color component information of the pseudo-color image and the brightness component information of the visible light image;
[0012] A fused color image is obtained by calculation in the target type color space based on the color component information and the brightness component information.
[0013] Optionally, the original color space is not a YCbCr color space, and the steps of converting the pseudo-color image corresponding to the infrared image and the visible light image from the original color space to a target type color space, and extracting color component information of the pseudo-color image and brightness component information of the visible light image include:
[0014] Performing pseudo-color mapping on the infrared image based on the pixel intensity of the infrared image to obtain a corresponding pseudo-color image;
[0015] Converting the pseudo-color image in the original color space into an image in the YCbCr color space, and extracting chrominance components Cb and Cr as the color component information;
[0016] The visible light color image in the original color space is converted into an image in the YCbCr color space, and the brightness component Y is extracted as the brightness component information.
[0017] Optionally, the original color space is not an HSL / HSV color space, and the steps of converting the pseudo-color image corresponding to the infrared image and the visible light image from the original color space to a target type color space, and extracting color component information of the pseudo-color image and brightness component information of the visible light image include:
[0018] Performing pseudo-color mapping on the infrared image based on the pixel intensity of the infrared image to obtain a corresponding pseudo-color image;
[0019] Convert the pseudo-color image in the original color space into an image in the HSL / HSV color space, and extract the hue component H and the saturation component S as the color component information;
[0020] The visible light color image in the original color space is converted into an image in the HSL / HSV color space, and the brightness component L / V is extracted as the brightness component information.
[0021] Optionally, the calculating the fused color image based on the color component information and the brightness component information in the target type color space includes:
[0022] Calling a preset first monotonic function to perform monotonic transformation processing on the color component information to obtain a monotonic color feature;
[0023] Calling a preset second monotonic function to perform monotonic transformation processing on the brightness component information to obtain a monotonic brightness feature;
[0024] A fused color image is obtained by calculation in the target type color space based on the monotone color feature and the monotone brightness feature.
[0025] Optionally, after calculating the fused color image based on the color component information and the brightness component information in the target type color space, the method further includes:
[0026] The fused color image is then transformed into a desired type of color space to obtain a target fused color image;
[0027] The target fused color image is stored and output to a display device.
[0028] Optionally, acquiring a visible light image and an infrared image of the same target with the same image size and resolution includes:
[0029] Obtain visible light images and infrared images of the same target taken at the same time;
[0030] If the image sizes of the visible light image and the infrared image are inconsistent, cropping the image to make the image sizes of the visible light image and the infrared image the same;
[0031] If the resolutions of the visible light image and the infrared image are different, the infrared image is resampled so that the resolutions of the visible light image and the infrared image are the same.
[0032] Another aspect of the present invention provides an image fusion device, including:
[0033] An image acquisition module is used to acquire visible light images and infrared images of the same target with the same image size and resolution;
[0034] A pixel coordinate alignment module, used to determine the coordinate mapping relationship of the infrared image based on the relative geometric position relationship between the infrared camera and the visible light camera, and align the pixel coordinates of the infrared image and the visible light image to the same coordinate system based on the coordinate mapping relationship;
[0035] A feature extraction module, used to convert the pseudo-color image corresponding to the infrared image and the visible light image from the original color space to the target type color space, and extract the color component information of the pseudo-color image and the brightness component information of the visible light image;
[0036] The image fusion module is used to calculate a fused color image in the target type color space based on the color component information and the brightness component information.
[0037] Optionally, the feature extraction module includes:
[0038] The infrared image processing submodule is used to perform pseudo-color mapping on the infrared image based on the pixel intensity of the infrared image to obtain a corresponding pseudo-color image;
[0039] A color component information extraction submodule, used to convert the pseudo-color image in the original color space into an image in a YCbCr color space, and extract chroma components Cb and Cr as the color component information; or used to convert the pseudo-color image in the original color space into an image in an HSL / HSV color space, and extract a hue component H and a saturation component S as the color component information;
[0040] The luminance component information extraction submodule is used to convert the visible light color image in the original color space into an image in the YCbCr color space, and extract the luminance component Y as the luminance component information; or to convert the visible light color image in the original color space into an image in the HSL / HSV color space, and extract the luminance component L / V as the luminance component information.
[0041] An embodiment of the present invention further provides an image fusion device, comprising a processor, wherein the processor is configured to implement the steps of the image fusion method as described in any of the preceding items when executing a computer program stored in a memory.
[0042] Finally, an embodiment of the present invention further provides a computer-readable storage medium, on which an image fusion program is stored. When the image fusion program is executed by a processor, the steps of the image fusion method described in any of the preceding items are implemented.
[0043] The advantage of the technical solution provided by the present application is that the fusion is performed based on the pseudo-color image mapped from the infrared image, rather than directly on the original infrared image. The color component of the infrared pseudo-color image contains most of the information in the infrared original image, such as temperature information, which is conducive to obtaining a fused image containing more features of the original image; and the brightness component of the visible light image already contains all the information about the appearance of the object except the color, including both overall features and contour texture features. In this way, the infrared image and the visible light image are decomposed in the color space, rather than other decomposition or information extraction methods, and the complementary characteristics of the infrared and visible light images can be fully utilized, that is, the various features of the photographed object or scene, such as temperature features and appearance detail features, are displayed under different environmental conditions, mainly the lighting conditions. The fusion of the brightness component of the visible light image and the color component of the infrared image can more comprehensively retain their effective information, without losing the overall information and color information of the original image, and more fully utilize the complementary characteristics of the infrared and visible light images, and realize the image fusion of the two on the premise of fully extracting all the effective information of the visible light image and the infrared image.
[0044] In addition, the embodiment of the present invention also provides a corresponding implementation device and a computer-readable storage medium for the image fusion method, which further makes the method more practical, and the device and the computer-readable storage medium have corresponding advantages.
[0045] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 A schematic diagram of a flow chart of an image fusion method provided by an embodiment of the present invention;
[0048] Figure 2 A schematic diagram of a flow chart of another image fusion method provided by an embodiment of the present invention;
[0049] Figure 3 A structural diagram of a specific implementation of the image fusion device provided in an embodiment of the present invention;
[0050] Figure 4 This is a structural diagram of another specific implementation of the image fusion device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0052] The terms "first", "second", "third", "fourth", etc. in the specification and claims of this application and the above drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0053] After introducing the technical solutions of the embodiments of the present invention, various non-limiting implementation methods of the present application are described in detail below.
[0054] See first Figure 1 , Figure 1 A flowchart of an image fusion method provided by an embodiment of the present invention is provided. The embodiment of the present invention may include the following contents:
[0055] S101: Acquire a visible light image and an infrared image of the same target with the same image size and resolution.
[0056] In the present application, an optical device equipped with both an infrared camera and a visible light camera can be used to shoot the same target at the same time to obtain a visible light image and an infrared image, or a separate infrared camera and a visible light camera can be used to shoot the same target at the same time or at different times to obtain a visible light image and an infrared image. Of course, for the visible light image and the infrared image taken at different times, it is necessary to shoot the target in the same scene. In order to facilitate subsequent image fusion, after acquiring the image from the image acquisition device, namely the infrared camera and the visible light camera, the image needs to be processed to obtain a visible light image and an infrared image with the same image size and the same image resolution. Any image processing method such as image cropping or image stretching can be used to make the two images the same size, and any image processing method such as pixel filling or resampling can be used to make the two resolutions the same, which does not affect the implementation of the present application.
[0057] S102: determining a coordinate mapping relationship between the infrared image and the visible light image based on a relative geometric position relationship between the infrared camera and the visible light camera, and aligning pixel coordinates of the infrared image and the visible light image to the same coordinate system based on the coordinate mapping relationship.
[0058] Since the focal length, field of view, and resolution of infrared cameras and visible light cameras are inconsistent, in the process of fusion of infrared images and visible light images, it is necessary to match and align the pixels of the images obtained by different cameras one by one, so that the same pixel corresponds to the same object, so as to ensure that the fusion result is free of distortion and artifacts. Due to the difference in the imaging principles of infrared images and visible light images, the pixels of infrared cameras are in the infrared camera coordinate system, and the pixels of visible light images are in the visible light camera coordinate system. The pixels corresponding to the same target point in the infrared image and the visible light image display different pixel coordinates in different spatial coordinate systems, so that a coordinate mapping relationship between the two can be established. The coordinate mapping relationship can be given, for example, in the following form: 1 Row j 1 The pixels in the column correspond to the i-th visible light image 2 Row j 2 Of course, the coordinate mapping relationship can also be given in the form of a mapping table, and this application does not make any limitation on this.
[0059] In this step, the pixel coordinates of the visible light image and the infrared image can be aligned in the visible light camera coordinate system, the infrared camera coordinate system, or any other spatial coordinate system, which does not affect the implementation of the present application. Any image registration method can be used to register the pixels in different spatial coordinate systems, such as a heterogeneous image registration method, so as to align the pixel coordinates of the infrared image and the visible light image to the same coordinate system.
[0060] S103: Convert the pseudo-color image and the visible light image corresponding to the infrared image from the original color space to the target type color space respectively, and extract the color component information of the pseudo-color image and the brightness component information of the visible light image.
[0061] Generally speaking, visible light images are colorful, which is consistent with the color of objects in the real world. Such color images can be called "true color" images. Infrared images themselves cannot describe the color information of objects because they reflect the strength of the radiation energy of objects. However, a color lookup table can be defined, that is, a mapping relationship between infrared image intensity and color can be established. For example, weaker infrared image intensity values correspond to cold colors such as blue and purple, indicating that the temperature is low; stronger infrared image intensity values correspond to warm colors such as yellow and red, indicating that the temperature is high. In this way, a "pseudo-color" image of the infrared image can be obtained to facilitate ordinary users to understand the information in the infrared image. For example, the infrared image can be pseudo-colored based on the pixel intensity of the infrared image to obtain its corresponding pseudo-color image. For example, a lower pixel value can be corresponded to a cold color such as blue, indicating that the temperature is low; a higher pixel value can be corresponded to a warm color such as red, indicating that the temperature is high. In this way, the difference in color can intuitively show the difference in temperature of different objects in the same scene.
[0062] It is understandable that there are many ways to store and represent the color of digital images in computers, and different methods constitute different color spaces. RGB color space is the most common color space, which obtains a variety of colors by changing the three color channels of red (R), green (G), and blue (B) and superimposing them on each other. The size of the R / G / B component of a certain color represents the proportion of red / green / blue in this color. For example, if the red and blue in purple account for a high proportion, then its R and B components are larger than the G component. For HLS / HSV color space, the H component represents the hue, which is expressed as an angle of 0° to 360°; the S component represents the saturation of the color, that is, the degree to which the color is close to pure color. The higher the saturation, the darker and brighter the color; L / V represents brightness. The lower the brightness, the closer the color is to black, and vice versa, the closer it is to white (HSL space) or color (HSV space). The YCbCr color space uses three components, Y, Cb, and Cr, to describe the color of a pixel, where Y is the brightness component, and Cb and Cr represent the chromaticity components of blue and red, respectively. The larger the Y, the brighter the image (whiter), and vice versa, the darker (blacker); the larger the Cb, the bluer the image; the larger the Cr, the redder the image. In the present application, the original color space can be, for example, any of the above color spaces, and the target type color space can also be any color space. For the target type color space and the original color space of the same type of color space, in order to improve the image fusion rate, there is no need to perform color space type conversion, and the required information can be directly extracted.
[0063] S104: Calculate and obtain a fused color image in a target type color space based on the color component information and the brightness component information.
[0064] The target type color space in this step is the same type of color space as the target type color space in S103. After the color component information of the infrared pseudo-color image and the brightness component information of the visible light image are extracted in S103, the color component information and the brightness component information are calculated and fused in this type of color space to obtain a fused image. In this way, the fused image contains most of the information of the infrared image and all the information of the visible light image except color, which greatly increases the effective information of the fused image.
[0065] In the technical solution provided by the embodiment of the present invention, fusion is performed based on the pseudo-color image mapped from the infrared image, rather than directly on the original infrared image. The color component of the infrared pseudo-color image contains most of the information in the infrared original image, such as temperature information, which is conducive to obtaining a fused image containing more features of the original image; and the brightness component of the visible light image already contains all the information about the appearance of the object except the color, including both overall features and contour texture features. In this way, the infrared image and the visible light image are decomposed in the color space, rather than other decomposition or information extraction methods, and the complementary characteristics of the infrared and visible light images can be fully utilized, that is, the various features of the photographed object or scene, such as temperature features and appearance detail features, are displayed under different environmental conditions, mainly the lighting conditions. Fusion of the brightness component of the visible light image and the color component of the infrared image can more comprehensively retain their effective information, without losing the overall information and color information of the original image, and more fully give play to the complementary characteristics of the infrared and visible light images, and realize the image fusion of the two on the premise of fully extracting all effective information of the visible light image and the infrared image.
[0066] In the above embodiment, there is no limitation on how to execute step S101. The present application also provides an image processing method, such as Figure 2 As shown, it may include the following:
[0067] Obtain visible light images and infrared images of the same target taken at the same time.
[0068] If the image sizes of the visible light image and the infrared image are inconsistent, image cropping is performed to make the image sizes of the visible light image and the infrared image the same.
[0069] If the resolutions of the visible light image and the infrared image are different, the infrared image is resampled so that the resolutions of the visible light image and the infrared image are the same.
[0070] Through image cropping and resampling operations, the size and resolution of visible light images and infrared images are kept consistent, and interference factors that affect the image fusion effect are removed, which is beneficial to improving the image fusion effect.
[0071] In the above embodiment, there is no limitation on how to perform step S103. In this embodiment, an implementation method of image decomposition is provided. For a scene where the original color space is not the YCbCr color space, S103 may include the following steps:
[0072] The infrared image is pseudo-colored based on the pixel intensity of the infrared image to obtain a corresponding pseudo-color image.
[0073] The pseudo-color image in the original color space is converted into an image in the YCbCr color space, and the chrominance components Cb and Cr are extracted as color component information.
[0074] The visible light color image in the original color space is converted into an image in the YCbCr color space, and the brightness component Y is extracted as brightness component information.
[0075] The present application also provides another implementation of image decomposition, which is parallel to the above-mentioned implementation, and therefore can be used as another optional implementation. For an application scenario where the original color space is not the HSL / HSV color space, S103 may include:
[0076] The infrared image is pseudo-colored based on the pixel intensity of the infrared image to obtain a corresponding pseudo-color image.
[0077] The pseudo-color image in the original color space is converted into an image in the HSL / HSV color space, and the hue component H and the saturation component S are extracted as color component information.
[0078] The visible light color image in the original color space is converted into an image in the HSL / HSV color space, and the brightness component L / V is extracted as the brightness component information.
[0079] The embodiment of the present invention decomposes the visible light image and the infrared image in the HSL / HSV color space or the YCbCr color space, accurately extracts the color features and brightness features of the image target, and is conducive to improving the fusion effect of the fused image.
[0080] In the above embodiment, there is no limitation on how to execute step S104. In this embodiment, an implementation method of image fusion is provided, which may include the following steps:
[0081] A preset first monotonic function is called to perform monotonic transformation processing on the color component information to obtain a monotonic color feature.
[0082] A preset second monotonic function is called to perform monotonic transformation processing on the brightness component information to obtain a monotonic brightness feature.
[0083] A fused color image is calculated in the target type color space based on the monotone color features and the monotone brightness features.
[0084] The first monotonic function and the second monotonic function may be monotonic functions of the same type or of different types, which does not affect the implementation of the present application. The color component information may be the chromaticity component in the YCbCr color space of the above embodiment or the hue component and saturation component in the HSL / HSV color space. The hue component and saturation component or chromaticity component extracted in the previous step are monotonically transformed. For example, the hue component and saturation component or chromaticity component may be passed as input to a pre-designed monotonic function f 1 , and then use the output result as the hue component and saturation component or chroma component of the final fused image. Perform a monotonic transformation on the brightness component extracted in the previous step. For example, the brightness component can be used as input to another pre-designed monotonic function f 2 , and then the output result is used as the brightness component of the final fused image. Based on two monotonic transformation functions f 1 and f 2 The obtained result is a fused color image calculated in a corresponding color space such as YCbCr, which fully increases the features of the original image contained in the fused image.
[0085] As another optional implementation, after the fused color image is calculated based on the color component information and the brightness component information in the target type color space, the following may also be included:
[0086] The fused color image is then transformed into a desired type of color space to obtain a target fused color image; the target fused color image is stored and output to a display device.
[0087] The color space of the type required by the embodiment of the present invention may be any color space that is the same as or different from the target type color space or the original color space, and the present application does not impose any limitation on this. The target fused image is an image converted from the fused image of S104 to the color space of the required type, and the obtained target fused image is stored in a corresponding position of the device and waits for the next step of processing, or is directly output to a display device.
[0088] In order to verify the effectiveness of the technical solution of the present application, the present application also provides an illustrative example, which takes an infrared image and a visible light image of a scene in which the left cup is filled with hot water and the right cup is not filled with water. The infrared image can clearly see the color inside the left cup, because the temperature of the cup filled with hot water is higher; but the temperature of the right cup is close to the room temperature, so it is more difficult to distinguish in the infrared image. On the other hand, the visible light image can clearly show the outline and appearance details of the two cups, but it is impossible to tell which cup contains hot water. The fused image obtained by using the technical solution of the present application combines all the effective information of the infrared and visible light images, in which the color information inside the cup can reflect the temperature information of the infrared image, and the brightness corresponds to the information of the visible light image, that is, the brighter part of the visible light image will also be brighter in the fused image. In this way, from the fused image, we can see the outline and appearance details of the two cups, as well as which cup contains hot water.
[0089] It should be noted that there is no strict order of execution between the steps in this application. As long as they comply with the logical order, these steps can be executed simultaneously or in a certain preset order. Figure 1 and Figure 2 This is just a schematic and does not mean that this is the only execution order.
[0090] The embodiment of the present invention also provides a corresponding device for the image fusion method, which further makes the method more practical. The device can be described from the perspective of functional modules and hardware. The image fusion device provided by the embodiment of the present invention is introduced below. The image fusion device described below and the image fusion method described above can be referred to in correspondence with each other.
[0091] From the perspective of functional modules, see Figure 3 , Figure 3 The structure diagram of an image fusion device provided in an embodiment of the present invention in a specific implementation manner, the device may include:
[0092] The image acquisition module 301 is used to acquire a visible light image and an infrared image of the same target with the same image size and resolution.
[0093] The pixel coordinate alignment module 302 is used to determine the coordinate mapping relationship of the infrared image based on the relative geometric position relationship between the infrared camera and the visible light camera, and align the pixel coordinates of the infrared image and the visible light image to the same coordinate system based on the coordinate mapping relationship.
[0094] The feature extraction module 303 is used to convert the pseudo-color image and the visible light image corresponding to the infrared image from the original color space to the target type color space, and extract the color component information of the pseudo-color image and the brightness component information of the visible light image.
[0095] The image fusion module 304 is used to calculate and obtain a fused color image in a target type color space based on the color component information and the brightness component information.
[0096] Optionally, in some implementations of this embodiment, the feature extraction module 303 may include, for example:
[0097] The infrared image processing submodule is used to perform pseudo-color mapping on the infrared image based on the pixel intensity of the infrared image to obtain a corresponding pseudo-color image;
[0098] A color component information extraction submodule is used to convert a pseudo-color image in an original color space into an image in a YCbCr color space, and extract chroma components Cb and Cr as color component information; or to convert a pseudo-color image in an original color space into an image in an HSL / HSV color space, and extract a hue component H and a saturation component S as color component information;
[0099] The luminance component information extraction submodule is used to convert the visible light color image in the original color space into an image in the YCbCr color space and extract the luminance component Y as the luminance component information; or to convert the visible light color image in the original color space into an image in the HSL / HSV color space and extract the luminance component L / V as the luminance component information.
[0100] Optionally, in some other implementations of this embodiment, the image fusion module 304 may further include:
[0101] The monotonic transformation processing submodule is used to call a preset first monotonic function to perform monotonic transformation processing on the color component information to obtain a monotonic color feature; and call a preset second monotonic function to perform monotonic transformation processing on the brightness component information to obtain a monotonic brightness feature;
[0102] The fusion calculation submodule is used to calculate a fused color image in a target type color space based on monotone color features and monotone brightness features.
[0103] In some other implementations of this embodiment, the image fusion post-processing module may include:
[0104] The space conversion submodule is used to transform the fused color image into a desired type of color space to obtain a target fused color image;
[0105] A storage submodule, used for storing the target fused color image;
[0106] The display submodule is used to output the target fused color image to a display device.
[0107] As an optional implementation, the image acquisition module 301 may further include:
[0108] An image acquisition submodule is used to acquire a visible light image and an infrared image of the same target taken at the same time;
[0109] A size processing submodule, for cropping the image to make the visible light image and the infrared image have the same image size if the image sizes of the visible light image and the infrared image are inconsistent;
[0110] In the sampling submodule, if the resolutions of the visible light image and the infrared image are different, the infrared image is resampled so that the resolutions of the visible light image and the infrared image are the same.
[0111] The functions of the functional modules of the image fusion device described in the embodiment of the present invention can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.
[0112] It can be seen from the above that the embodiment of the present invention realizes the image fusion of the visible light image and the infrared image on the premise of fully extracting all effective information of the two.
[0113] The image fusion device mentioned above is described from the perspective of functional modules. Furthermore, the present application also provides an image fusion device, which is described from the perspective of hardware. Figure 4 This is a structural diagram of another image fusion device provided in an embodiment of the present application. Figure 4 As shown, the device includes a memory 40 for storing a computer program;
[0114] The processor 41 is used to implement the steps of the image fusion method mentioned in any of the above embodiments when executing a computer program.
[0115] Among them, the processor 41 may include one or more processing cores, such as a 4-core processor, a 4-core processor, etc. The processor 41 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 41 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 41 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 41 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0116] The memory 40 may include one or more computer-readable storage media, which may be non-transitory. The memory 40 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 40 is at least used to store the following computer program 401, wherein, after the computer program is loaded and executed by the processor 41, it can implement the relevant steps of the image fusion method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 40 may also include an operating system 402 and data 403, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 402 may include Windows, Unix, Linux, etc. Data 403 may include but is not limited to data corresponding to test results, etc.
[0117] In some embodiments, the image fusion device may further include a display screen 42 , an input / output interface 43 , a communication interface 44 , a power supply 45 , and a communication bus 46 .
[0118] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the image fusion device, and may include more or less components than those shown in the figure, such as the sensor 47.
[0119] The functions of the functional modules of the image fusion device described in the embodiment of the present invention can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.
[0120] It can be seen from the above that the embodiment of the present invention realizes the image fusion of the visible light image and the infrared image on the premise of fully extracting all effective information of the two.
[0121] It is understandable that if the image fusion method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, disk or optical disk and other media that can store program code.
[0122] Based on this, an embodiment of the present invention further provides a computer-readable storage medium storing an image fusion program, and when the image fusion program is executed by a processor, the steps of the image fusion method described in any of the above embodiments are performed.
[0123] The functions of the functional modules of the computer-readable storage medium described in the embodiment of the present invention can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.
[0124] It can be seen from the above that the embodiment of the present invention realizes the image fusion of the visible light image and the infrared image on the premise of fully extracting all effective information of the two.
[0125] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0126] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0127] The above is a detailed introduction to an image fusion method, device and computer-readable storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. An image fusion method, characterized in that: include: Obtain visible light images and infrared images of the same target with the same image size and resolution; Determining a coordinate mapping relationship between the infrared image and the visible light image based on a relative geometric position relationship between the infrared camera and the visible light camera, and aligning pixel coordinates of the infrared image and the visible light image to the same coordinate system based on the coordinate mapping relationship; Respectively converting the pseudo-color image corresponding to the infrared image and the visible light image from the original color space to the target type color space, and extracting the color component information of the pseudo-color image and the brightness component information of the visible light image; Based on the color component information and the brightness component information, a fused color image is calculated in the target type color space; The step of calculating the fused color image based on the color component information and the brightness component information in the target type color space includes: Calling a preset first monotonic function to perform monotonic transformation processing on the color component information to obtain a monotonic color feature; Calling a preset second monotonic function to perform monotonic transformation processing on the brightness component information to obtain a monotonic brightness feature; A fused color image is calculated based on the monotone color feature and the monotone brightness feature in the target type color space; wherein the fused color image contains most of the information of the infrared image and all the information of the visible light image except color; and the color component information is the chromaticity component in the YCbCr color space or the hue component and saturation component in the HSL / HSV color space.
2. The image fusion method according to claim 1, characterized in that: The original color space is not a YCbCr color space, and the pseudo-color image corresponding to the infrared image and the visible light image are respectively converted from the original color space to a target type color space, and the color component information of the pseudo-color image and the brightness component information of the visible light image are extracted, including: Performing pseudo-color mapping on the infrared image based on the pixel intensity of the infrared image to obtain a corresponding pseudo-color image; Converting the pseudo-color image in the original color space into an image in the YCbCr color space, and extracting chrominance components Cb and Cr as the color component information; The visible light color image in the original color space is converted into an image in the YCbCr color space, and the brightness component Y is extracted as the brightness component information.
3. The image fusion method according to claim 1, characterized in that: The original color space is not an HSL / HSV color space, and the pseudo-color image corresponding to the infrared image and the visible light image are respectively converted from the original color space to a target type color space, and the color component information of the pseudo-color image and the brightness component information of the visible light image are extracted, including: Performing pseudo-color mapping on the infrared image based on the pixel intensity of the infrared image to obtain a corresponding pseudo-color image; Convert the pseudo-color image in the original color space into an image in the HSL / HSV color space, and extract the hue component H and the saturation component S as the color component information; The visible light color image in the original color space is converted into an image in the HSL / HSV color space, and the brightness component L / V is extracted as the brightness component information.
4. The image fusion method according to claim 1, characterized in that: After the fused color image is calculated based on the color component information and the brightness component information in the target type color space, the method further includes: The fused color image is then transformed into a desired type of color space to obtain a target fused color image; The target fused color image is stored and output to a display device.
5. The image fusion method according to claim 1, characterized in that: The acquisition of a visible light image and an infrared image of the same target with the same image size and resolution comprises: Obtain visible light images and infrared images of the same target taken at the same time; If the image sizes of the visible light image and the infrared image are inconsistent, performing image cropping to make the image sizes of the visible light image and the infrared image the same; If the resolutions of the visible light image and the infrared image are different, the infrared image is resampled so that the resolutions of the visible light image and the infrared image are the same.
6. An image fusion device, characterized in that: include: An image acquisition module is used to acquire visible light images and infrared images of the same target with the same image size and resolution; A pixel coordinate alignment module, used to determine the coordinate mapping relationship of the infrared image based on the relative geometric position relationship between the infrared camera and the visible light camera, and align the pixel coordinates of the infrared image and the visible light image to the same coordinate system based on the coordinate mapping relationship; A feature extraction module, used to convert the pseudo-color image corresponding to the infrared image and the visible light image from the original color space to the target type color space, and extract the color component information of the pseudo-color image and the brightness component information of the visible light image; An image fusion module, used for calculating a fused color image in the target type color space based on the color component information and the brightness component information; Wherein, the image fusion module is also used for: Calling a preset first monotonic function to perform monotonic transformation processing on the color component information to obtain a monotonic color feature; Calling a preset second monotonic function to perform monotonic transformation processing on the brightness component information to obtain a monotonic brightness feature; A fused color image is calculated based on the monotone color feature and the monotone brightness feature in the target type color space; wherein the fused color image contains most of the information of the infrared image and all the information of the visible light image except color; and the color component information is the chromaticity component in the YCbCr color space or the hue component and saturation component in the HSL / HSV color space.
7. The image fusion device according to claim 6, characterized in that: The feature extraction module comprises: The infrared image processing submodule is used to perform pseudo-color mapping on the infrared image based on the pixel intensity of the infrared image to obtain a corresponding pseudo-color image; A color component information extraction submodule, used to convert the pseudo-color image in the original color space into an image in a YCbCr color space, and extract chroma components Cb and Cr as the color component information; or used to convert the pseudo-color image in the original color space into an image in an HSL / HSV color space, and extract a hue component H and a saturation component S as the color component information; The luminance component information extraction submodule is used to convert the visible light color image in the original color space into an image in the YCbCr color space, and extract the luminance component Y as the luminance component information; or to convert the visible light color image in the original color space into an image in the HSL / HSV color space, and extract the luminance component L / V as the luminance component information.
8. An image fusion device, characterized in that: The method comprises a processor, wherein the processor is used to implement the steps of the image fusion method according to any one of claims 1 to 5 when executing a computer program stored in a memory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an image fusion program, and when the image fusion program is executed by the processor, the steps of the image fusion method according to any one of claims 1 to 5 are implemented.
