A single-frame exposure image HDR enhancement method and device based on multi-dimensional mapping

HDR enhancement is achieved in single-frame exposure images through multi-dimensional mapping technology, which solves the problems of high hardware performance and motion ghosting required for multi-frame exposure image synthesis, optimizes image brightness and contrast, reduces resource requirements, and improves image quality.

CN118411319BActive Publication Date: 2024-10-11JIANGSU PEREGRINE MICROELECTRONICS CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing HDR technology requires high hardware performance and causes ghosting of moving images through multi-frame exposure image synthesis, which reduces image quality.

Method used

Using a single-frame exposure image HDR enhancement method based on multi-dimensional mapping, the first frame image is captured with a fixed exposure value, the exposure value is adjusted, converted to a YUV model, brightness feature value calculation and exposure value adjustment are performed, the brightness mode is determined and multi-dimensional mapping is performed to achieve Wide dynamic enhancement of images.

Benefits of technology

Optimize image brightness and contrast with lower software and hardware resources, avoid motion ghosting problems, save computing power and storage resources, and improve image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118411319B_ABST
    Figure CN118411319B_ABST
Patent Text Reader

Abstract

The present invention discloses a single-frame exposure image HDR enhancement method and device based on multi-dimensional mapping. The method extracts the Y channel information of a single-frame color image to be subjected to brightness enhancement processing and completes frame feedback pipeline exposure to form a target image to be subjected to multi-dimensional mapping; then, the brightness mode of the target image to be subjected to multi-dimensional mapping is determined, namely, the normal brightness mode and the special brightness mode, and the Y channel of the target image is subjected to multi-dimensional mapping by adopting a corresponding multi-dimensional mapping strategy. Then, the Y channel of the target image is weightedly fused with the two-dimensional channels to be fused of the corresponding brightness mode to form the multi-dimensionally fused Y channel of the target image. After the color mode is converted, a single-frame image of an RGB model video that has completed the image wide dynamic enhancement processing is output. Finally, the determination of the image brightness mode and the corresponding adjustment process are repeatedly executed to complete the multi-dimensional mapping and weighted fusion of the Y channel of the new target image, thereby realizing the wide dynamic enhancement processing of each frame of the target image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an image processing method and device, and in particular to an image HDR enhancement method and device. Background Art

[0002] HDR stands for High Dynamic Range Rendering, which is a processing technology that improves image brightness and contrast. Compared with ordinary images, HDR can provide more dynamic range and image details. It uses the LDR image with the best details corresponding to each exposure time to synthesize the final HDR image, which can better reflect the visual effects in the real environment.

[0003] In terms of technical route, HDR technology is mainly achieved through the synthesis of multiple exposure images (generally three, low exposure, normal exposure and high exposure), and the pixels of multiple images are merged to retain more color information under high exposure and richer dark information under low exposure.

[0004] However, multi-frame exposure requires continuous frame acquisition under different conditions, which places high demands on the software and hardware performance of the imaging device. At the same time, the fusion of adjacent frames will superimpose the time domain differences of the image, causing problems such as moving image ghosting, thereby reducing image quality. Summary of the invention

[0005] Purpose of the invention: In view of the problems existing in the above methods, a single-frame exposure image HDR enhancement method and device based on multi-dimensional mapping are proposed, which can optimize the image brightness and contrast effects with relatively low software and hardware resources, and avoid the drawbacks of image time domain processing technology such as motion ghosting.

[0006] Technical solution: A single-frame exposure image HDR enhancement method based on multi-dimensional mapping, comprising:

[0007] Step 1: Shoot a first color frame image at a fixed exposure value, obtain the average pixel brightness value of the first frame image, and execute an algorithm for obtaining an image with a lower brightness level to obtain the exposure value of the next frame image;

[0008] Step 2: According to the exposure value of the next frame image, a basic image of a single-frame color image to be subjected to brightness enhancement processing is obtained, the basic image is converted from an RGB model to a YUV model, the Y channel of the basic image after model conversion is extracted as a reference parameter, and brightness feature value calculation and exposure value adjustment are performed to complete frame feedback pipeline exposure, thereby adjusting the basic image to a brightness level capable of multi-dimensional mapping, that is, obtaining a target image to be subjected to multi-dimensional mapping;

