Method, device, equipment and medium for obtaining fusion ratio of HDR image

By generating the target fusion ratio image, the problem of HDR image storage space is solved, and efficient storage and user-friendly fusion ratio acquisition is achieved.

CN118628368BActive Publication Date: 2024-11-08AXERA SEMICON (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411080600.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-11-08
Estimated Expiration
2044-08-08

AI Technical Summary

Technical Problem

In the prior art, when acquiring the fusion ratio of HDR images, it is necessary to store the fusion ratio images of multiple SDR images, resulting in the storage device occupying more memory space.

Method used

By determining the fusion ratio of each pixel in multiple original images and generating a target fusion ratio image based on the correspondence of the color channel, only one target fusion ratio image needs to be stored to represent the fusion ratio of multiple original images.

Benefits of technology

It reduces the memory space occupied by the fusion ratio of HDR images, improves storage efficiency, and supports users to obtain the fusion ratio of HDR images in real time, improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628368B_ABST
    Figure CN118628368B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image processing technology, and discloses a method, device, equipment and medium for obtaining the fusion ratio of an HDR image. The method determines the fusion ratio corresponding to each pixel in multiple original images used for fusion to obtain an HDR image, determines the corresponding relationship between each original image and a color channel, and determines a target fusion ratio image corresponding to the fusion ratio based on the corresponding relationship between the original image and the color channel. The color channel value of the first pixel in the target fusion ratio image corresponds to the fusion ratio of the second pixel in the first original image, and the color channels of the first original image and the first pixel meet the above-mentioned corresponding relationship, and the position of the first pixel in the target fusion ratio image corresponds to the position of the second pixel in the first original image. Through the present application, each HDR image only needs to determine one target fusion ratio image to reduce the memory space occupied by storing the fusion ratio of the HDR image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method, device, equipment and medium for obtaining a fusion ratio of an HDR image. Background Art

[0002] High Dynamic Range (HDR) imaging technology is a processing technology used to improve image brightness and contrast. This technology can fuse multiple Standard Dynamic Range (SDR) images of the same scene with different exposures at different fusion ratios to obtain an HDR image. HDR images can provide more dynamic range and image details, and can better reflect the visual effects in the real environment to meet scene requirements.

[0003] When adjusting the image quality of the HDR image later or tracing the source of the problem when there is a problem with the fused image, it is necessary to use the fusion ratio corresponding to the multiple SDR images of the fused HDR image. Therefore, when fusing HDR images, it is necessary to store the fusion ratios corresponding to multiple SDR images in a storage device such as a memory or hard disk, so that the fusion ratio can be viewed through the storage device during tracing. At present, the fusion ratio is reflected by storing the fusion ratio image corresponding to each SDR. Although the above method can store the fusion ratio of the HDR image, each HDR image is fused by at least two SDR images, so it is necessary to store at least two fusion ratio images for each HDR image. When there are multiple HDR images, more fusion ratio images will be stored in the storage device, occupying more memory space. Summary of the invention

[0004] In view of this, embodiments of the present application provide a method, apparatus, device, and medium for obtaining a fusion ratio of an HDR image, so as to reduce the memory space occupied by storing the fusion ratio of the HDR image.

[0005] In a first aspect, an embodiment of the present application provides a method for obtaining a fusion ratio of an HDR image, the method comprising:

[0006] Determine the fusion ratio corresponding to each pixel in the multiple original images used to fuse to obtain the high dynamic range HDR image;

[0007] Determining the correspondence between the original image and the color channel, different original images correspond to different color channels;

[0008] Based on the corresponding relationship, a target fusion ratio image corresponding to the fusion ratio is determined, the color channel value of the first pixel in the target fusion ratio image corresponds to the fusion ratio of the second pixel in the first original image, the position of the first pixel in the target fusion ratio image corresponds to the position of the second pixel in the first original image, and the color channels of the first original image and the first pixel conform to the corresponding relationship.

[0009] In a possible implementation manner, determining, based on the corresponding relationship, a target fusion ratio image corresponding to the fusion ratio includes:

[0010] In response to an operation in which a user indicates a target area, a first image area in the target fusion ratio image is determined based on the corresponding relationship, a position of the first image area in the target fusion ratio image corresponds to a position indicated by the target area, a color channel value of a third pixel in the first image area corresponds to a fusion ratio of a fourth pixel in the second original image, a position of the third pixel in the first image area corresponds to a position of the fourth pixel in the second original image, and the color channels of the second original image and the third pixel meet the corresponding relationship;

[0011] Based on the HDR image, determining a second image area in the target fused ratio image, wherein content displayed in the second image area is the same as content displayed by pixels at corresponding positions in the HDR image;

[0012] The target fusion ratio image is determined based on the first image area and the second image area, and the first pixel is a pixel in the first image area.

[0013] In a possible implementation manner, determining, based on the corresponding relationship, a target fusion ratio image corresponding to the fusion ratio includes:

[0014] Based on the corresponding relationship, an initial fusion ratio image is generated, wherein the color channel value of the fifth pixel in the initial fusion ratio image corresponds to the fusion ratio of the sixth pixel in the third original image, the fifth pixel is any pixel in the initial fusion ratio image, the position of the fifth pixel in the initial fusion ratio image corresponds to the position of the sixth pixel in the third original image, and the color channels of the third original image and the fifth pixel meet the corresponding relationship;

[0015] In response to the user's operation of indicating a target area, the target area in the initial fused ratio image is used to replace the target area in the HDR image, and the replaced HDR image is the target fused ratio image.

[0016] In a possible implementation, in response to the user indicating the target area, determining the first image area in the target fused ratio image based on the corresponding relationship includes:

[0017] Based on the corresponding relationship, an initial fusion ratio image is generated, wherein the color channel value of the fifth pixel in the initial fusion ratio image corresponds to the fusion ratio of the sixth pixel in the third original image, the fifth pixel is any pixel in the initial fusion ratio image, the position of the fifth pixel in the initial fusion ratio image corresponds to the position of the sixth pixel in the third original image, and the color channels of the third original image and the fifth pixel meet the corresponding relationship;

[0018] A target area in the initial fusion ratio image is determined as the first image area.

[0019] In a possible implementation manner, determining, based on the HDR image, a second image region located in the target fusion ratio image includes:

[0020] Based on the operation and the HDR image, determine content displayed in other areas of the HDR image except the target area;

[0021] Based on the content, the second image region is generated, and a position of the second image region in the target fusion ratio image corresponds to a position of other regions of the HDR image.

[0022] In a possible implementation, the first original image includes at least two pixel blocks, each pixel block includes four pixels, and the corresponding relationship between the color channel value of the first pixel and the fusion ratio of the second pixel includes:

[0023] The color channel value of the first pixel is the fusion ratio of the second pixel; or,

[0024] The color channel value of the first pixel is an average value of the fusion ratios of four pixels in the pixel block where the second pixel is located.

[0025] In a possible implementation, determining the fusion ratio corresponding to each pixel in the plurality of original images used for fusion to obtain the high dynamic range HDR image includes:

[0026] The fusion ratio is calculated based on the exposure times corresponding to the multiple original images and the pixel values ​​in the original images.

[0027] In a possible implementation, calculating the fusion ratio based on the exposure times corresponding to the multiple original images and the pixel values ​​in the original images includes:

[0028] For any pixel in the original image, determine a weight corresponding to the pixel based on a magnitude relationship between a pixel value of the pixel and a pixel threshold;

[0029] For multiple groups of pixels to be processed in the multiple original images, based on the weights and exposure times corresponding to each pixel in any group of pixels to be processed, the fusion ratios corresponding to the pixels to be processed are calculated, and the positions of the pixels in the multiple original images in the pixels to be processed correspond to each other.

[0030] In a possible implementation, the target fused ratio image includes at least two pixel blocks, each pixel block includes four pixels, and color channels of the four pixels include a first channel, two second channels, and a third channel. When the plurality of original images include a fourth original image, a fifth original image, and a sixth original image, determining the correspondence between the original images and the color channels includes:

[0031] It is determined that the first channel corresponds to the fourth original image, it is determined that the two second channels correspond to the fifth original image, and it is determined that the third channel corresponds to the sixth original image.

[0032] In a possible implementation, the target fused ratio image includes at least two pixel blocks, each pixel block includes four pixels, and color channels of the four pixels include a first channel, two second channels, and a third channel. When the plurality of original images include a seventh original image and an eighth original image, determining the correspondence between the original images and the color channels includes:

[0033] It is determined that the first channel and the third channel correspond to the seventh original image, and it is determined that the two second channels correspond to the eighth original image.

[0034] In a possible implementation, the method further includes one or more of the following:

[0035] When the user turns on the visualization function, the target fusion ratio image is displayed; or,

[0036] When the user turns off the visualization function, the HDR image is displayed.

[0037] In a second aspect, an embodiment of the present application provides a device for obtaining a fusion ratio of an HDR image, the device comprising:

[0038] A first determining unit is used to determine a fusion ratio corresponding to each pixel in a plurality of original images used for fusion to obtain a high dynamic range HDR image;

[0039] A second determining unit is used to determine the correspondence between the original image and the color channel, where different original images correspond to different color channels;

[0040] A third determination unit is used to determine a target fusion ratio image corresponding to the fusion ratio based on the corresponding relationship, the color channel value of the first pixel in the target fusion ratio image corresponds to the fusion ratio of the second pixel in the first original image, the position of the first pixel in the target fusion ratio image corresponds to the position of the second pixel in the first original image, and the color channels of the first original image and the first pixel conform to the corresponding relationship.

[0041] In a third aspect, an embodiment of the present application provides a device for obtaining a fusion ratio of an HDR image, the device comprising: a memory and a processor;

[0042] The memory is used to store relevant program codes;

[0043] The processor is used to call the program code to execute the method for obtaining the fusion ratio of the HDR image as described in any one of the implementations of the first aspect above.

[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method for obtaining the fusion ratio of an HDR image as described in any one of the implementations of the first aspect above.

[0045] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program / instructions, and when the computer program / instructions are executed by a processor, the method for obtaining the fusion ratio of an HDR image as described in any one of the implementation methods of the first aspect above is implemented.

[0046] It can be seen that the embodiments of the present application have the following beneficial effects:

[0047] In the above implementation of the embodiment of the present application, the fusion ratio corresponding to each pixel in the multiple original images used for fusion to obtain the HDR image is first determined. Then the correspondence between each original image and the color channel is determined, wherein the color channel may include an R channel, a G channel, and a B channel, and different original images correspond to different color channels. Based on the correspondence between the original image and the color channel, the target fusion ratio image corresponding to the fusion ratio is determined. Among them, the color channel value of the first pixel in the target fusion ratio image corresponds to the fusion ratio of the second pixel in the first original image, and the color channel of the first original image and the first pixel conform to the above correspondence, and the position of the first pixel in the target fusion ratio image corresponds to the position of the second pixel in the first original image. Based on the method provided in the embodiment of the present application, by determining the correspondence between the multiple original images of the fused HDR image and the color channels respectively, only one target fusion ratio image can be determined for each HDR image, and this target fusion ratio image can represent the fusion ratio of the multiple original images, thereby reducing the memory space occupied by storing the fusion ratio of the HDR image. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. It is obvious that the drawings described below are only some embodiments provided in the present application, and a person skilled in the art can also obtain other drawings based on these drawings.

[0049] Figure 1 A schematic diagram of determining a fusion ratio image;

[0050] Figure 2 A flow chart of a method for obtaining a fusion ratio of an HDR image provided in an embodiment of the present application;

[0051] Figure 3 A flow chart of a method for determining a weight corresponding to a pixel provided in an embodiment of the present application;

[0052] Figure 4 A schematic diagram of an arrangement order of color channels provided in an embodiment of the present application;

[0053] Figure 5 A schematic diagram of determining a fusion ratio corresponding to a pixel provided in an embodiment of the present application;

[0054] Figure 6 A flow chart of a method for determining an image to be displayed provided in an embodiment of the present application;

[0055] Figure 7 A schematic diagram of a system for obtaining a fusion ratio of an HDR image provided in an embodiment of the present application;

[0056] Figure 8 A schematic diagram of a device for obtaining a fusion ratio of an HDR image provided in an embodiment of the present application;

[0057] Fig. 9 A schematic diagram of a device for obtaining a fusion ratio of an HDR image provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. The described embodiments are only exemplary implementation methods of the present application, not all implementation methods. Those skilled in the art can combine the embodiments of the present application to obtain other embodiments without creative work, and these embodiments are also within the scope of protection of the present application.

[0059] In order to provide more image details and dynamic range for the image, multiple SDR images of the same scene with different exposures can usually be fused at different fusion ratios (i.e., ratios) to obtain an HDR image. In order to clarify the problems existing in the prior art, the following discloses a method for determining the fusion ratio image in the prior art, see Figure 1 As shown, it is a schematic diagram of determining a fusion ratio image. Taking two SDR images, i.e., a first SDR image and a second SDR image, as an example, the fusion of an HDR image to obtain an HDR image, for the pixels at the same position in the two SDR images, i.e., pixel 1 in the first SDR image and pixel 2 in the second SDR image, the fusion ratio corresponding to pixel 1 and pixel 2 can be determined. Then, the pixel values ​​of the two pixels are fused according to the corresponding fusion ratio, i.e., the fusion ratio is used as the weight of the pixel value, and the sum of the products of the two pixel values ​​and the corresponding fusion ratio is calculated to obtain the pixel value of the pixel 3 at the corresponding position in the HDR image. The above calculation is performed for each group of pixels at the same position in the two SDR images, and the fusion ratio corresponding to each pixel in each SDR image can be obtained. Then, a fusion ratio image can be obtained for each SDR image, which are the first fusion ratio image and the second fusion ratio image, respectively, and each fusion ratio image includes the fusion ratio corresponding to each pixel in the corresponding SDR image.

[0060] When adjusting the image quality of the fused HDR image later, or tracing the source of the problem when a problem occurs in the fused HDR image, it is necessary to use the fusion ratio corresponding to the multiple SDR images of the fused HDR image. Therefore, when fusing HDR images, it is necessary to store the fusion ratio images corresponding to the multiple SDR images in a storage device such as a memory or hard disk, so that the fusion ratio images can be viewed through the storage device when tracing the source of the problem. Although the above method can store the fusion ratio of the HDR image, each HDR image is fused by at least two SDR images, and each SDR image corresponds to a fusion ratio image, so at least two fusion ratio images need to be stored for each HDR image. When there are multiple HDR images, more fusion ratio images will be stored in the storage device, occupying more memory space.

[0061] Based on this, an embodiment of the present application provides a method for obtaining a fusion ratio of an HDR image, so as to reduce the memory space occupied by storing the fusion ratio of the HDR image. The method will be described in detail below in conjunction with the drawings in the specification.

[0062] See also Figure 2 As shown, it is a flow chart of a method for obtaining the fusion ratio of an HDR image provided in an embodiment of the present application.

[0063] Optionally, the method may be performed by an image processing device. For example, the image processing device may be a semiconductor integrated circuit.

[0064] The method may include the following steps:

[0065] S201: Determine a fusion ratio corresponding to each pixel in a plurality of original images used for fusion to obtain an HDR image.

[0066] The HDR image in the embodiment of the present application can be obtained by fusing multiple original images. For example, the HDR image can be obtained by fusing two or three original images with different exposure times, so that the HDR image retains more color information under high exposure and richer dark information under low exposure. Among them, the original image can be an SDR image. For ease of understanding, the process of fusing to obtain the HDR image is first introduced below.

[0067] The image processing device obtains multiple original images with different exposures, wherein the original images can be obtained by shooting a shooting device, and the shooting device then sends the original images to the image processing device. After the image processing device obtains multiple original images, it can obtain the exposure time corresponding to each original image and the pixel value of each pixel in the original image, and then calculate the fusion ratio corresponding to each pixel in the multiple original images based on the exposure time corresponding to each original image and each pixel value in the original image.

[0068] In specific implementation, for any pixel in each original image, the weight corresponding to the pixel is determined based on the size relationship between the pixel value and the pixel threshold. The pixel threshold can represent the upper limit value of the pixel that meets the exposure requirement. That is, when the pixel value is greater than the pixel threshold, it indicates that the pixel corresponding to the pixel value is overexposed, and the pixel can be discarded during image fusion. When the pixel value is less than or equal to the pixel threshold, it indicates that the pixel corresponding to the pixel value is within a reasonable exposure range and meets the exposure requirement, and image fusion can be performed based on the pixel.

[0069] For the specific implementation process, please refer to Figure 3 As shown, it is a flow chart of a method for determining the weight corresponding to a pixel provided in an embodiment of the present application.

[0070] The method may include the following steps:

[0071] S301: Obtain pixel values ​​corresponding to pixels in the original image;

[0072] S302: Determine whether the pixel value is greater than a pixel threshold;

[0073] S303: If the pixel value is greater than the pixel threshold, the weight corresponding to the pixel is set to 0;

[0074] When the pixel value is greater than the pixel threshold, it indicates that the pixel corresponding to the pixel value is overexposed. The pixel can be discarded during image fusion by setting the weight corresponding to the pixel to 0.

[0075] S304: If the pixel value is less than or equal to the pixel threshold, the weight corresponding to the pixel is set to 1;

[0076] When the pixel value is less than or equal to the pixel threshold, it indicates that the pixel corresponding to the pixel value is within a reasonable exposure range, and the weight corresponding to the pixel can be set to 1 to perform image fusion based on the pixel.

[0077] S305: Determine whether all pixels in the original image have been traversed;

[0078] S306: If all pixels in the original image have been traversed, the process ends;

[0079] S307: If all pixels in the original image have not been traversed, the next pixel in the original image is obtained, and the process jumps to step S301.

[0080] Through the above steps, the weight corresponding to each pixel in the original image can be determined. When performing image fusion, the pixels at corresponding positions in multiple original images can be regarded as a group of pixels, for example Figure 1Pixel 1 and pixel 2 shown in the figure can obtain multiple groups of pixels to be processed of multiple original images. Based on the weight corresponding to each pixel in any group of pixels to be processed and the exposure time, the fusion ratio corresponding to each pixel in the pixels to be processed is calculated.

[0081] In a possible implementation, the weights corresponding to each pixel can be normalized using the exposure time. That is, for any pixel in a group of pixels to be processed, the product of the weight corresponding to the pixel and the exposure time is used as the numerator, and the sum of the products of the weights corresponding to each pixel and the exposure time is used as the denominator, and the ratio is calculated as the fusion ratio corresponding to the pixel.

[0082] Taking the fusion of two original images to obtain an HDR image as an example, the position of pixel 1 in the first original image corresponds to the position of pixel 2 in the second original image, then pixel 1 and pixel 2 are represented as a group of pixels to be processed, where the position of pixel 1 in the first original image corresponds to the position of pixel 2 in the second original image, which means that the pixel coordinates of pixel 1 in the first original image are the same as the pixel coordinates of pixel 2 in the second original image. The weight corresponding to pixel 1 in the first original image can be expressed as w1, and the corresponding exposure time is expressed as t1. The weight corresponding to pixel 2 in the second original image is expressed as w2, and the corresponding exposure time is expressed as t2. When calculating the fusion ratios corresponding to pixel 1 and pixel 2 respectively, it can be obtained by the following formula:

[0083] , ;

[0084] Among them, ratio1 represents the fusion ratio corresponding to pixel 1, and ratio2 represents the fusion ratio corresponding to pixel 2.

[0085] Similarly, when the HDR image is obtained by fusing three original images, the position of pixel 1 in the first original image corresponds to the position of pixel 2 in the second original image, and the position of pixel 3 in the third original image, then pixel 1, pixel 2, and pixel 3 are represented as a group of pixels to be processed. The weight corresponding to pixel 1 in the first original image is represented as w1, and the corresponding exposure time is represented as t1. The weight corresponding to pixel 2 in the second original image is represented as w2, and the corresponding exposure time is represented as t2. The weight corresponding to pixel 3 in the third original image is represented as w3, and the corresponding exposure time is represented as t3. When calculating the fusion ratios corresponding to pixel 1, pixel 2, and pixel 3 respectively, the following formula can be used to obtain:

[0086] , , ;

[0087] Among them, ratio1 represents the fusion ratio corresponding to pixel 1, ratio2 represents the fusion ratio corresponding to pixel 2, and ratio3 represents the fusion ratio corresponding to pixel 3.

[0088] After calculating the fusion ratio corresponding to each pixel in the multiple original images by the above method, for any group of pixels to be processed in the multiple original images, multiple pixel values ​​in the group of pixels to be processed are fused according to the corresponding fusion ratio, that is, the sum of the products of multiple pixel values ​​and the corresponding fusion ratio is calculated, and the pixel values ​​of the pixels at the corresponding positions in the HDR image can be obtained. The fused pixel values ​​are calculated for each group of pixels to be processed by the above method, thereby obtaining a fused HDR image. Among them, the HDR image has the same size as the original image, that is, it includes the same number of pixels.

[0089] In a possible implementation, when the fusion ratios corresponding to a group of pixels to be processed in multiple original images are small, in order to avoid the pixel value of the fused HDR image being too small and the image being too dark, the fusion ratios corresponding to a group of pixels to be processed can be increased by the same proportion to improve the brightness of the HDR image.

[0090] Optionally, when the fusion ratio ratio1 corresponding to pixel 1 is 1, and the fusion ratios ratio2 and ratio3 corresponding to pixel 2 and pixel 3 are both 0, the pixel values ​​corresponding to pixel 1, pixel 2, and pixel 3 are fused according to the fusion ratio to obtain the pixel values ​​of the pixels at corresponding positions in the HDR image, and the pixel value of the HDR image can be determined to be the pixel value of pixel 1.

[0091] S202: Determine the correspondence between the original image and the color channel, where different original images correspond to different color channels.

[0092] Optionally, the original image and the HDR image obtained by fusion can be images in Bayer format, and the target fusion ratio image can also be obtained based on the image in Bayer format. The image in Bayer format includes at least two pixel blocks, each pixel block includes four pixels, and the color channels of the four pixels can include a first channel, two second channels and a third channel. Among them, the color channels of the four pixels can be expressed as an R channel, two G channels and a B channel. In this case, the first channel is an R channel, the second channel is a G channel, and the third channel is a B channel. Of course, in the present application, the first channel, the second channel and the third channel can also be other channels, for example, the first channel is a B channel, the second channel is a G channel, and the third channel is a G channel. Among them, the arrangement order of the four color channels is not limited in the embodiment of the present application.

[0093] See also Figure 4FIG. 1 is a schematic diagram of an arrangement order of color channels provided in an embodiment of the present application. Figure 4 It can be seen that the arrangement order of the four color channels can be R channel-G channel-G channel-B channel, or B channel-G channel-G channel-R channel, or G channel-R channel-B channel-G channel, or G channel-B channel-R channel-G channel.

[0094] In order to generate the target fusion ratio image corresponding to the HDR image, the correspondence between the original image and the color channel can be established in advance, and different original images correspond to different color channels. Therefore, the fusion ratio of the pixels in the original image corresponding to each color channel can also be determined, so as to determine the target fusion ratio image corresponding to the fusion ratio of multiple original images. The following will introduce how to determine the correspondence between the original image and the color channel in combination with different application scenarios. For the convenience of explanation, the fourth original image, the fifth original image, the sixth original image, the seventh original image, and the eighth original image are first introduced.

[0095] In a possible application scenario, three original images can be used to fuse to obtain an HDR image, and the three original images are respectively represented as a fourth original image, a fifth original image, and a sixth original image. When determining the correspondence between the original image and the color channel, it can be determined that the first channel corresponds to the fourth original image, the two second channels correspond to the fifth original image, and the third channel corresponds to the sixth original image. It should be noted that the correspondence between the fourth original image, the fifth original image, the sixth original image and the first channel, the second channel, and the third channel provided in the above embodiment is only an exemplary description, and is not limited to the above implementation method, and it is sufficient to ensure that the color channels corresponding to different original images are different. For example, it can also be determined that the fourth original image corresponds to the two second channels, or that the sixth original image corresponds to the two second channels, which does not affect the implementation of the embodiment of the present application and will not be introduced here.

[0096] In another possible application scenario, two original images can be fused to obtain an HDR image, and the two original images are respectively represented as the seventh original image and the eighth original image. When determining the correspondence between the original images and the color channels, it can be determined that the first channel and the third channel correspond to the seventh original image, and the two second channels correspond to the eighth original image. Alternatively, it can also be determined that the first channel and the third channel correspond to the eighth original image, and the two second channels correspond to the seventh original image, which does not affect the implementation of the embodiments of the present application.

[0097] S203: Determine a target fusion ratio image corresponding to the fusion ratio based on the correspondence between the original image and the color channel.

[0098] After the correspondence between the original image and the color channel is determined, the target fusion ratio image corresponding to the fusion ratio of each pixel in the original image, that is, the target fusion ratio image corresponding to the HDR image, can be determined. The target fusion ratio image can be used to represent the fusion ratio of the HDR image obtained by fusion.

[0099] The target fused ratio image can be represented as an image in Bayer format, that is, including a first channel, a second channel, and a third channel, and the target fused ratio image has the same size as the original image and the HDR image. When determining the target fused ratio image, it can be understood that the arrangement order of the color channels in the multiple pixel blocks of the target fused ratio image has been determined, and then the target fused ratio image can be determined based on the pre-established correspondence between the original image and the color channel.

[0100] For the first pixel in the target fused ratio image, firstly, based on the established correspondence between the original image and the color channel, the original image corresponding to the color channel of the first pixel, that is, the first original image, is determined. Then, based on the position of the first pixel in the target fused ratio image, the second pixel at the corresponding position in the first original image is determined, so as to determine the color channel value of the first pixel based on the fusion ratio corresponding to the second pixel in the first original image. In other words, the color channels of the first pixel in the first original image and the target fused ratio image conform to the correspondence, and the position of the first pixel in the target fused ratio image corresponds to the position of the second pixel in the first original image. Among them, the "second pixel at the corresponding position in the first original image" and "the position of the first pixel in the target fused ratio image corresponds to the position of the second pixel in the first original image" described in the above embodiments indicate that the pixel coordinates of the first pixel in the target fused ratio image are the same as the pixel coordinates of the second pixel in the first original image.

[0101] Optionally, the first pixel may be a pixel of a region of interest to the user in the target fusion ratio image, that is, the user may specify a target region in the target fusion ratio image, and the image processing device displays the fusion ratio corresponding to the pixel of the target region according to the target region specified by the user.

[0102] According to the above embodiment, the first original image and the target fusion ratio image both include at least two pixel blocks, and each pixel block includes four pixels. In a possible implementation, when the color channel value of the first pixel is determined based on the fusion ratio corresponding to the second pixel in the first original image, it can be determined that the color channel value of the first pixel is the fusion ratio of the second pixel. Through this method, the fusion ratio corresponding to each pixel in the target fusion ratio image can be determined more quickly, thereby improving the speed of determining the target fusion ratio image.

[0103] Optionally, the color channel value of the first pixel can also be determined as the average value of the fusion ratios of the four pixels in the pixel block where the second pixel is located. That is to say, after the second pixel is determined in the first original image, the pixel block where the second pixel is located can be determined, and the fusion ratios corresponding to the four pixels of the pixel block can be obtained, and then the average value of the four fusion ratios is calculated and determined as the color channel value of the first pixel. Through this method, the fusion ratio corresponding to each pixel in the target fusion ratio image can be determined more accurately, thereby improving the accuracy of the target fusion ratio image. The following can be introduced in conjunction with a specific application scenario.

[0104] See also Figure 5 As shown, it is a schematic diagram of determining the fusion ratio corresponding to a pixel provided by an embodiment of the present application. Taking any pixel block in the target fusion ratio image as an example, in this application scenario, the color channel of the first pixel has a corresponding relationship with the first original image, and the position of the first pixel in the target fusion ratio image corresponds to the position of the second pixel in the first original image. The fusion ratio corresponding to the second pixel in the first original image can be expressed as ratio1, and the fusion ratios corresponding to the remaining three pixels in the pixel block where the second pixel is located are expressed as ratio2 (i.e., fusion ratio 2), ratio3 (i.e., fusion ratio 3), and ratio4 (i.e., fusion ratio 4). Then the color channel value of the first pixel can be expressed as ratio1, or it can be expressed as (ratio1+ ratio2+ratio3+ratio4) / 4.

[0105] In the embodiment of the present application, the target fusion ratio image can be determined in two ways, one is to replace the target area specified by the user on the basis of the HDR image, and the other is to generate the image area constituting the target fusion ratio image. The following will specifically introduce different implementation methods. For the convenience of explanation, the fifth pixel and the sixth pixel are first introduced.

[0106] (a) Replace the user-specified target area based on the HDR image.

[0107] The method can be implemented through steps A1-A2:

[0108] A1: Generate an initial fused scale image based on the correspondence between the original image and the color channels.

[0109] The initial fused ratio image can be represented as an image in Bayer format, that is, including a first channel, a second channel, and a third channel, and the size of the initial fused ratio image is the same as that of the original image and the HDR image. When generating the initial fused ratio image, it can be understood that the arrangement order of the first channel, the second channel, and the third channel of the pixel block in the initial fused ratio image has been determined, and then the initial fused ratio image can be determined based on the pre-established correspondence between the original image and the color channel.

[0110] For any pixel in the initial fusion ratio image, that is, the fifth pixel, based on the pre-established correspondence between the original image and the color channel, determine the original image corresponding to the color channel of the fifth pixel, that is, the third original image. Then, based on the position of the fifth pixel in the initial fusion ratio image, determine the sixth pixel at the corresponding position in the third original image, so as to determine the color channel value of the fifth pixel based on the fusion ratio corresponding to the sixth pixel in the third original image. In other words, the color channel of the fifth pixel in the third original image and the initial fusion ratio image conforms to the correspondence, and the position of the fifth pixel in the initial fusion ratio image corresponds to the position of the sixth pixel in the third original image. Through this method, the fusion ratio corresponding to each pixel in the initial fusion ratio image can be determined, and the initial fusion ratio image is obtained.

[0111] It should be noted that the principle of determining the color channel value of the fifth pixel based on the fusion ratio corresponding to the sixth pixel in the third original image is the same as the principle of determining the color channel value of the first pixel based on the fusion ratio corresponding to the second pixel in the first original image in the above embodiment. The specific implementation method can be found in the above embodiment and will not be elaborated here.

[0112] A2: In response to the user's operation of indicating the target area, the target area in the initial fusion ratio image is used to replace the target area in the HDR image, and the replaced HDR image is the target fusion ratio image.

[0113] After the HDR image is obtained by fusion, the user can obtain the fusion ratio corresponding to the pixels of the target area in the HDR image by indicating the operation of the target area. Among them, the image processing device can determine the target area by receiving the pixel coordinates input by the user. For example, when the target area indicated by the user is a rectangular area, the user can enter the pixel coordinates of the four vertices of the rectangular area in the image processing device. The image processing device determines the position and size of the rectangular area based on the pixel coordinates of the four vertices. Alternatively, the user can enter the pixel coordinates of the two diagonal vertices of the matrix area in the image processing device, so that the image processing device can determine the position and size of the matrix area based on the pixel coordinates of the two diagonal vertices. Since the sizes of the initial fusion ratio image, the original image, and the HDR image are the same, the positions of the target area indicated by the user in the initial fusion ratio image, the original image, and the HDR image correspond to each other.

[0114] When the user indicates the target area, the image processing device can obtain the content displayed by the target area in the initial fusion ratio image, that is, the fusion ratio corresponding to the pixels of the target area, and then use the content displayed by the target area in the initial fusion ratio image to replace the target area in the HDR image, and the replaced HDR image is the target fusion ratio image. In other words, in the target fusion ratio image, only the target area indicated by the user displays the content corresponding to the pixel, and other areas except the target area display the content of the HDR image. Optionally, when the target area indicated by the user is the entire image, the target fusion ratio image displays the fusion ratio corresponding to each pixel in the HDR image.

[0115] Through the method provided in the above embodiment, for the HDR image obtained by fusing multiple original images, only one target fusion ratio image can be generated. Compared with the prior art that stores at least two fusion ratio images for HDR images, the target fusion ratio image of the HDR image stored in the embodiment of the present application can reduce the occupied memory space. In addition, based on the operation of the user indicating the target area, the embodiment of the present application can only display the fusion ratio in the area of ​​interest to the user, so that the user can obtain the fusion ratio of the HDR image in real time and improve the user experience.

[0116] In the above embodiment, a first method of determining a target fusion ratio image by replacing a user-specified target area based on an HDR image is introduced. The following will introduce a second method of determining a target fusion ratio image by generating image areas constituting the target fusion ratio image.

[0117] (ii) Generate image regions that make up the target fused scale image.

[0118] The method can be implemented through steps B1-B3:

[0119] B1: In response to the user's operation of indicating the target area, a first image area in the target fused ratio image is determined based on the correspondence between the original image and the color channel.

[0120] In this embodiment, the target fused ratio image can be determined by generating two image regions constituting the target fused ratio image, namely, the first image region and the second image region. The position of the first image region in the target fused ratio image corresponds to the position indicated by the target region, and the second image region represents other regions in the target fused ratio image except the position indicated by the target region. In other words, the first image region represents the region of interest to the user in the target fused ratio image, and the first pixel in the target fused ratio image can be a pixel in the first image region.

[0121] The first image area can be represented as an image in Bayer format, that is, including a first channel, a second channel, and a third channel. When generating the first image area, it can be understood that the arrangement order of the first channel, the second channel, and the third channel in the pixel block of the first image area has been determined, and then the first image area can be determined based on the pre-established correspondence between the original image and the color channel.

[0122] For any pixel in the first image area, i.e., the third pixel, based on the pre-established correspondence between the original image and the color channel, the original image corresponding to the color channel of the third pixel, i.e., the second original image, is determined. Then, based on the position of the third pixel in the first image area, the fourth pixel at the corresponding position in the second original image is determined, thereby determining the color channel value of the third pixel based on the fusion ratio corresponding to the fourth pixel in the second original image. In other words, the color channels of the second original image and the third pixel are in a corresponding relationship, the position of the third pixel in the first image area corresponds to the position of the fourth pixel in the second original image, and the color channel value of the third pixel in the first image area corresponds to the fusion ratio of the fourth pixel in the second original image.

[0123] It should be noted that the principle of determining the color channel value of the third pixel based on the fusion ratio corresponding to the fourth pixel in the second original image is the same as the principle of determining the color channel value of the first pixel based on the fusion ratio corresponding to the second pixel in the first original image in the above embodiment. The specific implementation method can be found in the above embodiment and will not be elaborated here.

[0124] In a possible implementation, the first image area can be determined in the following manner: first, based on the correspondence between the original image and the color channel, an initial fusion ratio image is generated. The principle of generating the initial fusion ratio image is the same as the principle of generating the initial fusion ratio image in the above embodiment. Specifically, for any pixel in the initial fusion ratio image, i.e., the fifth pixel, based on the pre-established correspondence between the original image and the color channel, the original image corresponding to the color channel of the fifth pixel, i.e., the third original image, is determined. Then, based on the position of the fifth pixel in the initial fusion ratio image, the sixth pixel at the corresponding position in the third original image is determined, so that the color channel value of the fifth pixel is determined as the fusion ratio corresponding to the sixth pixel in the third original image. That is, the third original image and the color channel of the fifth pixel in the initial fusion ratio image are in a corresponding relationship, and the position of the fifth pixel in the initial fusion ratio image corresponds to the position of the sixth pixel in the third original image. After the initial fusion ratio image is generated, the target area in the initial fusion ratio image is determined to be the first image area, that is, the first image area is determined according to the content (fusion ratio) displayed by the pixels of the target area in the initial fusion ratio image.

[0125] B2: Based on the HDR image, determine a second image region in the target fusion ratio image.

[0126] In a specific implementation, based on the user's operation of indicating the target area, the content displayed in other areas of the HDR image except the target area can be determined, and then based on the content displayed in the other areas, the second image area is generated. In other words, the content displayed in the second image area is the same as the content displayed by the pixels at the corresponding position in the HDR image, and the position of the second image area in the target fusion ratio image corresponds to the position of other areas of the HDR image.

[0127] B3: Determine a target fusion ratio image based on the first image area and the second image area.

[0128] After the first image region and the second image region are generated, the target fused ratio image is composed by using the first image region and the second image region.

[0129] In the above-mentioned embodiments of the present application, two implementation methods for determining the target fusion ratio image are introduced. Based on the method provided in the embodiments of the present application, by determining the correspondence between multiple original images and color channels of the fused HDR image, only one target fusion ratio image can be determined for each HDR image, thereby reducing the memory space occupied by storing the fusion ratio of the HDR image. And based on the user's operation, the fusion ratio can be displayed only in the area of ​​interest to the user in the target fusion ratio image, and the content of the HDR image can also be displayed in other areas, so that the user can view the fusion ratio of the HDR image in real time, improving the user experience.

[0130] In a possible implementation, a visualization function may be added to the image processing device, and the visualization function is used to determine whether to display a target fusion ratio image or an HDR image. That is, the image processing device may determine whether to obtain a target fusion ratio image by whether to turn on the visualization function of the image processing device, and whether the image processing device turns on the visualization function of the image processing device may be determined based on the received user operation. Specifically, when the image processing device receives an operation from the user to turn on the visualization function, the image processing device may display the target fusion ratio image, that is, the target fusion ratio image may be displayed to the user through the front-end page; when the image processing device receives an operation from the user to turn off the visualization function, the image processing device does not display the fusion ratio corresponding to the HDR image, but only displays the HDR image, that is, the HDR image is displayed to the user through the front-end page.

[0131] See also Figure 6 As shown, it is a flow chart of a method for determining an image to be displayed provided in an embodiment of the present application.

[0132] S601: Determine whether the user turns on the visualization function;

[0133] S602: If the user does not enable the visualization function, the HDR image is displayed and the process ends;

[0134] S603: If the user turns on the visualization function, determine whether the current pixel of the image to be displayed is within the target area indicated by the user;

[0135] S604: If the current pixel of the image to be displayed is within the target area indicated by the user, display the fusion ratio corresponding to the pixel;

[0136] S605: If the current pixel of the image to be displayed is not within the target area indicated by the user, display the content of the pixel corresponding to the pixel in the HDR image;

[0137] S606: Determine whether all pixels of the image to be displayed have been traversed;

[0138] S607: If all pixels of the image to be displayed have been traversed, the process ends;

[0139] S608: If all pixels of the image to be displayed have not been traversed, the next pixel of the image to be displayed is obtained, and the process jumps to step S603.

[0140] When the image processing device receives the user's operation of starting the visualization function, the image to be displayed determined by the image processing device is the target fusion ratio image.

[0141] Through the above method, the image processing device can display the HDR image or the target fusion ratio image corresponding to the HDR image according to whether it receives the operation of turning on the visualization function. While displaying the fusion ratio of the HDR image for the user, it also increases the optionality of user operation and improves the user experience.

[0142] Based on the above method embodiment, the present application embodiment also provides a system for obtaining the fusion ratio of HDR images. Figure 7 , which is a schematic diagram of a system for obtaining a fusion ratio of an HDR image provided in an embodiment of the present application.

[0143] The system may include: a fusion module 701, a visualization image generation module 702, and a gating module 703;

[0144] The fusion module 701 is used to calculate the fusion ratio corresponding to each pixel in the multiple original images; and fuse the multiple original images based on the fusion ratio to obtain an HDR image;

[0145] A visualization image generation module 702 is used to determine the correspondence between the original image and the color channel and generate an initial fusion ratio image;

[0146] The gating module 703 is used to determine the target area of ​​the image to be displayed based on the target area of ​​the initial fused ratio image when the user starts the visualization function; and determine the other areas of the image to be displayed except the target area based on the other areas of the HDR image except the target area.

[0147] The specific implementation principles of the fusion module 701, the visualization image generation module 702, and the gating module 703 can be found in the above method embodiments, which will not be described in detail here.

[0148] Based on the above method embodiment and system embodiment, the present application embodiment also provides a device for obtaining the fusion ratio of an HDR image. Figure 8 , which is a schematic diagram of a device for obtaining a fusion ratio of an HDR image provided in an embodiment of the present application.

[0149] The apparatus 800 may include:

[0150] The first determining unit 801 is used to determine the fusion ratio corresponding to each pixel in a plurality of original images used for fusion to obtain a high dynamic range HDR image;

[0151] A second determining unit 802 is used to determine the correspondence between the original image and the color channel, where different original images correspond to different color channels;

[0152] The third determination unit 803 is used to determine a target fusion ratio image corresponding to the fusion ratio based on the corresponding relationship, the color channel value of the first pixel in the target fusion ratio image corresponds to the fusion ratio of the second pixel in the first original image, the position of the first pixel in the target fusion ratio image corresponds to the position of the second pixel in the first original image, and the color channels of the first original image and the first pixel conform to the corresponding relationship.

[0153] In a possible implementation, the third determination unit 803 is specifically used to determine, in response to an operation of indicating a target area by a user, a first image area in the target fused ratio image based on the corresponding relationship, the position of the first image area in the target fused ratio image corresponds to the position indicated by the target area, the color channel value of the third pixel in the first image area corresponds to the fusion ratio of the fourth pixel in the second original image, the position of the third pixel in the first image area corresponds to the position of the fourth pixel in the second original image, and the color channels of the second original image and the third pixel conform to the corresponding relationship; determine, based on the HDR image, a second image area in the target fused ratio image, the content displayed by the second image area being the same as the content displayed by the pixel at the corresponding position in the HDR image; determine, based on the first image area and the second image area, the target fused ratio image, the first pixel being a pixel in the first image area.

[0154] In a possible implementation, the third determination unit 803 is specifically used to generate an initial fusion ratio image based on the correspondence, the color channel value of the fifth pixel in the initial fusion ratio image corresponds to the fusion ratio of the sixth pixel in the third original image, the fifth pixel is any pixel in the initial fusion ratio image, the position of the fifth pixel in the initial fusion ratio image corresponds to the position of the sixth pixel in the third original image, and the color channels of the third original image and the fifth pixel conform to the correspondence; in response to the user's operation of indicating the target area, the target area in the HDR image is replaced with the target area in the initial fusion ratio image, and the replaced HDR image is the target fusion ratio image.

[0155] In a possible implementation, the third determination unit 803 is specifically used to generate an initial fusion ratio image based on the correspondence, the color channel value of the fifth pixel in the initial fusion ratio image corresponds to the fusion ratio of the sixth pixel in the third original image, the fifth pixel is any pixel in the initial fusion ratio image, the position of the fifth pixel in the initial fusion ratio image corresponds to the position of the sixth pixel in the third original image, and the color channels of the third original image and the fifth pixel conform to the correspondence; determine that the target area in the initial fusion ratio image is the first image area.

[0156] In a possible implementation, the third determination unit 803 is specifically used to determine, based on the operation and the HDR image, the content displayed in other areas of the HDR image except the target area; based on the content, generate the second image area, and the position of the second image area in the target fusion ratio image corresponds to the position of other areas of the HDR image.

[0157] In a possible implementation, the first original image includes at least two pixel blocks, each pixel block includes four pixels, and the correspondence between the color channel value of the first pixel and the fusion ratio of the second pixel includes: the color channel value of the first pixel is the fusion ratio of the second pixel; or, the color channel value of the first pixel is the average value of the fusion ratios of four pixels in the pixel block where the second pixel is located.

[0158] In a possible implementation, the first determining unit 801 is specifically configured to calculate the fusion ratio based on exposure times corresponding to the multiple original images and respective pixel values ​​in the original images.

[0159] In a possible implementation, the first determination unit 801 is specifically used to determine, for any pixel in the original image, a weight corresponding to the pixel based on the relationship between the pixel value and the pixel threshold; for multiple groups of pixels to be processed of multiple original images, based on the weights corresponding to each pixel in any group of pixels to be processed and the exposure time, calculate the fusion ratio corresponding to the pixels to be processed, and the positions of the pixels of the multiple original images in the pixels to be processed correspond.

[0160] In a possible implementation, the target fused ratio image includes at least two pixel blocks, each pixel block includes four pixels, and the color channels of the four pixels include a first channel, two second channels and a third channel. When the multiple original images include a fourth original image, a fifth original image and a sixth original image, the second determination unit 802 is specifically used to determine that the first channel corresponds to the fourth original image, determine that the two second channels correspond to the fifth original image, and determine that the third channel corresponds to the sixth original image.

[0161] In a possible implementation, the target fused ratio image includes at least two pixel blocks, each pixel block includes four pixels, and the color channels of the four pixels include a first channel, two second channels and a third channel. When the multiple original images include a seventh original image and an eighth original image, the second determination unit 802 is specifically used to determine that the first channel and the third channel correspond to the seventh original image, and determine that the two second channels correspond to the eighth original image.

[0162] In a possible implementation, the method further includes a display unit, configured to display the target fusion ratio image when a user turns on a visualization function; or to display the HDR image when a user turns off the visualization function.

[0163] Based on the above method embodiment and device embodiment, the present application embodiment further provides a device for obtaining a fusion ratio of an HDR image, which will be described below in conjunction with the accompanying drawings.

[0164] See also Fig. 9 , Fig. 9 A schematic diagram of a device for obtaining a fusion ratio of an HDR image provided in an embodiment of the present application.

[0165] The device 900 includes: a memory 901 and a processor 902;

[0166] The memory 901 is used to store relevant program codes;

[0167] The processor 902 is used to call the program code to execute the method for obtaining the fusion ratio of the HDR image described in the above method embodiment.

[0168] In addition, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method for obtaining the fusion ratio of the HDR image described in the above method embodiment.

[0169] An embodiment of the present application also provides a computer program product, which includes a computer program / instruction. When the computer program / instruction is executed by a processor, the method for obtaining the fusion ratio of an HDR image as described in any one of the implementations of the first aspect above is implemented.

[0170] It should be noted that the technical features of the higher-level means provided in the embodiments of the present application are clear to those skilled in the art, and the problems to be solved by the higher-level means are also clear. The means for obtaining the corresponding features can be selected by those skilled in the art according to specific implementation requirements. The means provided in this application should not be regarded as a limitation on the solution or as the only means of implementation.

[0171] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can refer to each other. In particular, for the system or device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only exemplary, in which the units or modules described as separate components may or may not be physically separated, and the components displayed as units or modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units, and some or all of the units or modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0172] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the method, device and equipment etc. of various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0173] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0174] It should also be noted that, in this application, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0175] The steps of the method or algorithm described in conjunction with the embodiments disclosed in this application can be implemented directly by hardware, software modules executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0176] The above description of the disclosed embodiments enables professionals and technicians in the field to implement or use the present application. Various modifications to these embodiments will be apparent to professionals and technicians in the field, and the general principles defined in this application can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown in the present application, but will conform to the widest range consistent with the principles and novel features disclosed in the present application.

