High dynamic range video image processing method, computer device and computer readable storage medium
Patent Information
- Application Number
- CN202111131866.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-26
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2041-09-26
Smart Images

Figure CN113935911B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a method for compressing high dynamic range video images, and also to a computer device and a computer-readable storage medium for implementing the method. Background Art
[0002] With the development of display technology of electronic devices, users have higher and higher requirements for the image display of electronic devices. Among them, the dynamic range of an image is often used as a parameter to evaluate the image display quality. The dynamic range of an image refers to the ratio between the maximum and minimum brightness levels that an image can represent in the field of digital image processing. The unit of brightness is candela per square meter (d / m 2 ) or nit. The larger the dynamic range of image brightness, the higher the image contrast, the more details that can be displayed, and the more the image can show the real scene.
[0003] Most of the current video images are of standard dynamic range, which can display a brightness range of 0.0002 nits to 200 nits. However, this dynamic range is far lower than the dynamic range that the human eye can recognize. In order to make the image display more realistic, high dynamic range (HDR) technology is gradually being promoted and applied. High dynamic range video images can generally represent a brightness range of 0.001 nits to 10,000 nits, which can display more colors, a wider color gamut, and record more details.
[0004] High dynamic range videos require a high dynamic range display to correctly display the effects of high dynamic range videos. However, most of the monitors currently used in homes are traditional standard dynamic range monitors, which can only reach a maximum brightness of 200 nits to 300 nits, and the displayed color gamut is narrow, which cannot correctly display high dynamic range video images.
[0005] To this end, it is necessary to use image dynamic range compression technology to convert high dynamic range video images into video images that can be displayed on monitors suitable for ordinary home use. At present, the mainstream image dynamic range compression algorithms mainly process images by tone mapping, color gamut mapping, etc. The image dynamic range compression algorithms are mainly divided into three categories: global dynamic range compression algorithm, local dynamic range compression algorithm and hybrid dynamic range compression algorithm. The global dynamic range compression algorithm uses the same dynamic range compression operator for the entire image. This method has the advantages of fast speed, high efficiency and strong robustness. The disadvantage is that the contrast of the compressed image is low and the image details are not as good as those using the local dynamic range compression algorithm. The local dynamic range compression algorithm divides the image into multiple regions, then performs information statistics on each region, and finally uses different dynamic range compression operators for the image of each region based on the statistical information. This method can better preserve the details of the image and has a higher local contrast, but the disadvantage is that the algorithm has a large amount of calculation and is prone to halo and jitter. The hybrid dynamic range compression algorithm combines global and local methods to avoid halo phenomena to the greatest extent while preserving image details.
[0006] At present, the commonly used dynamic range compression technologies mostly include three technologies: image detail enhancement, tone mapping, and color gamut mapping. Among them, the image detail enhancement technology uses a fuzzy filtering method to divide the image into a basic image and a detail image, and then combines the basic image with the detail image after tone mapping and color gamut mapping to prevent the problem of tone mapping compressing image details. For example, the solutions disclosed in Chinese invention patent applications CN201610798065.4 and CN200810188656.5. In addition, Chinese invention patent application CN201480009785.7 discloses a method of obtaining a detail image by subtracting the image before and after tone mapping, and then combining the detail image with the original image to obtain a new image. The above methods can all achieve the purpose of image detail enhancement, but none of them take into account the influence of noise.
[0007] For another example, the solution of Chinese invention patent application CN20140009785.7 modifies the curve according to the statistical information of the entire image, while the solutions disclosed in Chinese invention patent applications CN201210572466 and CN201610950433.2 modify the curve according to local information. In addition, in terms of color gamut mapping, most existing technologies use a simple matrix multiplication to achieve this, such as the solution disclosed in Chinese invention patent application CN201680069324.8. However, the interception of matrix multiplication will cause color distortion.
[0008] In addition, Chinese invention patent applications CN201480009785.7, CN200810188656.5, and CN201680069324.8 also disclose several methods for processing high dynamic range images, some of which use a hybrid high dynamic range compression method and process the image in the form of detail enhancement, color gamut mapping, and tone mapping. However, these methods do not take into account the lack of contrast in the processed image, especially the unclear display of details in the dark area. These methods do not involve the processing of the dark part of the image, resulting in unsatisfactory quality of the processed image and even color distortion of the image. Summary of the invention
[0009] The first object of the present invention is to provide a high dynamic range video image processing method capable of improving image contrast and ensuring the clarity of image details in dark areas.
[0010] The second object of the present invention is to provide a computer device for implementing the high dynamic range video image processing method of the above-mentioned operating device.
[0011] A third object of the present invention is to provide a computer-readable storage medium for implementing the high dynamic range video image processing method of the above-mentioned operating device.
[0012] To achieve the main purpose of the present invention, the high dynamic range video image processing method provided by the present invention includes obtaining an input image; counting local brightness information of the input image, performing edge detection on the input image, and obtaining an edge intensity weight value of each pixel; dividing the input image into multiple non-overlapping areas, calculating the regional dark value of each area, and applying the dark values of multiple areas to calculate the dark intensity value of each pixel; performing edge enhancement on the input image, performing color space conversion on the edge-enhanced image, and performing electro-optical conversion to obtain RGB color value data of a linear light signal; performing local brightness interception on the RGB color value data: intercepting the RGB color value data according to the maximum brightness value of the monitor; performing color gamut conversion on the intercepted RGB color value data, and performing tone mapping, and performing photoelectric conversion on the tone-mapped RGB color value data to form output color values of an output image.
[0013] It can be seen from the above scheme that by performing edge enhancement processing on the image, the edge area in the image can be enhanced to improve the contrast of the image. In addition, by performing local brightness interception on the RGB color value data and intercepting the RGB color value according to the maximum brightness value of different monitors, the dark details of the image can be increased, so that the dark details of the image can be well preserved, thereby improving the quality of the processed image.
[0014] A preferred solution is that edge enhancement of the input image includes: calculating the difference between the original color value of the input image and the filtered color value to obtain the detail image color value, and applying the detail image color value, the original color value and the edge intensity weight value to calculate the color value of each pixel after edge enhancement.
[0015] It can be seen that by calculating the color value of each pixel after edge enhancement through the detail image color value, the original color value and the edge strength weight value, the detail clarity at the edge of the image can be improved, thereby making the details of the image clearer.
[0016] A further solution is that the local brightness interception of the RGB color value data includes: normalizing the RGB color value data proportionally to a preset range according to the maximum brightness value of the monitor.
[0017] It can be seen that by processing the RGB color value data according to the maximum brightness value of the monitor, the final output image can be suitable for the display performance of the monitor and the image distortion is less.
[0018] A further solution is to calculate the ratio of the RGB color value data to the maximum brightness value reference value when the RGB color value data is normalized proportionally to a preset range, wherein the maximum brightness value reference value is dynamically adjusted: the maximum brightness value of the monitor is adjusted according to the dark intensity value of each pixel to obtain the maximum brightness value reference value.
[0019] It can be seen that by dynamically adjusting the maximum brightness value reference value, the normalized RGB color value data is more suitable for the dark area of the image, and the detail clarity of the dark area can be improved.
[0020] A preferred solution is that the color gamut transformation of the intercepted RGB color value data includes: applying a multiplication matrix to convert the intercepted RGB color value data into RGB color values of a target color gamut, and converting RGB color values that exceed a preset range into a compressed range.
[0021] Furthermore, converting RGB color values that exceed the preset range into the compressed range includes: converting RGB color values greater than the upper limit of the preset range into the range between the upper limit of the preset range and the upper limit of the compressed range, and converting RGB color values less than the lower limit of the preset range into the range between the lower limit of the preset range and the lower limit of the compressed range.
[0022] In this way, the problem that RGB color values beyond the preset range cannot be displayed can be avoided, thereby improving the color authenticity of the processed image.
[0023] A further solution is that applying the dark values of multiple regions to calculate the dark intensity value of each pixel includes: determining multiple regions adjacent to the pixel, and applying the regional dark values of the multiple adjacent regions to calculate the dark intensity value of the pixel by a bilinear interpolation method.
[0024] In this way, a reasonable dark intensity value of each pixel can be calculated and used to detect the edge of the image, thereby improving the clarity of the edge area of the dark area in the image.
[0025] A further solution is to calculate the regional dark value of each area, including: for each pixel in the area, calculating the difference between the dark threshold and the color value of the pixel, and then calculating the ratio of the difference to the dark threshold; if the ratio is greater than 0, the ratio is counted in the regional dark value of the area.
[0026] Since there are more darker pixels in a certain area, it can be considered that the area is darker. The above calculation method can simply calculate the dark value of each area, which simplifies the calculation amount and improves the image processing speed.
[0027] To achieve the second objective, the computer device provided by the present invention includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, each step of the high dynamic range video image processing method is implemented.
[0028] To achieve the third objective mentioned above, the present invention provides a computer readable storage medium storing a computer program, and when the computer program is executed by a processor, each step of the high dynamic range video image processing method mentioned above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flow chart of an embodiment of a high dynamic range video image processing method of the present invention.
[0030] Figure 2 It is a schematic diagram of calculating the dark intensity value of a pixel point in an embodiment of the high dynamic range video image processing method of the present invention.
[0031] Figure 3 It is a compression curve when the maximum screen brightness is 0.5 in the embodiment of the high dynamic range video image processing method of the present invention.
[0032] The present invention is further described below in conjunction with the accompanying drawings and embodiments. DETAILED DESCRIPTION
[0033] The high dynamic range video image processing method of the present invention is applied to an electronic device with an image display function. Preferably, the electronic device has a display, which is a display suitable for displaying a standard dynamic range image. The high dynamic range video image processing method of the present invention is used to convert a high dynamic range image into a standard range image and display it on the display. Furthermore, the electronic device is provided with a processor and a memory, and a computer program is stored in the memory, and the high dynamic range video image processing method is implemented by the computer program.
[0034] High dynamic range video image processing method embodiment:
[0035] The high dynamic range video image processing method of this embodiment mainly comprises the following steps: obtaining local information statistics, image strong edge enhancement, electro-optical conversion, local brightness interception, adaptive color gamut conversion, tone mapping and photoelectric conversion. Figure 1 The various steps of this embodiment are introduced.
[0036] First, execute step S1 to obtain an input image. In this embodiment, the input image is a video image with a high dynamic range, and the color value of the image is YUV. In subsequent steps, this embodiment needs to convert the YUV image with a high dynamic range into an RGB image with a standard dynamic range.
[0037] Then, step S2 is executed to perform statistics on the local brightness information of the input image. Specifically, the local brightness information statistics mainly perform strong edge detection on the Y component in the input image and perform dark area detection.
[0038] In this embodiment, strong edge detection mainly detects the strong edge area in the input image, and then transmits the statistical information to the image edge enhancement module. Specifically, the input image is first filtered, and the filter can be a Gaussian filter or an edge-preserving low-pass filter. For example, using Y in Represents the Y component of the input image, Y b represents the output image after filtering, and the filtering process can be expressed as:
[0039] Y b =F(Y in ,H b ) (Formula 1)
[0040] In formula 1, F(Y in ,H b ) represents the input image Y in Application has kernel H b The filter, where H b is a low pass filter.
[0041] Then the filtered image Y bPerform edge detection and obtain edge strength G e , the process can be expressed as:
[0042] G e =F(Y b ,H g ) (Formula 2)
[0043] In formula 2, H g The Sobel edge detection kernel can be selected. Preferably, the edge strength G e The output value needs to be limited to the range of 0 to 255.
[0044] Since edge enhancement processing is required later, considering that noise may affect edge detection, this embodiment needs to perform edge enhancement processing on the edge strength G. e Perform intensity mapping and obtain the edge intensity weight value W of each pixel e , for example, using the following formula:
[0045] W e =max(min((G e –MinTh e ) / (MaxTh e –MinTh e ),1),0) (Formula 3)
[0046] In formula 3, MinTh e and MaxTh e are the upper and lower thresholds of edge strength, respectively. Thus, the edge strength weight value W of each pixel e The output of the edge is in the range of 0 to 1. e Less than the lower threshold MinTh e When the edge strength weight value W e is 0, when the edge strength G e Greater than the upper threshold MaxTh e When the edge strength weight value W e is 1.
[0047] In addition, step S2 also needs to perform dark area detection. Specifically, the input image is divided into multiple non-overlapping areas, for example, the width and height of each area are 128 pixels and 72 pixels respectively. Then the proportion of dark pixels in each area is counted to obtain the dark area value D of the area. block For example, for an area, the dark value D of the area is block The initial value of is set to 0, and then the brightness of the color value of each pixel in the area is calculated. When the color value is 0, the brightness is the maximum value 1, and the color value is greater than or equal to the dark threshold Thd When the brightness is 0, the brightness of each pixel in the area is counted in turn, and the dark value D of the area is accumulated. block For example, for each pixel in the area, calculate the dark threshold Th d The difference between the color value of the pixel and the dark threshold Th d If the ratio is greater than 0, the ratio is counted to the dark value D of the area block Therefore, the dark value D of an area block The calculation method can be expressed by the following formula:
[0048] D block =D block +max((Th d –Y block (i,j)) / Th d ,0) (Formula 4)
[0049] Among them, Y block is a color component of the region in the input image, namely, the Y component, and i∈[1,72], j∈[1,128], Th d is a preset dark threshold. Preferably, after the accumulation, the dark value D of each area is counted. block Then, set the dark value D block The normalization process is performed so that the normalized result is limited to the interval range of [0,1].
[0050] Then, according to the dark value D of each area block Calculate the dark intensity value of each pixel. Specifically, determine multiple regions adjacent to a pixel, and use the regional dark values of the multiple adjacent regions to calculate the dark intensity value of the pixel by bilinear interpolation. Figure 2 As shown, for a pixel 11, four regions adjacent to the pixel 11 are calculated. For example, the positions of the center points of the respective regions are determined, and the four regions with the shortest distances between the center points and the pixel 11 in the upper left, upper right, lower left, and lower right directions are calculated. Figure 2 The dark values D of the four regions are obtained respectively. block , for example, D block(i,j) , D block(i+1,j) , D block(i,j+1) , D block(i+1,j+1) Then, apply the regional dark value D of the four areas block(i,j) , D block(i+1,j) , D block(i,j+1) , D block(i+1,j+1)Perform bilinear interpolation calculation to calculate the dark intensity value W of pixel 11 d .
[0051] For example, the distance between the center point of region 21 and pixel 11 is used as a weight and multiplied by the dark value D of region 21. block(i,j) The weighted value of area 21 is obtained, and the weighted values of the other three areas are calculated in the same way, and then the average value of the weighted values of the four areas is calculated, and the average value is used as the dark intensity value W of pixel 11. d .
[0052] Then, step S3 is executed to perform edge enhancement processing on the input image. Since the present embodiment needs to perform tone mapping and color gamut mapping on the image, these processing will cause the contrast of the image to be reduced. In order to avoid the image contrast being reduced too obviously and affecting the image quality, step S3 needs to first perform edge enhancement processing on the input image. However, if all edges of the image are enhanced, the noise of the image will increase. Therefore, in order to prevent the phenomenon of increased noise, the present embodiment only performs enhancement processing on strong edges, for example, the strong edge enhancement processing is performed according to the edge detection result of step S2.
[0053] Specifically, since step S2 performs the Y component Y of the input image in Perform filtering and obtain the filtered image Y b , so step S3 can directly use the filtered image Y b Get the detail image Y d , thereby reducing the amount of edge enhancement calculations. For example, the following formula is used to calculate the Y corresponding to each pixel of the detail image. d Values:
[0054] Y d =Y in -Y b (Formula 5)
[0055] It can be understood that for one pixel, Y d is the detail image color value of the pixel, Y in is the original color value of the input image, Y b is the filtered color value, so the detail image color value of the pixel is the difference between the original color value and the filtered color value.
[0056] Get the detail image Y d Then, the edge strength weight value W calculated in step S2 is used e Perform edge enhancement calculation and obtain the edge enhanced image Y e , for example, using the following formula to calculate:
[0057] Y e =Y in +W e *Y d (Formula 6)
[0058] Since the image data obtained in step S3 is still processed in a nonlinear space, and the color gamut mapping and tone mapping are both performed in a linear space, this embodiment needs to convert the image data into a linear optical signal, that is, execute step S4. This embodiment uses the EOTF curve proposed in the ST 2084:2014 standard of the Society of Motion Picture and Television Engineers SMPTE to convert the image coding signal into a linear optical signal.
[0059] Specifically, the edge-enhanced image is first converted into a color space, specifically, the YUV color value data of the image is converted into RGB color value data, and then the RGB color value data is converted into a linear light signal using the following formula, the unit is nit, and the output signal range is [0,10000]:
[0060]
[0061] N represents the input nonlinear electrical signal, L represents the output linear optical signal, and m1, m2, c1, c2, and c3 are preset constants. Therefore, the nonlinear electrical signals R', G', and B' obtained by converting the YUV color value data after edge enhancement are respectively substituted into Formula 7, and used as the input parameter N in Formula 7, and the linear optical signals L corresponding to the respective color values are respectively calculated, thereby obtaining the color values of the linear optical signals, which are respectively expressed as R, G, and B.
[0062] Then, execute step S5 to intercept the local brightness of the image. Since the high dynamic range video image contains auxiliary information in addition to the image data, this auxiliary information is used to assist the decoder in decoding. The auxiliary information usually includes image width and height, color gamut information, and the maximum brightness value of the monitor. Among them, the maximum brightness value of the monitor is the maximum brightness of the monitor used in the process of video production. This value represents the maximum brightness that the video can reflect. Step S5 needs to intercept the color values R, G, and B of the image signal according to the maximum brightness value of the monitor, for example, using the following formula for interception:
[0063] R clip =max(min(R*10000 / SrcNit,1),0)
[0064] G clip =max(min(G*10000 / SrcNit,1),0)
[0065] B clip=max(min(B*10000 / SrcNit,1),0) (Formula 8)
[0066] Where R clip ,G clip and B clip They represent the color values of the captured image signal, and the color value interval is [0,1]. SrcNit is the maximum brightness value of the monitor, which can be obtained from the auxiliary information. It can be seen that step S5 is to normalize the RGB color value data proportionally to the range of [0,1] according to the maximum brightness value of the monitor.
[0067] Since the details of the dark area in the input image are often not clearly displayed, in order to improve the brightness of the dark area in the image, this embodiment needs to be based on the dark intensity value W d The maximum brightness value SrcNit of the monitor is reduced accordingly to obtain the maximum brightness value reference value SrcNitAdj. Therefore, for each pixel (i, j), its maximum brightness value reference value SrcNitAdj(i, j) is dynamically adjusted, that is, according to the dark intensity value W of each pixel d The maximum brightness value SrcNit of the monitor is adjusted to obtain the maximum brightness reference value SrcNitAdj(i,j) corresponding to the pixel. The calculation formula is as follows:
[0068] SrcNittAdj(i,j)=SrcNit(i,j)-W d (i,j)*LightUpValue (Equation 9)
[0069] Wherein, LightUpValue is the brightness value to be reduced, which is usually selected as 100, and of course other appropriate values can be selected according to actual needs. Therefore, SrcNitAdj calculated by Formula 9 can be substituted for SrcNit in Formula 8 and the operation can be performed.
[0070] Next, step S6 is executed to perform adaptive color gamut transformation on the image. Since the high dynamic range video image belongs to the BT.2020 color gamut, it is necessary to convert the high dynamic range video image to the BT.709 color gamut where the standard dynamic range video image is located. The conversion process can be implemented using a multiplication matrix. This embodiment uses the conversion coefficients in the report ITU-R BT.2407 for conversion, for example, using the following formula for conversion:
[0071]
[0072] It can be seen from formula 10 that the converted color value data exceeds the interval range of [0,1]. Some existing processing methods are to directly intercept the data exceeding the interval range of [0,1] to the minimum value 0 and the maximum value 1, for example, directly set the data less than 0 to 0, and directly set the data greater than 1 to 1. However, this processing method will cause the problem of color distortion. In order to avoid this situation, this embodiment needs to compress the part exceeding the interval range of [0,1]. Specifically, first detect the maximum and minimum values of each color channel after conversion, for example, perform the calculation of the following formula:
[0073] R max =max(R 709 ),R min =min(R 709 )
[0074] G max =max(G 709 ),G min =min(G 709 )
[0075] B max =max(B 709 ),B min =min(B 709 ) (Formula 11)
[0076] Then, the part beyond the range of [0,1] is compressed. Specifically, the following formula is used for compression:
[0077] If (R 709 >T max ), then R 709 =T max +(R 709 -T max )*(1-T max ) / (R max -T max )
[0078] If (G 709 >T max ), then G 709 =T max +(G 709 -T max )*(1-T max ) / (G max -T max )
[0079] If (B 709 >T max ), then B 709 =T max +(B709 -T max )*(1-T max ) / (B max -T max )
[0080] If (R 709 <T min ), then R 709 =T min -(T min -R 709 )*T min / (T min -R min )
[0081] If (G 709 <T min ), then G 709 =T min -(T min -G 709 )*T min / (T min -G min )
[0082] If (B 709 <T min ), then B 709 =T min -(T min -B 709 )*T min / (T min -B min ) (Formula 12)
[0083] Where T max and T min represents the upper and lower thresholds of the preset compression range. 709 , G 709 , B 709 The range is from the maximum value to T max The values between will be compressed to 1 to T max When the color value R 709 , G 709 , B 709 The range is from the minimum to T min The values between will be compressed to 0 to T min That is, the RGB color values greater than the preset range upper limit are converted to the range between the preset range upper limit and the compressed range upper limit, and the RGB color values less than the preset range lower limit are converted to the range between the preset range lower limit and the compressed range lower limit.
[0084] Step S6 converts the image signal to the maximum brightness of the monitor, but the maximum brightness of the monitors used in most households is far less than the maximum brightness of the monitor, so it is necessary to perform step S7 to perform tone mapping on the image and compress the image signal so that the image signal matches the brightness of the actual display. Specifically, this embodiment uses the following compression curve for processing.
[0085]
[0086] DispNit is the maximum value of the screen brightness of the actual display, ranging from [0,1]. Figure 3 The compression curve is shown when the value of DispNit is 0.5. It can be seen that the curve only compresses the latter part.
[0087] In this embodiment, the color value R calculated in step S6 is 709 , G 709 , B 709 Substitute them into formula 13 respectively to obtain the image signal R after brightness compression. TMO , G TMO , B TMO , after compression, normalization is performed so that the output value is within the interval [0,1]. Specifically, the following formula can be used for normalization:
[0088] R TMO =R TMO / DispNit
[0089] G TMO =G TMO / DispNit
[0090] B TMO =B TMO / DispNit (Formula 14)
[0091] Then, step S8 is performed to convert the linear photoelectric signal into a coded electrical signal. In this embodiment, a gamma function is used as a conversion function, for example, the following formula is used for conversion:
[0092] OETF(x)=x 1 / gamma (Formula 15)
[0093] Specifically, the R calculated by formula 14 is TMO , G TMO , B TMO Substitute them into formula 15 respectively and get the final output result R out , G out , B outAs the color value of each pixel output. Finally, step S9 is executed to convert the color value R of each pixel into out , G out , B out Output and form an output image.
[0094] It can be seen that since the present embodiment performs local brightness capture on the image, that is, executes the operation of step S5, it is possible to suppress the enhancement of noise well while maintaining the local contrast of the image. In addition, since the edge enhancement processing is performed on the dark area of the image, the dark details of the image can be enhanced, the display effect of the dark area of the image is better, and the color distortion problem caused by the color gamut mapping can be prevented.
[0095] Computer device embodiment:
[0096] The computer device of this embodiment can be an electronic device with a video display function, which has a processor, a memory, and a computer program stored in the memory and executable on the processor, such as an information processing program for implementing the above-mentioned information processing method. When the processor executes the computer program, each step of the above-mentioned high dynamic range video image processing method is implemented.
[0097] For example, a computer program may be divided into one or more modules, one or more modules are stored in a memory and executed by a processor to complete each module of the present invention. One or more modules may be a series of computer program instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the computer program in a terminal device.
[0098] It should be noted that the terminal device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the schematic diagram of the present invention is only an example of a terminal device and does not constitute a limitation on the terminal device. The terminal device may include more or fewer components than shown in the figure, or may combine certain components, or different components. For example, the terminal device may also include an input / output device, a network access device, a bus, etc.
[0099] The processor referred to in the present invention may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.
[0100] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0101] Computer readable storage medium:
[0102] If the computer program stored in the computer device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, each step of the above-mentioned high dynamic range video image processing method can be implemented.
[0103] Among them, the computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form, etc. Computer readable media may include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer readable media do not include electric carrier signals and telecommunication signals.
[0104] By using the high dynamic range video image processing method of the present invention, the operating area of a transportation device such as a muck truck can be quickly and effectively determined, thereby creating good conditions for the dynamic deployment of the transportation device.
[0105] Finally, it should be emphasized that the present invention is not limited to the above-mentioned embodiments. For example, changes in the parameters used when local brightness is intercepted, or changes in the specific calculation method of the dark intensity value of each pixel, etc., should also be included in the scope of protection of the claims of the present invention.
Claims
1. A high dynamic range video image processing method, comprising: Get the input image; Features: Counting local brightness information of the input image, performing edge detection on the input image, and obtaining an edge intensity weight value of each pixel; Divide the input image into a plurality of non-overlapping regions, calculate a regional dark value of each region, and use the regional dark values of the plurality of regions to calculate a dark intensity value of each pixel, wherein the regional dark value of each region is obtained by counting the proportion of dark pixels in the region; Performing edge enhancement on the input image, performing color space conversion on the image after edge enhancement, and performing electro-optical conversion to obtain RGB color value data of the linear light signal; wherein, performing edge enhancement on the input image comprises: calculating the difference between the original color value of the input image and the filtered color value to obtain the detail image color value, and applying the detail image color value, the original color value and the edge intensity weight value to calculate the color value of each pixel after edge enhancement; Performing local brightness interception on the RGB color value data: intercepting the RGB color value data according to the maximum brightness value of the monitor, wherein the maximum brightness value of the monitor is adjusted according to the dark part intensity value of each pixel to obtain a maximum brightness value reference value; Performing color gamut transformation and tone mapping on the intercepted RGB color value data, and performing photoelectric conversion on the tone-mapped RGB color value data to form output color values of an output image; Wherein, applying the dark values of the plurality of regions to calculate the dark intensity value of each pixel comprises: determining the plurality of regions adjacent to the pixel, and applying the region dark values of the plurality of adjacent regions to calculate the dark intensity value of the pixel by a bilinear interpolation method.
2. The high dynamic range video image processing method according to claim 1, characterized in that: The local brightness interception of the RGB color value data includes: normalizing the RGB color value data proportionally to a preset range according to the maximum brightness value of the monitor.
3. The high dynamic range video image processing method according to claim 1, characterized in that: When the RGB color value data is normalized proportionally to a preset range, a ratio of the RGB color value data to the maximum brightness reference value is calculated.
4. The high dynamic range video image processing method according to any one of claims 1 to 3, characterized in that: Performing color gamut conversion on the intercepted RGB color value data includes: applying a multiplication matrix to convert the intercepted RGB color value data into RGB color values of a target color gamut, and converting RGB color values that exceed a preset range into a compressed range.
5. The high dynamic range video image processing method according to claim 4, characterized in that: Also includes: Converting RGB color values that exceed a preset range into a compressed range includes: converting RGB color values that are greater than an upper limit of the preset range into a range between an upper limit of the preset range and an upper limit of the compressed range, and converting RGB color values that are less than a lower limit of the preset range into a range between a lower limit of the preset range and a lower limit of the compressed range.
6. The high dynamic range video image processing method according to any one of claims 1 to 3, characterized in that: Calculating the regional dark value of each of the regions includes: for each pixel in the region, calculating the difference between the dark threshold and the color value of the pixel, and then calculating the ratio of the difference to the dark threshold; if the ratio is greater than 0, the ratio is counted in the regional dark value of the region.
7. A computer device, characterized in that The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, each step of the high dynamic range video image processing method as claimed in any one of claims 1 to 6 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the high dynamic range video image processing method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method of high dynamic range compression with detail preservation and noise constraints
CN101505421B
A method and apparatus for displaying high dynamic range images
CN103024300B
Display management for high dynamic range video
CN105009580A
High dynamic range tone mapping
CN106504278B
A method and apparatus for dynamic image tone adjustment based on local blocks
CN107993189B