[0009] Step 3: Determine whether the brightness mode of the target image to be multi-dimensionally mapped is a normal brightness mode or a special brightness mode, adopt corresponding multi-dimensional mapping strategies according to different brightness modes, and map the Y channel of the target image into two-dimensional channels to be fused;

[0010] Step 4: Perform weighted fusion on the Y channel of the target image and the two-dimensional channels to be fused corresponding to the brightness mode to form a multi-dimensional fused Y channel of the target image;

[0011] Step 5: Use the U and V channels of the target image and the Y channel after multi-dimensional fusion of the target image to output a single-frame video image that has completed the image wide dynamic enhancement processing.

[0012] Furthermore, in step 1, the algorithm for obtaining an image with a lower brightness level is based on the exposure value of the first frame image. EP and average pixel brightness LA , use the following formula to calculate the exposure value of the next frame image EP 0:

[0013] ,in, LD is the target value of the lower brightness level of images with different bit depths, c Calculate the correction factor for the exposure value, n is the bit depth of the image.

[0014] Furthermore, in step 2, the brightness characteristic value calculation includes: counting the number of pixels of the Y channel of the base image that are located in the three intervals of the color scale [0,70], [71,184], and [185,255], respectively, and recording them as P 1. P 2. P 3. Calculate the brightness characteristic value of the Y channel of the base image by the following formula: LY = w 1* P 1- w 2* P 2- w 3* P 3, among which w 1 is the brightness statistical weight corresponding to the color scale [0,70] interval; w 2 is the brightness statistical weight corresponding to the color scale [71,184] interval; w 3 is the brightness statistical weight corresponding to the color scale [185,255] interval.

[0015] Furthermore, in step 2, the method for determining whether the basic image reaches a brightness level capable of multi-dimensional mapping includes: if the brightness feature value LY≥0, the base image is considered to have reached a brightness level that can be used for multi-dimensional mapping; if the brightness eigenvalue LY <0, it is considered that the basic image does not reach the brightness level that can be multi-dimensionally mapped.

[0016] Furthermore, in step 2, the frame feedback pipeline exposure method is: if the base image does not reach the brightness level that can be multi-dimensionally mapped, the exposure value of the base image is set to EP 0 minus the adjustment step size ∆ EP Then, the next frame image is exposed to form a new basic image; the brightness characteristic value of the Y channel of the new basic image is calculated and it is determined whether the new basic image reaches the brightness level that can be multi-dimensionally mapped, and according to the determination result, it is selected to perform or not to perform a step-down adjustment of the exposure value until the final basic image reaches the brightness level that can be multi-dimensionally mapped.

[0017] Furthermore, in step 3, the normal brightness mode and the special brightness mode are determined by counting the number of pixels of the Y channel of the target image that are in the three intervals of the color scale [0,75], [76,179], and [180,255], respectively, and recording them as x , y , z , the brightness mode of the target image is determined by the following conditions: if w m1 * x ≤ w m2 * y and w m3 * z ≤10* w m2 , then the brightness mode of the target image is determined to be the normal brightness mode; if w m1 * x > w m2 * y or w m3 * z > w m2 * y , then the brightness mode of the target image is determined to be a special brightness mode, where w m1 is the brightness statistical weight corresponding to the color scale [0,70] interval, w m2 is the brightness statistical weight corresponding to the color scale [76,179] interval, w m3 is the brightness statistical weight corresponding to the color scale [180,255] interval.

[0018] Furthermore, in step 3, the multidimensional mapping strategy is: for the target image determined to be in the normal brightness mode, the Y channel of the target image is mapped to the channel 1 to be fused and the channel 2 to be fused; for the target image determined to be in the special brightness mode, the Y channel of the target image is mapped to the channel 3 to be fused and the channel 4 to be fused; the mapping formulas are respectively:

[0019]

[0020] in, pix is a single pixel value of the Y channel of the target image, f 1( pix ) is the pixel value of the channel pixel with the same pixel coordinates as the target image in the channel 1 to be fused; f 2( pix ) is the pixel value of the channel pixel with the same pixel coordinates as the target image in the channel 2 to be fused; f 3( pix ) is the pixel value of the channel pixel with the same pixel coordinates as the target image in the channel 3 to be fused; f 4( pix ) is the pixel value of the channel pixel with the same pixel coordinates as the target image in channel 4 to be fused.

