Double-camera visible light and infrared image fusion method and device

Through operations such as binocular stereo matching, segmentation and thermal image transformation, dual-camera non-aligned RGB-IR images are generated, which solves the difficulty of non-aligned image fusion in the existing technology and achieves processing of viewing angle differences and object consistency. Adapt to image collection in different scenarios.

CN118657672AInactive Publication Date: 2024-09-17AMWAY HUASHENG DATA TECH (JIANGSU) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411132507.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-09-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

It is difficult for the existing technology to effectively process non-aligned RGB-IR images, especially when the installation positions of the RGB and IR shooting equipment are not fixed, resulting in difficulty in image fusion, and the existing methods require a large amount of manual annotation data and cannot generate non-rigidly transformed images. right.

Method used

By obtaining the initial image group of the dual camera, performing binocular stereo matching to obtain the homography matrix, segmenting to obtain the segmentation mask and semantic information, performing thermal image transformation and expansion operations, and generating dual camera non-aligned images, overcoming the difference in viewing angles. and the issue of consistency of objects within the scene.

Benefits of technology

It realizes the visual difference corresponding to the difference in viewing angle, ensures the consistency of objects in the scene and the real depth of field information, generates RGB-IR image pairs under non-rigid transformation, adapts to image collection under different scenes and conditions, and has strong Adaptability and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657672A
    Figure CN118657672A
Patent Text Reader

Abstract

The embodiment of the invention provides a double-camera visible light and infrared image fusion method and device, and belongs to the technical field of image fusion and computers.The method comprises the steps that an initial image group of double cameras is obtained, and the initial image group comprises two RGB images collected by different cameras at the same moment; performing binocular stereo matching on the initial image group to obtain a homography matrix; segmenting the initial image group according to the homography matrix to obtain a segmentation mask, and obtaining semantic information of the segmentation mask; performing thermal image transformation on any RGB image in the initial image group to obtain a third image; performing expansion operation on the third image according to the semantic information to obtain a fourth image; and determining a dual-camera non-aligned image according to the initial image group, the fourth image, the homography matrix and the semantic information. According to the method, the dual-camera non-aligned image can be effectively obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image fusion and computer technology, and in particular to a method and device for fusing dual-camera visible light and infrared images. Background Art

[0002] Image fusion refers to the fusion of image information from different sensors or modalities into one image to obtain more comprehensive and rich information and improve the performance of downstream tasks such as target detection, recognition and tracking.

[0003] Existing fusion methods usually focus on aligned RGB-IR image pairs and perform fusion. However, in many scenarios, the installation positions of RGB and IR shooting devices are not fixed, and the captured RGB-IR images have differences in shooting angle and range (that is, RGB-IR images are not aligned), which brings great challenges to fusion.

[0004] The existing technology mainly uses neural network learning to deal with this problem. The model learns to fuse and align RGB-IR image pairs based on a large amount of labeled non-aligned data. This method requires a large number of labeled dual-camera non-aligned RGB-IR image pairs. The current method of obtaining non-aligned RGB-IR image pairs mainly relies on manual annotation (i.e., using a data acquisition system composed of RGB and IR sensors to collect data, and then aligning the RGB and IR image pairs at the same time). Due to the large difference between RGB and IR images, the quality of non-aligned RGB-IR image pairs is poor. There are also enhancement methods such as affine transformation of IR images to generate non-aligned RGB and IR image pairs, but this method is a rigid transformation and cannot generate RGB-IR image data pairs with non-rigid transformations. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a method and device for fusing dual-camera visible light and infrared images, which can effectively obtain dual-camera non-aligned images.

[0006] In order to achieve the above object, an embodiment of the present invention provides a method for fusing dual-camera visible light and infrared images, the method comprising: Acquire an initial image group of two cameras, wherein the initial image group includes two RGB images acquired at different camera positions at the same time; Performing binocular stereo matching on the initial image group to obtain a homography matrix; Segmenting the initial image group according to the homography matrix to obtain a segmentation mask, and acquiring semantic information of the segmentation mask; Performing thermal image transformation on any one RGB image in the initial image group to obtain a third image; Performing a dilation operation on the third image according to the semantic information to obtain a fourth image; A dual-camera non-aligned image is determined according to the initial image group, the fourth image, the homography matrix and the semantic information.