Claims

1. A method for obtaining a fusion ratio of an HDR image, characterized in that: The method comprises: Determine the fusion ratio corresponding to each pixel in the multiple original images used to fuse to obtain the high dynamic range HDR image; Determine the correspondence between the original image and the color channel, different original images correspond to different color channels; Based on the corresponding relationship, a target fusion ratio image corresponding to the fusion ratio is determined, the color channel value of a first pixel in the target fusion ratio image corresponds to the fusion ratio of a second pixel in the first original image, the position of the first pixel in the target fusion ratio image corresponds to the position of the second pixel in the first original image, and the color channels of the first original image and the first pixel meet the corresponding relationship; The target fused ratio image includes at least two pixel blocks, each pixel block includes four pixels, and the color channels of the four pixels include a first channel, two second channels and a third channel; Determining the correspondence between the original image and the color channel includes: When the plurality of original images include a fourth original image, a fifth original image, and a sixth original image, determining that the first channel corresponds to the fourth original image, determining that the two second channels correspond to the fifth original image, and determining that the third channel corresponds to the sixth original image; Alternatively, when the plurality of original images include a seventh original image and an eighth original image, it is determined that the first channel and the third channel correspond to the seventh original image, and it is determined that the two second channels correspond to the eighth original image.

2. The method according to claim 1, characterized in that: The determining, based on the corresponding relationship, a target fusion ratio image corresponding to the fusion ratio includes: In response to an operation in which a user indicates a target area, a first image area in the target fusion ratio image is determined based on the corresponding relationship, a position of the first image area in the target fusion ratio image corresponds to a position indicated by the target area, a color channel value of a third pixel in the first image area corresponds to a fusion ratio of a fourth pixel in the second original image, a position of the third pixel in the first image area corresponds to a position of the fourth pixel in the second original image, and the color channels of the second original image and the third pixel meet the corresponding relationship; Based on the HDR image, determining a second image area in the target fused ratio image, wherein content displayed in the second image area is the same as content displayed by pixels at corresponding positions in the HDR image; The target fusion ratio image is determined based on the first image area and the second image area, and the first pixel is a pixel in the first image area.