[0021] Furthermore, in step 4, the pixel values ​​of the Y channel of the image are divided into three intervals: [0,75], [76,179], and [180,255]. If the target image is in the special brightness mode, the pixel value of each pixel in the Y channel of the target image after multi-dimensional fusion is pix tn = pix * w t0 + f 1( pix )* w t1 + f 2( pix )* w t2 ,in w t0 , w t1 , w t2 The fusion weights corresponding to the pixel values ​​in the three intervals respectively in the special brightness mode;

[0022] If the target image is in the normal brightness mode, the pixel value of each pixel in the Y channel after the multi-dimensional fusion of the target image is pix cn = pix * wc0 + f 3( pix )* w c1 + f 4( pix )* w c2 ,in w c0 , w c1 , w c2 are the fusion weights corresponding to the pixel values ​​in the three intervals respectively in the normal brightness mode.

[0023] A single-frame exposure image HDR enhancement device based on multi-dimensional mapping includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the program to implement the single-frame exposure image HDR enhancement method based on multi-dimensional mapping.

[0024] Beneficial effect: The traditional HDR strategy is to dynamically fuse continuous frame images, that is, it is necessary to simultaneously store and use multiple continuous frame images as fusion content. During the HDR processing process, the method of the present invention only needs to store and use one frame of the target image to be subjected to wide dynamic enhancement. By instantly mapping the single frame target image, the image content to be fused is calculated and fused in the pipeline architecture, and the HDR enhancement improvement of the current frame image can be completed without the help of other frame images. Compared with methods or devices based on continuous frame image processing, the present invention can save a lot of computing power and storage resources, reduce the frame rate requirements of the device, and avoid the drawbacks of image time domain processing technology such as motion ghosting. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is a flow chart of the method of the present invention;

[0026] Figure 2 A schematic diagram of a pixel value sampling method for calculating average pixel brightness values ​​in the method of the present invention;

[0027] Figure 3 The figure is a flow chart of weighted fusion of multi-dimensional mapping channels according to the method of the present invention. DETAILED DESCRIPTION

[0028] The present invention will be further explained below in conjunction with the accompanying drawings.

[0029] like Figure 1 As shown, a single-frame exposure image HDR enhancement method based on multi-dimensional mapping includes:

[0030] Step 1: Shoot the first color frame image according to the set fixed exposure value, obtain the average pixel brightness value of the first frame image, and execute the algorithm for obtaining an image with a lower brightness level to obtain the exposure value of the next frame image.

[0031] Step 1.1: Follow the fixed initial exposure value recommended by each manufacturer's sensor (usually a lower exposure level) EP Take the first color frame image and count the average pixel brightness value of the first frame image. Because the basic image data mode of the video processing device is RGB, the average pixel brightness value of the first frame image needs to count the pixel value data of three channels, where the pixels participating in the statistics of the R and B channels are sampled at a ratio of 1:8, that is, the eighth pixel is taken for every eight pixel values ​​to participate in the statistics of the average pixel brightness value; the pixels participating in the statistics of the G channel are sampled at a ratio of 1:4, that is, the fourth pixel is taken for every four pixel values ​​to participate in the statistics of the average pixel brightness value. Figure 2 As shown, the three channels G, R, and B in the first frame image each contain 8 pixels, among which the average of the four pixel values, namely, the pixel values ​​G4 and G8 in the G channel, the pixel value R8 in the R channel, and the pixel value B8 in the B channel, is taken as the average pixel brightness value of the frame image. LA .

[0032] Step 1.2: The algorithm aims to obtain an image with a lower brightness level based on the exposure value of the first frame image. EP and average pixel brightness LA , use the following formula to calculate the exposure value of the next frame image EP 0:

[0033]