[0007] Optionally, performing binocular stereo matching on the initial image group to obtain a homography matrix includes: Get two RGB images of the initial image group:

[0008] Construct a linear equation based on the two RGB images:

[0009]

[0010] Solving the linear equations yields the homography matrix H:

[0011] in, , and Two RGB images respectively and Elements of , , , , , , , are the elements in the homography matrix. Optionally, segmenting the initial image group according to the homography matrix to obtain a segmentation mask includes: According to the homography matrix H, the initial image I is transformed into a transformed image after affine transformation. :

[0012] The transformed image Input the SAM model for normalization and feature extraction to obtain the feature extraction layer; The feature extraction layer is segmented to obtain a segmentation mask.

[0013] Optionally, performing thermal image transformation on any one RGB image in the initial image group to obtain a third image includes: Set up the generator and discriminator; Updating the discriminator by performing adversarial training on the RGB image; Update the discriminator by predicting the cross entropy loss function on the RGB image; The generator and the discriminator are used to perform image style mapping and image style discrimination on the RGB image respectively to obtain the third image.

[0014] Optionally, updating the discriminator by predicting a cross entropy loss function on the RGB image includes: Obtain a prediction result by performing a cross entropy loss function prediction on the RGB image; Determine the resulting loss based on the predicted results and the actual results; The discriminator is updated according to the resulting loss.

[0015] Optionally, performing a dilation operation on the third image according to the semantic information to obtain a fourth image includes: Performing traversal processing on each pixel of the third image according to the semantic information; The maximum value of all pixels is adjusted so that the outline of the third image extends outward.

[0016] On the other hand, the present application also proposes a dual-camera visible light and infrared image fusion device, the device comprising: An acquisition module, used to acquire an initial image group of dual cameras, wherein the initial image group includes two RGB images acquired at different cameras at the same time; A first processing module is used to perform binocular stereo matching on the initial image group to obtain a homography matrix; A second processing module, configured to segment the initial image group according to the homography matrix to obtain a segmentation mask, and acquire semantic information of the segmentation mask; A third processing module, used for performing thermal image transformation on any RGB image in the initial image group to obtain a third image; a fourth processing module, configured to perform a dilation operation on the third image according to the semantic information to obtain a fourth image; A fusion module is used to determine a dual-camera non-aligned image according to the initial image group, the fourth image, the homography matrix and the semantic information.

[0017] Optionally, performing binocular stereo matching on the initial image group to obtain a homography matrix includes: Get two RGB images of the initial image group:

[0018] Construct a linear equation based on the two RGB images:

[0019]

[0020] Solving the linear equations yields the homography matrix H:

[0021] in, , and Two RGB images respectively and Elements of , , , , , , , are the elements in the homography matrix. Optionally, segmenting the initial image group according to the homography matrix to obtain a segmentation mask includes: According to the homography matrix H, the initial image I is transformed into a transformed image after affine transformation. :

[0022] The transformed image Input the SAM model for normalization and feature extraction to obtain the feature extraction layer; The feature extraction layer is segmented to obtain a segmentation mask.

[0023] Optionally, performing thermal image transformation on any one RGB image in the initial image group to obtain a third image includes: Set up the generator and discriminator; Updating the discriminator by performing adversarial training on the RGB image; Update the discriminator by predicting the cross entropy loss function on the RGB image; The generator and the discriminator are used to perform image style mapping and image style discrimination on the RGB image respectively to obtain the third image.

[0024] Optionally, updating the discriminator by predicting a cross entropy loss function on the RGB image includes: Obtain a prediction result by performing a cross entropy loss function prediction on the RGB image; Determine the resulting loss based on the predicted results and the actual results; The discriminator is updated according to the resulting loss.

[0025] Optionally, performing a dilation operation on the third image according to the semantic information to obtain a fourth image includes: Performing traversal processing on each pixel of the third image according to the semantic information; The maximum value of all pixels is adjusted so that the outline of the third image extends outward.