3. The method according to claim 1, characterized in that The determining, based on the corresponding relationship, a target fusion ratio image corresponding to the fusion ratio includes: Based on the corresponding relationship, an initial fusion ratio image is generated, wherein the color channel value of the fifth pixel in the initial fusion ratio image corresponds to the fusion ratio of the sixth pixel in the third original image, the fifth pixel is any pixel in the initial fusion ratio image, the position of the fifth pixel in the initial fusion ratio image corresponds to the position of the sixth pixel in the third original image, and the color channels of the third original image and the fifth pixel meet the corresponding relationship; In response to the user's operation of indicating a target area, the target area in the initial fused ratio image is used to replace the target area in the HDR image, and the replaced HDR image is the target fused ratio image.

4. The method according to claim 2, characterized in that: In response to the user indicating the target area, determining the first image area in the target fused ratio image based on the corresponding relationship includes: Based on the corresponding relationship, an initial fusion ratio image is generated, wherein the color channel value of the fifth pixel in the initial fusion ratio image corresponds to the fusion ratio of the sixth pixel in the third original image, the fifth pixel is any pixel in the initial fusion ratio image, the position of the fifth pixel in the initial fusion ratio image corresponds to the position of the sixth pixel in the third original image, and the color channels of the third original image and the fifth pixel meet the corresponding relationship; A target area in the initial fusion ratio image is determined as the first image area.