[0034] in, LD is the target value of the lower brightness level of different bit depth images (unquantized images are generally 8-bit bit depth, and the bit depth is reduced after quantization), c Calculate the correction factor for the exposure value, n is the bit depth of the image. In particular, because it is difficult to restore the details of the overexposed pixels of the image while reducing the brightness through mapping, and the overdark pixels of the image can be restored to a large extent while increasing the brightness through mapping, the brightness of the base image used for multi-dimensional mapping needs to be lower than that of the target image, that is, c The exposure correction factor level corresponding to the darker picture needs to be taken, and it can be obtained through a large number of experiments. c A value of 0.6-0.8 can achieve better image quality.

[0035] Step 2: Follow the exposure value EP0 to expose the next frame image, obtain the basic image of the single-frame color image to be subjected to brightness enhancement processing, convert the basic image from the RGB model to the YUV model, extract the Y channel of the basic image after the model conversion as the reference parameter, perform brightness feature value calculation and exposure value adjustment to complete the frame feedback pipeline exposure, thereby adjusting the basic image to a brightness level capable of multi-dimensional mapping, that is, obtaining the target image to be subjected to multi-dimensional mapping.

[0036] Step 2.1: According to the exposure value EP 0 exposure of the next frame of image, to obtain the basic image of the single frame color image to be processed for brightness enhancement, and convert the basic image from the RGB model to the YUV model. For most color image data models, each image pixel value contains three channels: red (R), green (G), and blue (B). According to the existing mature standards, the conversion of color images from the RGB model (the three-channel grayscale values ​​of each pixel are R, G, and B respectively) to the YUV model can be achieved according to the following formula:

[0037] Y=0.299R+0.587G+0.114B;

[0038] U=-0.1687R-0.3313G+0.5B+128;

[0039] V=0.5R-0.4187G-0.0813B+128;

[0040] Among them, "Y" stands for brightness (Luminance or Luma), "U" and "V" stand for chrominance (Chrominance or Chroma), which are used to describe the color and saturation of the color image.

[0041] Step 2.2: By performing weighted calculation on the pixel information of the Y channel histogram of the base image, the brightness characteristic value of the Y channel of the base image is obtained. Specifically, the pixel histogram information of the Y channel of the base image is counted to confirm the number of pixels in the three intervals of the color scale [0,70], [71,184], and [185,255]. Among them, the number of pixels in the color scale interval [0,70] is P 1, corresponding to the brightness statistical weight w 1; the number of pixels in the color range [71,184] is P 2, corresponding to the brightness statistical weight w 2; the number of pixels in the color range [185,255] is P 3, corresponding to the brightness statistical weight w 3. w 1 corresponds to pixels in the dark part, w 2. w3 corresponds to the pixels in the non-dark part, and the relationship between the number of dark part pixels and the number of non-dark part pixels is calculated after weighting to determine whether the basic image is at the lower brightness level described in step 1. In particular, the weight w 1. w 2. w The value of 3 should be based on the lower brightness level target value calculated in step 1.2 LD , if the base image is at brightness level LD , then its P 1. P 2. P 3 and corresponding w 1. w 2. w 3 The following relationship between the characteristic value of brightness and the brightness level should be satisfied. LD The sample image statistics are calculated and the average value is obtained w 1. w 2. w 3. In this embodiment, w 1 out of 10, w 2. w 3 is taken as 1. Then the brightness characteristic value of the Y channel of the base image is calculated by the following formula: LY :

[0042] LY = w 1* P 1- w 2* P 2- w 3* P 3.

[0043] Step 2.3: According to the brightness feature value of the Y channel of the base image LY Determine whether the brightness level of the base image meets the brightness requirements for multi-dimensional mapping. If not, adjust the exposure value of the current image. EP 0 is adjusted, and the feedback is applied to the exposure of the next frame image, and the image formed by this exposure is updated as the basic image. According to step 2.1 and step 2.2, the basic image mode conversion (RGB mode to YUV mode), image Y channel extraction and image brightness level determination steps are repeatedly performed until the brightness level of the basic image Y channel reaches the target image brightness requirement of the multi-dimensional mapping, and the current frame of the basic image is used as the target image to be multi-dimensionally mapped.