[0026] A method for fusing dual-camera visible light and infrared images of the present invention comprises: obtaining an initial image group of dual cameras, the initial image group comprising two RGB images collected by different cameras at the same time; performing binocular stereo matching on the initial image group to obtain a homography matrix; segmenting the initial image group according to the homography matrix to obtain a segmentation mask, and obtaining semantic information of the segmentation mask; performing thermal image transformation on any RGB image in the initial image group to obtain a third image; performing an expansion operation on the third image according to the semantic information to obtain a fourth image; and determining a dual-camera non-aligned image according to the initial image group, the fourth image, the homography matrix and the semantic information. The present invention obtains a dual-camera non-aligned image by performing matching, segmentation and thermal image transformation operations on RGB images of different cameras, provides visual differences corresponding to viewing angle differences, and ensures consistency of objects in the scene and true depth of field information at the same time. By randomly perturbing and dilating based on semantic information, RGB-IR image pairs under non-rigid transformation can be generated, overcoming the limitations of the prior art in generating non-aligned image pairs, adapting to image acquisition under different scenes and conditions, and having strong adaptability and flexibility.

[0027] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings: Figure 1 It is a schematic flow chart of a method for fusing dual-camera visible light and infrared images of the present invention; Figure 2 It is a schematic diagram of a specific embodiment of the present invention. DETAILED DESCRIPTION

[0029] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.

[0030] Embodiment 1 Figure 1 FIG. 1 is a flow chart of a method for fusing dual-camera visible light and infrared images according to the present invention. Figure 1As shown, a dual-camera visible light and infrared image fusion method of the present invention includes: step S101 is to obtain an initial image group of the dual-camera, and the initial image group includes two RGB images collected by different cameras at the same time. For example, a large number of RGB-RGB image pairs are collected by using a dual-camera RGB sensor, and these image pairs are all collected by different cameras at the same time.

[0031] Step S102 is to perform binocular stereo matching on the initial image group to obtain a homography matrix. According to a specific implementation, performing binocular stereo matching on the initial image group to obtain a homography matrix includes: obtaining two RGB images of the initial image group:

[0032] Construct a linear equation based on the two RGB images:

[0033]

[0034] Solving the linear equations yields the homography matrix H:

[0035] in, , and Two RGB images respectively and Elements of , , , , , , , are the elements in the homography matrix.

[0036] Specifically, the stereo matching is to find the same point in the two images to be tested that corresponds to the same point in reality after the image is corrected, and then determine the depth information of this point through the disparity between the two points. The binocular stereo matching specifically refers to shooting two left and right viewpoint images of the same scene, using the stereo matching algorithm to obtain the disparity map, and then obtain the depth map. The matrix corresponding to the depth map is the homography matrix.

[0037] Step S103 is to segment the initial image group according to the homography matrix to obtain a segmentation mask, and obtain semantic information of the segmentation mask. According to a specific implementation, the segmentation of the initial image group according to the homography matrix to obtain a segmentation mask includes: generating a transformed image after affine transformation of the initial image I according to the homography matrix H :

[0038] The transformed image The SAM model (Segment Anything Model, a segmentation model) is input for normalization and feature extraction to obtain a feature extraction layer; the feature extraction layer is segmented to obtain a segmentation mask.

[0039] Specifically, image segmentation is the technology and process of dividing an image into several specific regions with unique properties and proposing targets of interest. It is a key step from image processing to image analysis. Existing image segmentation methods are mainly divided into the following categories: threshold-based segmentation methods, region-based segmentation methods, edge-based segmentation methods, and segmentation methods based on specific theories. From a mathematical point of view, image segmentation is the process of dividing a digital image into non-intersecting regions. The image segmentation process is also a labeling process, that is, pixels belonging to the same region are assigned the same number.

[0040] The segmentation mask is used to accurately separate the object in the image from the background. It achieves fine-grained division of the image area by classifying and labeling each pixel. Each pixel is assigned a label to determine whether it belongs to the foreground, background, or a different object category. The label information forms a two-dimensional matrix, namely the segmentation mask.

[0041] Step S104 is to perform thermal image transformation on any RGB image in the initial image group to obtain a third image.

[0042] According to a specific implementation, the method of performing thermal image transformation on any RGB image in the initial image group to obtain a third image includes: setting a generator and a discriminator; updating the discriminator by performing adversarial training on the RGB image; updating the discriminator by performing cross entropy loss function prediction on the RGB image; and performing image style mapping and image style discrimination on the RGB image using the generator and the discriminator respectively to obtain the third image.