5. The method according to claim 2, characterized in that: The determining, based on the HDR image, a second image region located in the target fusion ratio image comprises: Based on the operation and the HDR image, determine content displayed in other areas of the HDR image except the target area; Based on the content, the second image region is generated, and a position of the second image region in the target fusion ratio image corresponds to a position of other regions of the HDR image.

6. The method according to claim 1, characterized in that The first original image includes at least two pixel blocks, each pixel block includes four pixels, and the corresponding relationship between the color channel value of the first pixel and the fusion ratio of the second pixel includes: The color channel value of the first pixel is the fusion ratio of the second pixel; or, The color channel value of the first pixel is an average value of the fusion ratios of four pixels in the pixel block where the second pixel is located.

7. The method according to claim 1, characterized in that The determining of the fusion ratio corresponding to each pixel in the plurality of original images used for fusion to obtain the high dynamic range HDR image includes: The fusion ratio is calculated based on the exposure times corresponding to the multiple original images and the pixel values ​​in the original images.

8. The method according to claim 7, characterized in that The calculating the fusion ratio based on the exposure times corresponding to the plurality of original images and the pixel values ​​in the original images includes: For any pixel in the original image, determine a weight corresponding to the pixel based on a magnitude relationship between a pixel value of the pixel and a pixel threshold; For multiple groups of pixels to be processed in the multiple original images, based on the weights and exposure times corresponding to each pixel in any group of pixels to be processed, the fusion ratios corresponding to the pixels to be processed are calculated, and the positions of the pixels in the multiple original images in the pixels to be processed correspond to each other.