[0044] Specifically, if LY ≥0, the base image is determined to be the target image that reaches the brightness level for multi-dimensional mapping; if LY <0, the base image is determined to be a target image that does not reach the brightness level for multi-dimensional mapping, and then the exposure value of the current base image is set toEP 0 minus one adjustment step ∆ EP Then the next frame of image is exposed to form a new basic image. LY ≥0 means that the number of pixels in the dark area is not less than the number of pixels in the non-dark area after weighting, that is, the image as a whole is at the lower brightness level described in step 1; similarly, if LY<0, it means that the overall brightness of the image is higher than the lower brightness level described in step 1. If the statistical calculation in step 2.2 is w 1. w 2. w 3 image samples are sufficient, then based on w 1. w 2. w 3 The results LY The value can accurately reflect the balance between the number of dark pixels and the number of non-dark pixels in the image, that is, LY The relationship between ∆ and 0 can directly determine the brightness characteristics of the image. Repeatedly calculate the brightness characteristic value of the Y channel of the new base image and determine whether the new base image has reached the brightness level that can be multi-dimensionally mapped. Choose to make or not make a step-by-step adjustment of the exposure value until the new base image reaches the brightness level that can be multi-dimensionally mapped, and finally obtain the target image to be multi-dimensionally mapped. Through a large number of experimental statistics, the step size ∆ EP Taking 0.1-0.5 as a suitable strategy to balance computing power and convergence conditions.

[0045] Step 3: Determine whether the brightness mode of the target image to be multi-dimensionally mapped is a normal brightness mode or a special brightness mode, adopt corresponding multi-dimensional mapping strategies according to different brightness modes, and map the Y channel of the target image into two-dimensional channels to be fused.

[0046] Step 3.1: Convert the color mode of the target image from RGB mode to YUV mode, extract the Y channel pixel values ​​and perform histogram information statistics. Divide the Y channel histogram information of the target image into three intervals: [0,75], [76,179], and [180,255], and record the number of pixels falling into each interval as x , y , z .

[0047] Step 3.2: Use the Y channel histogram information of the target image to determine the brightness mode of the target image, that is, the normal brightness mode and the special brightness mode. For each brightness mode, the Y channel of the target image is mapped to two dimensions of the channels to be fused, that is, the Y channel of the target image is multi-dimensionally mapped.

[0048] The brightness mode calculation weights corresponding to the three intervals [0,75], [76,179], [180,255] are divided intow m1 , w m2 , w m3 ,in w m1 Corresponding to the pixels in the dark part, w m2 Pixels located in the middle brightness area, w m3 corresponds to pixels in the bright part. w m1 * x ≤ w m2 * y and w m3 * z ≤10* w m2 , it means that the number of pixels in the weighted middle brightness part is not less than the number of pixels in the dark part and the bright part, that is, the image is at the middle brightness level, and the brightness mode of the target image is determined to be the normal brightness mode. w m1 , w m2 , w m3 The average value can be obtained by statistically calculating a large number of sample images at intermediate brightness levels (such as directly using HDR-related artificial intelligence network training sample sets); through statistical analysis of the above sample images, it can be seen that when mapping and enhancing images at intermediate brightness levels (normal brightness mode), the percentage adjustment range of dark, bright or intermediate brightness pixels is basically the same. w m1 , w m2 , w m3 Take 1, 10, and 1 respectively. Map the Y channel of the target image to the newly added dimensions of channel 1 to be fused and channel 2 to be fused, where each pixel value of the target image is remapped to form channel 1 to be fused. The mapping formula is:

[0049]

[0050] in, pix is a single pixel value of the Y channel of the target image, f 1( pix ) is the pixel value of the channel pixel with the same pixel coordinates as the target image in the channel 1 to be fused. The above mapping formula is obtained based on the statistical fitting of a large number of sample images at intermediate brightness levels, and has a relatively small percentage adjustment range for dark, bright or intermediate brightness pixels.

[0051] Each pixel value of the target image is remapped to form the channel 2 to be fused. The mapping formula is:

[0052]

[0053] in, f 2( pix ) is the pixel value of the channel pixel with the same pixel coordinates as the target image in the channel 2 to be fused. The above formula is obtained based on the statistical fitting of a large number of sample images at intermediate brightness levels, and has a relatively large percentage adjustment range for dark, bright or intermediate brightness pixels.