[0043] The updating of the discriminator by predicting the cross entropy loss function on the RGB image includes: obtaining a prediction result by predicting the cross entropy loss function on the RGB image; determining a result loss according to the prediction result and an actual result; and updating the discriminator according to the result loss.

[0044] Step S105 is to dilate the third image according to the semantic information to obtain a fourth image. Specifically, dilating the third image according to the semantic information to obtain the fourth image includes: traversing each pixel of the third image according to the semantic information; adjusting the maximum value of all pixels so that the contour of the third image extends outward.

[0045] The expansion operation is to expand the outline of the image, connect the prominent points on the periphery of the image and extend them outward. For example, in an image with a black background and a white foreground, the kernel and the image part it covers are ANDed. If all are 0, the pixel point is 0, otherwise it is 1, that is, 1 is easy to obtain, more parts of the image become white, and the white part expands.

[0046] Step S106 is to determine a dual-camera non-aligned image according to the initial image group, the fourth image, the homography matrix and the semantic information. The second homography matrix corresponding to the dual-camera non-aligned image includes the RGB image, the fourth image, the segmentation mask and the homography matrix.

[0047] The present invention obtains dual-camera non-aligned images by performing operations such as matching, segmentation and thermal image transformation on RGB images of different camera positions, provides visual differences corresponding to viewing angle differences, and ensures the consistency of objects in the scene and real depth of field information. By performing random perturbation expansion based on semantic information, RGB-IR image pairs under non-rigid transformation can be generated, which overcomes the limitations of the prior art in generating non-aligned image pairs, adapts to image acquisition under different scenes and conditions, and has strong adaptability and flexibility.

[0048] Embodiment 2 Figure 2 It is a schematic diagram of a specific embodiment of the present invention, such as Figure 2 As shown, the present invention uses a dual-position RGB sensor to collect a large number of RGB-RGB image pairs. ), the image pairs are all acquired at the same time.

[0049] The image pair is matched by binocular stereo matching method. ) to match and obtain the homography matrix The specific method is as follows: In the image ) to find at least four sets of corresponding key points:

[0050]

[0051]

[0052]

[0053] A linear equation is formed based on the homography matrix and each set of key points:

[0054] Solving the linear equations yields the homography matrix H:

[0055] in, , and Two RGB images respectively and Elements of , , , , , , , is an element in the homography matrix. Based on the M matrix, all The points on are transformed by matrix multiplication to obtain their The corresponding points in .

[0056] CycleGAN is used to learn how to translate images from a source domain to a target domain. Perform style transformation to obtain thermal image style images The main steps include: In the initialization phase, define two generators and , and two discriminators and , Map the image from RGB image style to IR image style, Maps the image from IR image style to RGB image style. Discriminator Judgment Generator Generated RGB style image authenticity, discriminator Judgment Generator The authenticity of the generated IR style image; adversarial training is used to update the parameters of the discriminator:

[0057] After getting the generated new style image and After that, they are passed through the discriminator and , and update the loss of the predicted true and false results and the actual true and false results by calculating the cross entropy loss function and Parameters.

[0058] Calculate by the following formula and The loss and update its parameters:

[0059]

[0060]

[0061] The final model loss function is:

[0062] in, To train the hyperparameters, The value range is 10 to 50.

[0063] right ) The image is segmented using the SAM model to obtain its saliency segmentation mask ),based on Semantic information pair Dilate to get the dilated image The process of obtaining the segmentation mask is as follows: By inputting the image into the SAM model, multiple segmentation masks are obtained, based on multiple subdivided small masks Can be concatenated into the final segmentation mask:

[0064] Overlay the homography matrix M on the image You can complete the pairing Segmentation, get the dual-camera non-aligned RGB-IR image pair and its homography matrix , , ).

[0065] Embodiment 3 The present invention also proposes a device for fusing visible light and infrared images of two cameras, the device comprising: an acquisition module, used to acquire an initial image group of two cameras, the initial image group comprising two RGB images collected by different cameras at the same time; a first processing module, used to perform binocular stereo matching on the initial image group to obtain a homography matrix; a second processing module, used to segment the initial image group according to the homography matrix to obtain a segmentation mask, and obtain semantic information of the segmentation mask; a third processing module, used to perform thermal imaging transformation on any RGB image in the initial image group to obtain a third image; a fourth processing module, used to perform an expansion operation on the third image according to the semantic information to obtain a fourth image; and a fusion module, used to determine the non-aligned images of the two cameras according to the initial image group, the fourth image, the homography matrix and the semantic information.