9. The method according to any one of claims 1 to 8, characterized in that: The method may further include one or more of the following: When the user turns on the visualization function, the target fusion ratio image is displayed; or, When the user turns off the visualization function, the HDR image is displayed.

10. A device for obtaining a fusion ratio of an HDR image, characterized in that: The device comprises: A first determining unit is used to determine a fusion ratio corresponding to each pixel in a plurality of original images used for fusion to obtain a high dynamic range HDR image; A second determining unit is used to determine the correspondence between the original image and the color channel, where different original images correspond to different color channels; A third determining unit is used to determine, based on the corresponding relationship, a target fusion ratio image corresponding to the fusion ratio, a color channel value of a first pixel in the target fusion ratio image corresponds to a fusion ratio of a second pixel in a first original image, a position of the first pixel in the target fusion ratio image corresponds to a position of the second pixel in the first original image, and the color channels of the first original image and the first pixel meet the corresponding relationship; The target fused ratio image includes at least two pixel blocks, each pixel block includes four pixels, and the color channels of the four pixels include a first channel, two second channels and a third channel; The second determination unit is specifically used to, when the multiple original images include a fourth original image, a fifth original image, and a sixth original image, determine that the first channel corresponds to the fourth original image, determine that the two second channels correspond to the fifth original image, and determine that the third channel corresponds to the sixth original image; or, when the multiple original images include a seventh original image and an eighth original image, determine that the first channel and the third channel correspond to the seventh original image, and determine that the two second channels correspond to the eighth original image.

11. A device for obtaining a fusion ratio of an HDR image, characterized in that: The device comprises: a memory and a processor; The memory is used to store relevant program codes; The processor is used to call the program code to execute the method for obtaining the fusion ratio of the HDR image according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method for obtaining a fusion ratio of an HDR image according to any one of claims 1 to 9.