[0054] Step 3.3: If w m1 * x > w m2 * y or w m3 * z > w m2 * y , it means that the number of pixels in the weighted middle brightness part is less than the number of pixels in the dark and bright parts, that is, because the pixels in the middle brightness level in the wide dynamic limit image are directly displayed as too dark and too dark pixels (such as backlight images), the brightness mode of the target image is determined to be a special brightness mode. The Y channel of the target image is mapped to the newly added dimensions of channel 3 to be fused and channel 4 to be fused, where each pixel value of the target image is remapped to form channel 3 to be fused. The mapping formula is:

[0055]

[0056] in, f 3( pix ) is the pixel value of the channel pixel with the same pixel coordinates as the target image in the channel 3 to be fused. The above formula is obtained based on the statistical fitting of a large number of sample images with backlight brightness characteristics, and has a larger percentage adjustment range for dark pixels than for bright and medium brightness pixels.

[0057] Each pixel value of the target image is remapped to form the channel 4 to be fused. The mapping formula is:

[0058]

[0059] in, f 4( pix) is the pixel value of the channel pixel with the same pixel coordinates as the target image in the channel 4 to be fused. The above formula is obtained based on the statistical fitting of a large number of sample images with backlight brightness characteristics, and has a larger percentage adjustment range for bright pixels than for dark and medium brightness pixels.

[0060] Step 4: Perform weighted fusion on the Y channel of the target image and the two-dimensional channels to be fused corresponding to the brightness mode to form the multi-dimensional fused Y channel of the target image.

[0061] Step 4.1: If the brightness mode of the target image is determined to be a special brightness mode, the pixel values ​​of the Y channel of the image are divided into three intervals: [0,75], [76,179], and [180,255]. For each pixel in the Y channel of the target image whose pixel value is in each interval of the histogram pix , not only determine the channel 1 to be fused with pix The pixel values ​​of pixels with the same coordinates f 1( pix ), and determine the channel 2 to be fused with pix The pixel values ​​of pixels with the same coordinates f 2( pix ).in pix , f 1( pix ), f 2( pix ) correspond to the fusion weights w t0 , w t1 , w t2 Then for each pixel originally located in the Y channel of the target image, the pixel value of the Y channel after multi-dimensional fusion is recorded as pix tn , the formula of multi-dimensional fusion is expressed as:

[0062] pix tn = pix * w t0 + f 1( pix )* w t1 + f 2( pix )* w t2

[0063] Among them, the fusion weights of pixels in different intervals w t0 , w t1 , wt2 The design strategies are different. The values ​​of this embodiment are shown in Table 1, which are also the recommended parameters that can achieve better brightness enhancement effects after a large number of sample processing and comparisons.

[0064] Table 1 Fusion weights of pixels in different intervals w t0 , w t1 , w t2 The value of

[0065]

[0066] like Figure 3 As shown, the pixel at coordinate [1,1] in the Y channel of the target image pix The pixel value is 100, which is located in the histogram interval [76,179], and the corresponding fusion weight w t0 =0.3; the pixel in channel 1 to be fused is also at coordinate [1,1] f 1( pix ) has a pixel value of 120, and the corresponding fusion weight w t1 =0.4; the pixel at coordinate [1,1] in channel 2 to be fused f 2( pix ) has a pixel value of 140, and the corresponding fusion weight w t2 =0.3; then the pixel with coordinate [1,1] in the Y channel after multi-dimensional fusion pix tn The pixel value is: 100*0.3+120*0.4+140*0.3=120. For other pixels in the Y channel of the target image and the corresponding two-dimensional channel to be fused in the histogram interval [76,179], [180,255], the same method is used with different fusion weights to perform fusion calculations, so that each pixel in the Y channel of the target image is mapped to the same coordinate pixel in the Y channel of the target image after multi-dimensional fusion.