[0066] The step of performing binocular stereo matching on the initial image group to obtain a homography matrix includes: obtaining two RGB images of the initial image group:

[0067] Construct a linear equation based on the two RGB images:

[0068]

[0069] Solving the linear equations yields the homography matrix H:

[0070] in, , and Two RGB images respectively and Elements of , , , , , , , are the elements in the homography matrix. The segmenting of the initial image group according to the homography matrix to obtain a segmentation mask comprises: generating a transformed image after affine transformation from the initial image I according to the homography matrix H :

[0071] The transformed image The SAM model is input for normalization and feature extraction to obtain a feature extraction layer; the feature extraction layer is segmented to obtain a segmentation mask.

[0072] The step of performing thermal image transformation on any RGB image in the initial image group to obtain a third image includes: setting a generator and a discriminator; updating the discriminator by performing adversarial training on the RGB image; updating the discriminator by performing cross entropy loss function prediction on the RGB image; performing image style mapping and image style discrimination on the RGB image using the generator and the discriminator respectively to obtain the third image. The step of updating the discriminator by performing cross entropy loss function prediction on the RGB image includes: obtaining a prediction result by performing cross entropy loss function prediction on the RGB image; determining a result loss according to the prediction result and the actual result; and updating the discriminator according to the result loss. The step of performing an expansion operation on the third image according to the semantic information to obtain a fourth image includes: performing traversal processing on each pixel of the third image according to the semantic information; and adjusting the maximum value of all pixels so that the contour of the third image extends outward.

[0073] The device can provide visual differences corresponding to perspective differences while ensuring the consistency of objects in the scene and true depth information. Through random perturbation expansion based on semantic information, RGB-IR image pairs under non-rigid transformation can be generated.

[0074] A method for fusing dual-camera visible light and infrared images of the present invention comprises: obtaining an initial image group of dual cameras, the initial image group comprising two RGB images collected by different cameras at the same time; performing binocular stereo matching on the initial image group to obtain a homography matrix; segmenting the initial image group according to the homography matrix to obtain a segmentation mask, and obtaining semantic information of the segmentation mask; performing thermal image transformation on any RGB image in the initial image group to obtain a third image; performing an expansion operation on the third image according to the semantic information to obtain a fourth image; and determining a dual-camera non-aligned image according to the initial image group, the fourth image, the homography matrix and the semantic information. The present invention obtains a dual-camera non-aligned image by performing matching, segmentation and thermal image transformation operations on RGB images of different cameras, provides visual differences corresponding to viewing angle differences, and ensures consistency of objects in the scene and true depth of field information at the same time. By randomly perturbing and dilating based on semantic information, RGB-IR image pairs under non-rigid transformation can be generated, overcoming the limitations of the prior art in generating non-aligned image pairs, adapting to image acquisition under different scenes and conditions, and having strong adaptability and flexibility.

[0075] The optional implementation modes of the embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above implementation modes. Within the technical concept of the embodiments of the present invention, various simple modifications can be made to the technical scheme of the embodiments of the present invention, and these simple modifications all belong to the protection scope of the embodiments of the present invention.

[0076] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the embodiments of the present invention will not further describe various possible combinations.

[0077] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a single-chip microcomputer, a chip or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0078] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for fusing dual-camera visible light and infrared images, characterized in that: The method includes: Acquire an initial image group of two cameras, wherein the initial image group includes two RGB images acquired at different camera positions at the same time; Performing binocular stereo matching on the initial image group to obtain a homography matrix; Segmenting the initial image group according to the homography matrix to obtain a segmentation mask, and acquiring semantic information of the segmentation mask; Performing thermal image transformation on any one RGB image in the initial image group to obtain a third image; Performing a dilation operation on the third image according to the semantic information to obtain a fourth image; A dual-camera non-aligned image is determined according to the initial image group, the fourth image, the homography matrix and the semantic information.

2. The method according to claim 1, characterized in that The performing binocular stereo matching on the initial image group to obtain a homography matrix includes: Get two RGB images of the initial image group: Construct a linear equation based on the two RGB images: Solving the linear equations yields the homography matrix H: in, , and Two RGB images respectively and Elements of , , , , , , , are the elements in the homography matrix.

3. The method according to claim 1, characterized in that The step of segmenting the initial image group according to the homography matrix to obtain a segmentation mask includes: According to the homography matrix H, the initial image I is transformed into a transformed image after affine transformation. : The transformed image Input the SAM model for normalization and feature extraction to obtain the feature extraction layer; The feature extraction layer is segmented to obtain a segmentation mask.

4. The method according to claim 1, characterized in that: The step of performing thermal image transformation on any one RGB image in the initial image group to obtain a third image includes: Set up the generator and discriminator; Updating the discriminator by performing adversarial training on the RGB image; Update the discriminator by predicting the cross entropy loss function on the RGB image; The generator and the discriminator are used to perform image style mapping and image style discrimination on the RGB image respectively to obtain the third image.

5. The method according to claim 4, characterized in that The updating of the discriminator by predicting the cross entropy loss function on the RGB image includes: Obtain a prediction result by performing a cross entropy loss function prediction on the RGB image; Determine the resulting loss based on the predicted results and the actual results; The discriminator is updated according to the resulting loss.

6. The method according to claim 1, characterized in that The step of performing a dilation operation on the third image according to the semantic information to obtain a fourth image includes: Performing traversal processing on each pixel of the third image according to the semantic information; The maximum value of all pixels is adjusted so that the outline of the third image extends outward.

7. A device for fusing dual-camera visible light and infrared images, characterized in that: The device includes: An acquisition module, used to acquire an initial image group of dual cameras, wherein the initial image group includes two RGB images acquired at different cameras at the same time; A first processing module, configured to perform binocular stereo matching on the initial image group to obtain a homography matrix; A second processing module, configured to segment the initial image group according to the homography matrix to obtain a segmentation mask, and acquire semantic information of the segmentation mask; A third processing module, used for performing thermal image transformation on any RGB image in the initial image group to obtain a third image; a fourth processing module, configured to perform a dilation operation on the third image according to the semantic information to obtain a fourth image; A fusion module is used to determine a dual-camera non-aligned image according to the initial image group, the fourth image, the homography matrix and the semantic information.

8. The device according to claim 7, characterized in that The step of performing binocular stereo matching on the initial image group to obtain a homography matrix includes: Get two RGB images of the initial image group: Construct a linear equation based on the two RGB images: Solving the linear equations yields the homography matrix H: in, , and Two RGB images respectively and Elements of , , , , , , , are the elements in the homography matrix.

9. The device according to claim 7, characterized in that The step of segmenting the initial image group according to the homography matrix to obtain a segmentation mask includes: According to the homography matrix H, the initial image I is transformed into a transformed image after affine transformation. : The transformed image Input the SAM model for normalization and feature extraction to obtain the feature extraction layer; The feature extraction layer is segmented to obtain a segmentation mask.

10. The device according to claim 7, characterized in that The step of performing thermal image transformation on any one RGB image in the initial image group to obtain a third image includes: Set up the generator and discriminator; Updating the discriminator by performing adversarial training on the RGB image; Update the discriminator by predicting the cross entropy loss function on the RGB image; The generator and the discriminator are used to perform image style mapping and image style discrimination on the RGB image respectively to obtain the third image.

11. The device according to claim 10, characterized in that The updating of the discriminator by predicting the cross entropy loss function on the RGB image includes: Obtain a prediction result by performing a cross entropy loss function prediction on the RGB image; Determine the resulting loss based on the predicted results and the actual results; The discriminator is updated according to the resulting loss.

12. The device according to claim 7, characterized in that The step of performing a dilation operation on the third image according to the semantic information to obtain a fourth image includes: Performing traversal processing on each pixel of the third image according to the semantic information; The maximum value of all pixels is adjusted so that the outline of the third image extends outward.

Citation Information

Patent Citations

  • Method for constructing RGB-IR image pair data set of binocular vision and processor

    CN117853848A

  • Photovoltaic visible light and infrared image fusion method based on generative adversarial network

    CN117934307A

  • Training method and device for registration fusion of visible light and infrared images

    CN118365685A

  • Image correction method, apparatus and system, and electronic device

    WO2022135588A1