[0067] Step 4.2: If the brightness mode of the target image is determined to be the normal brightness mode, the Y channel histogram of the target image is divided into three intervals: [0,75], [76,179], and [180,255]. For each pixel in the Y channel of the target image whose pixel value is in each interval of the histogram pix , not only determine the channel 3 to be fused with pix The pixel values ​​of pixels with the same coordinates f 3( pix ), and determine the channel 4 to be fused with pix The pixel values ​​of pixels with the same coordinatesf 4( pix ).in pix , f 3( pix ), f 4( pix ) correspond to the fusion weights w c0 , w c1 , w c2 Then for each pixel originally located in the Y channel of the target image, the pixel value of the Y channel after multi-dimensional fusion is recorded as pix cn , the formula of multi-dimensional fusion is expressed as:

[0068] pix cn = pix * w c0 + f 3( pix )* w c1 + f 4( pix )* w c2

[0069] Among them, the fusion weights of pixels in different intervals w c0 , w c1 , w c2 The design strategies are different, and the values ​​of this embodiment are shown in Table 2. Thus, each pixel in the Y channel of the target image is mapped to the same coordinate pixel in the Y channel after multi-dimensional fusion of the target image.

[0070] Table 2 Fusion weights of pixels in different intervals w c0 , w c1 , w c2 The value of

[0071]

[0072] Step 5: Using the U and V channels of the target image and the Y channel after multi-dimensional fusion of the target image, according to the formula R=Y+1.4075*(V-128); G=Y-0.3455*(U-128)-0.7169*(V-128); B=Y+1.779*(U-128), calculate and output the RGB model video frame image that completes the image wide dynamic enhancement processing.

[0073] Step 6: Use the exposure value of the target image as EP 0, repeat steps 2 to 5 to generate a new base image and target image, complete the multi-dimensional mapping and weighted fusion of the Y channel of the new target image, realize the wide dynamic enhancement processing of each frame of the target image, and optimize the image brightness effect of the entire video stream.

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

Claims

1. A single-frame exposure image HDR enhancement method based on multi-dimensional mapping, characterized in that: include: Step 1: Shoot a first color frame image at a fixed exposure value, obtain the average pixel brightness value of the first frame image, and execute an algorithm for obtaining an image with a lower brightness level to obtain the exposure value of the next frame image; Step 2: According to the exposure value of the next frame image, a basic image of a single-frame color image to be subjected to brightness enhancement processing is obtained, the basic image is converted from an RGB model to a YUV model, the Y channel of the basic image after model conversion is extracted as a reference parameter, and brightness feature value calculation and exposure value adjustment are performed to complete frame feedback pipeline exposure, thereby adjusting the basic image to a brightness level capable of multi-dimensional mapping, that is, obtaining a target image to be subjected to multi-dimensional mapping; Step 3: Determine whether the brightness mode of the target image to be multi-dimensionally mapped is a normal brightness mode or a special brightness mode, adopt corresponding multi-dimensional mapping strategies according to different brightness modes, and map the Y channel of the target image into two-dimensional channels to be fused; Step 4: Perform weighted fusion on the Y channel of the target image and the two-dimensional channels to be fused corresponding to the brightness mode to form a multi-dimensional fused Y channel of the target image; Step 5: Use the U and V channels of the target image and the Y channel after multi-dimensional fusion of the target image to output a single frame of video image after image wide dynamic enhancement processing; In step 2, the brightness characteristic value calculation includes: counting the number of pixels of the Y channel of the base image that are located in the three intervals of the color scale [0,70], [71,184], and [185,255], respectively, and recording them as P 1. P 2. P 3. Calculate the brightness characteristic value of the Y channel of the base image by the following formula: LY = w 1* P 1- w 2* P 2- w 3* P 3, among which w 1 is the brightness statistical weight corresponding to the color scale [0,70] interval; w 2 is the brightness statistical weight corresponding to the color scale [71,184] interval; w 3 is the brightness statistical weight corresponding to the color scale [185,255] interval; In step 2, whether the basic image reaches a brightness level that can be multi-dimensionally mapped includes: if the brightness feature value LY ≥0, the base image is considered to have reached a brightness level that can be used for multi-dimensional mapping; if the brightness eigenvalue LY <0, it is considered that the base image does not reach the brightness level capable of multi-dimensional mapping; In step 2, the frame feedback pipeline exposure method is: if the basic image does not reach the brightness level that can be multi-dimensionally mapped, the exposure value of the basic image is set to EP 0 minus the adjustment step size ∆ EP Then, the next frame image is exposed to form a new basic image; the brightness characteristic value of the Y channel of the new basic image is calculated and it is determined whether the new basic image reaches the brightness level that can be multi-dimensionally mapped, and according to the determination result, it is selected to perform or not to perform a step-down adjustment of the exposure value until the final basic image reaches the brightness level that can be multi-dimensionally mapped.

2. The single-frame exposure image HDR enhancement method based on multi-dimensional mapping according to claim 1, characterized in that: In step 1, the algorithm for obtaining an image with a lower brightness level is based on the exposure value of the first frame image. EP and average pixel brightness LA , use the following formula to calculate the exposure value of the next frame image EP 0: ,in, LD is the target value of the lower brightness level of images with different bit depths, c Calculate the correction factor for the exposure value, n is the bit depth of the image.

3. The single-frame exposure image HDR enhancement method based on multi-dimensional mapping according to claim 1, characterized in that: In step 3, the normal brightness mode and the special brightness mode are determined by counting the number of pixels in the Y channel of the target image that are in the three intervals of the color scale [0,75], [76,179], and [180,255], respectively, and recording them as x , y , z , the brightness mode of the target image is determined by the following conditions: if w m1 * x ≤ w m2 * y and w m3 * z ≤10* w m2 , then the brightness mode of the target image is determined to be the normal brightness mode; if w m1 * x>w m2 * y or w m3 * z>w m2 * y , then the brightness mode of the target image is determined to be a special brightness mode, where w m1 is the brightness statistical weight corresponding to the color scale [0,70] interval, w m2 is the brightness statistical weight corresponding to the color scale [76,179] interval, w m3 is the brightness statistical weight corresponding to the color scale [180,255] interval.

4. The single-frame exposure image HDR enhancement method based on multi-dimensional mapping according to claim 1 or 3, characterized in that: In step 3, the multidimensional mapping strategy is: for the target image determined to be in the normal brightness mode, the Y channel of the target image is mapped to the channel 1 to be fused and the channel 2 to be fused; for the target image determined to be in the special brightness mode, the Y channel of the target image is mapped to the channel 3 to be fused and the channel 4 to be fused; the mapping formulas are: ,in, pix is a single pixel value of the Y channel of the target image, f 1( pix ) is the pixel value of the channel pixel with the same pixel coordinates as the target image in the channel 1 to be fused; f 2( pix ) is the pixel value of the channel pixel with the same pixel coordinates as the target image in the channel 2 to be fused; f 3( pix ) is the pixel value of the channel pixel with the same pixel coordinates as the target image in the channel 3 to be fused; f 4( pix ) is the pixel value of the channel pixel with the same pixel coordinates as the target image in channel 4 to be fused.

5. The single-frame exposure image HDR enhancement method based on multi-dimensional mapping according to claim 4, characterized in that: In step 4, the pixel values ​​of the Y channel of the image are divided into three intervals: [0, 75], [76, 179], and [180, 255]. If the target image is in the special brightness mode, the pixel value of each pixel in the Y channel of the target image after multi-dimensional fusion is pix tn = pix * w t0 + f 1( pix )* w t1 + f 2( pix )* w t2 ,in w t0 , w t1 , w t2 The fusion weights corresponding to the pixel values ​​in the three intervals respectively in the special brightness mode; If the target image is in the normal brightness mode, the pixel value of each pixel in the Y channel after the multi-dimensional fusion of the target image is pix cn = pix * w c0 + f 3( pix )* w c1 + f 4( pix )* w c2 ,in w c0 , w c1 , w c2 are the fusion weights corresponding to the pixel values ​​in the three intervals respectively in the normal brightness mode.

6. A single-frame exposure image HDR enhancement device based on multi-dimensional mapping, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the single-frame exposure image HDR enhancement method based on multi-dimensional mapping as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Wide dynamic processing method for single-frame double-exposure image

    CN102075688A

  • Wide dynamic fusion method based on single-frame double-pulse exposure mode

    CN104639920A

  • Method for down-converting HDR video to SDR video based on dynamic metering

    CN109327734A

  • Image enhancement method based on wide dynamic range and electronic equipment

    CN112150399A

  • Image processing method based on multi-exposure fusion

    CN114187192A