CN113518185A - Video conversion processing method and device, computer readable medium and electronic equipment - Google Patents

Video conversion processing method and device, computer readable medium and electronic equipment Download PDF

Info

Publication number
CN113518185A
CN113518185A CN202011642805.8A CN202011642805A CN113518185A CN 113518185 A CN113518185 A CN 113518185A CN 202011642805 A CN202011642805 A CN 202011642805A CN 113518185 A CN113518185 A CN 113518185A
Authority
CN
China
Prior art keywords
video
region
enhancement
pixel point
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011642805.8A
Other languages
Chinese (zh)
Other versions
CN113518185B (en
Inventor
赵天乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011642805.8A priority Critical patent/CN113518185B/en
Publication of CN113518185A publication Critical patent/CN113518185A/en
Application granted granted Critical
Publication of CN113518185B publication Critical patent/CN113518185B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals

Abstract

The embodiment of the application provides a video conversion processing method and device, a computer readable medium and electronic equipment. The video conversion processing method comprises the following steps: carrying out color space mapping processing and pixel value to scene illumination mapping processing on an SDR video to be converted to obtain a first video; detecting a detail loss area in the SDR video, and determining the expansion coefficient of each pixel point in the SDR video based on the detection result of the detail loss area; performing dynamic range expansion processing on the first video based on the expansion coefficient of each pixel point to obtain a second video; generating an HDR video based on the second video. The technical scheme of the embodiment of the application can improve the visual effect and the video quality of the HDR video obtained by the SDR video conversion.

Description

Video conversion processing method and device, computer readable medium and electronic equipment
Technical Field
The present application relates to the field of computer and communication technologies, and in particular, to a video conversion processing method and apparatus, a computer-readable medium, and an electronic device.
Background
Compared with SDR (Standard Dynamic Range, Standard Dynamic Range image) video, HDR (High-Dynamic Range, High Dynamic Range image) video can provide more Dynamic Range and image details, and can better reflect visual effects in a real environment. In the video processing technology in the field of artificial intelligence, an SDR video needs to be converted into an HDR video, and the conversion scheme of the SDR video into the HDR video proposed in the related art is difficult to ensure the quality and the visual effect of the converted HDR video.
Disclosure of Invention
Embodiments of the present application provide a video conversion processing method, an apparatus, a computer-readable medium, and an electronic device, so that a visual effect and video quality of an HDR video converted from an SDR video can be improved to at least some extent.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, there is provided a video conversion processing method, including: carrying out color space mapping processing and pixel value to scene illumination mapping processing on an SDR video to be converted to obtain a first video; detecting a detail loss area in the SDR video, and determining the expansion coefficient of each pixel point in the SDR video based on the detection result of the detail loss area; performing dynamic range expansion processing on the first video based on the expansion coefficient of each pixel point to obtain a second video; generating an HDR video based on the second video.
According to an aspect of an embodiment of the present application, there is provided a video conversion processing apparatus including: the first processing unit is configured to perform color space mapping processing and pixel value to scene illumination mapping processing on the SDR video to be converted to obtain a first video; the second processing unit is configured to detect a detail loss area in the SDR video and determine expansion coefficients of all pixel points in the SDR video based on a detection result of the detail loss area; the expansion unit is configured to perform dynamic range expansion processing on the first video based on the expansion coefficient of each pixel point to obtain a second video; a generating unit configured to generate an HDR video based on the second video.
In some embodiments of the present application, based on the foregoing solution, the second processing unit is configured to: acquiring a region detection map obtained by detecting a detail loss region; performing adaptive nonlinear filtering processing on the region detection image to obtain a filtering image obtained after filtering processing is performed on the detail loss region; and carrying out normalized mapping processing on the filter graph to obtain the expansion coefficient of each pixel point in the SDR video.
In some embodiments of the present application, based on the foregoing solution, the extension unit is configured to: calculating actual expansion coefficients corresponding to the pixel points according to the expansion coefficients of the pixel points and the whole expansion coefficients corresponding to the SDR video; and according to the actual expansion coefficient corresponding to each pixel point, uniformly stretching a plurality of color components of each corresponding pixel point in the first video to obtain the second video.
In some embodiments of the present application, based on the foregoing solution, the extension unit is configured to: and calculating the product of the expansion coefficient of each pixel point and the integral expansion coefficient corresponding to the SDR video so as to obtain the actual expansion coefficient corresponding to each pixel point.
In some embodiments of the present application, based on the foregoing solution, the extension unit is further configured to: obtaining input control parameters and a required maximum luminance for the HDR video, the input control parameters including a saturated maximum luminance; calculating a ratio between the saturated maximum luminance and the required maximum luminance to obtain the global expansion coefficient.
In some embodiments of the present application, based on the foregoing solution, the video conversion processing apparatus further includes: a third processing unit configured to, before generating a high dynamic range HDR video based on the second video, globally map the second video by a mapping curve to perform enhancement processing on a dark region in the second video, the mapping curve being a piecewise function including an exponential function corresponding to the dark region and a linear function corresponding to a non-dark region, a function curve of the exponential function being continuously derivable at a junction with a function curve of the linear function.
In some embodiments of the present application, based on the foregoing solution, the third processing unit is further configured to: obtaining an input control parameter, wherein the input control parameter comprises dark area enhancement intensity, and adjusting the intensity of enhancement processing on the second video based on the mapping curve based on the dark area enhancement intensity.
In some embodiments of the present application, based on the foregoing solution, the video conversion processing apparatus further includes: the adjusting unit is configured to perform scene detection on the SDR video to obtain at least one scene in the SDR video; counting a first proportion occupied by video frames with brightness exceeding a first brightness threshold value and a second proportion occupied by video frames with brightness lower than a second brightness threshold value in each scene; calculating an adjustment factor of an input control parameter according to the first proportion and the second proportion; adjusting the input control parameter based on the adjustment factor.
In some embodiments of the present application, based on the foregoing scheme, the generating unit is configured to: detecting a color distortion region in a video obtained by performing color space mapping processing on the SDR video, and detecting a high saturation region in the color distortion region; determining enhancement coefficients of all pixel points in a high saturation region based on a detection result of the high saturation region; performing color enhancement processing on the color distortion region based on a set basic enhancement coefficient and enhancement coefficients of all pixel points in the high saturation region to obtain a third video; generating the HDR video based on the third video.
In some embodiments of the present application, based on the foregoing scheme, the generating unit is configured to: carrying out nonlinear filtering processing on the detection result of the high saturation region to obtain a filtering graph corresponding to the high saturation region; and carrying out normalized mapping processing on the filter graph corresponding to the high saturation region to obtain the enhancement coefficient of each pixel point in the high saturation region.
In some embodiments of the present application, based on the foregoing scheme, the generating unit is configured to: calculating actual enhancement coefficients corresponding to all the pixel points in the high saturation region according to the basic enhancement coefficients and the enhancement coefficients of all the pixel points in the high saturation region; and carrying out color enhancement processing on the high saturation region according to the actual enhancement coefficient corresponding to each pixel point in the high saturation region, and carrying out color enhancement processing on the regions except the high saturation region in the color distortion region according to the basic enhancement coefficient.
In some embodiments of the present application, based on the foregoing solution, the video conversion processing apparatus further includes: a fourth processing unit, configured to calculate a first order moment and a second order moment of a region corresponding to each pixel point included in a video frame image in the first video before performing expansion processing of a dynamic range based on the expansion coefficient of each pixel point and the first video, and obtain the first order moment and the second order moment corresponding to each pixel point; determining whether the video frame image contains a distortion area or not according to the first moment and the second moment corresponding to each pixel point; and if the video frame image is determined to contain a distortion area, filtering the distortion area.
In some embodiments of the present application, based on the foregoing solution, the second processing unit is configured to: detecting an overexposed area and a low-brightness area contained in the SDR video based on at least one of a set soft threshold and a set hard threshold, and taking the overexposed area and the low-brightness area as the detail loss area.
According to an aspect of the embodiments of the present application, there is provided a computer readable medium on which a computer program is stored, the computer program, when executed by a processor, implementing the video conversion processing method as described in the above embodiments.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the video conversion processing method as described in the above embodiments.
According to an aspect of embodiments herein, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the video conversion processing method provided in the above-described various alternative embodiments.
In the technical solutions provided in some embodiments of the present application, a detail loss region in an SDR video is detected, an expansion coefficient of each pixel in the SDR video is determined based on a detection result of the detail loss region, then a first video obtained by performing color space mapping processing and pixel value-to-scene luminance mapping processing is subjected to dynamic range expansion processing based on the expansion coefficient of each pixel in the SDR video, and an HDR video is generated based on a second video obtained by the expansion processing, so that the corresponding expansion coefficients can be respectively adopted for each pixel to perform dynamic range expansion processing, a problem that an extended visual effect is poor due to the adoption of fixed and uniform parameters is avoided, and the visual effect and video quality of the HDR video obtained by conversion are effectively improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 shows a schematic diagram of an exemplary system architecture to which aspects of embodiments of the present application may be applied;
FIG. 2 shows a flow diagram of a video conversion processing method according to an embodiment of the present application;
FIG. 3 shows a flow diagram of a video conversion processing method according to an embodiment of the present application;
FIG. 4 shows a flow diagram of a video conversion processing method according to an embodiment of the present application;
fig. 5 shows a block diagram of a SDR video to HDR video conversion processing apparatus according to an embodiment of the present application;
FIG. 6 shows a block diagram of a video conversion processing apparatus according to an embodiment of the present application;
FIG. 7 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It should be noted that: reference herein to "a plurality" means two or more. "and/or" describe the association relationship of the associated objects, meaning that there may be three relationships, e.g., A and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Artificial Intelligence (AI) is a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human Intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making.
The artificial intelligence technology is a comprehensive subject and relates to the field of extensive technology, namely the technology of a hardware level and the technology of a software level. The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
Computer Vision technology (CV) is a science for researching how to make a machine "see", and further refers to that a camera and a Computer are used to replace human eyes to perform machine Vision such as identification, tracking and measurement on a target, and further image processing is performed, so that the Computer processing becomes an image more suitable for human eyes to observe or is transmitted to an instrument to detect. As a scientific discipline, computer vision research-related theories and techniques attempt to build artificial intelligence systems that can capture information from images or multidimensional data. The computer vision technology generally includes technologies such as image processing, image Recognition, image semantic understanding, image retrieval, OCR (Optical Character Recognition), video processing, video semantic understanding, video content/behavior Recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, synchronous positioning, map construction, and the like, and also includes common biometric technologies such as face Recognition, fingerprint Recognition, and the like.
The technical scheme of the embodiment of the application relates to a video processing technology in a computer vision technology, and the following is introduced in detail:
fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
As shown in fig. 1, the system architecture may include terminal devices (e.g., one or more of the smart phone 101, the tablet computer 102, and the portable computer 103 shown in fig. 1, and of course, a laptop computer, a desktop computer, a media player, a navigation device, a game console, a television, etc.), a network 104, and a server 105. The network 104 is the medium used to provide communication links between terminal devices and the server 105, and the network 104 may include various connection types, such as wired communication links, wireless communication links, and so forth. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform.
It should be understood that the number of terminal devices, networks 104 and servers 105 in fig. 1 is merely illustrative. There may be any number of end devices, networks 104, and servers 105, as desired for an implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
The terminal device may support video playback in HDR format, and the server 105 may provide multimedia content such as video, pictures, and the like to the terminal device.
In one embodiment of the present application, the server 105 may convert the SDR video into an HDR video, and the terminal device may play the HDR video retrieved from the server 105.
In one embodiment of the application, the terminal device may also retrieve SDR video from server 105. In addition, the terminal device may also retrieve the SDR video from a device other than the server 105 (e.g., a video storage device coupled to the terminal device, etc.), and the terminal device may then locally convert the SDR video to the HDR video.
It should be noted that the video conversion processing method provided in the embodiment of the present application is generally executed by the server 105, and accordingly, the video conversion processing apparatus is generally disposed in the server 105. However, in other embodiments of the present application, the terminal device may also have a similar function as the server, so as to execute the video conversion processing scheme provided by the embodiments of the present application.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
fig. 2 shows a flowchart of a video conversion processing method according to an embodiment of the present application, which may be performed by a device having a calculation processing function, such as the server 105 or the terminal device shown in fig. 1. Referring to fig. 2, the video conversion processing method at least includes steps S210 to S240, which are described in detail as follows:
in step S210, a color space mapping process and a pixel value to scene illumination mapping process are performed on the SDR video to be converted to obtain a first video.
In an embodiment of the present application, the color space mapping process performed on the SDR video to be converted is to convert the SDR video from YUV color space to RGB color space. YUV is a color coding method, where "Y" represents brightness (Luma) and gray level, and "U" and "V" represent Chrominance (Chroma) and saturation, which are used to describe the color and saturation of an image and to specify the color of a pixel. RGB is a color standard in the industry, and various colors are obtained by changing three color channels of Red (Red), Green (Green) and Blue (Blue) and superimposing the three color channels on each other.
Alternatively, the conversion of the YUV color space to the RGB color space belongs to a fixed linear transformation. However, if the color standards adopted by the SDR video are different, such as bt.601, bt.709, bt.2020, etc., then when converting the YUV color space into the RGB color space, a linear transformation corresponding to the corresponding color standard is also required. Specifically, the color standard adopted by the SDR video can be automatically detected, and then the corresponding linear transformation mode is selected.
In one embodiment of the present application, after performing color space mapping processing on the SDR video to be converted, mapping processing of pixel values to scene illumination may be performed. The mapping process of the pixel value to the scene illumination may be performed in a linear manner, and specifically, a power function may be used to approximate an inverse camera response curve to map (i.e., normalize) the pixel value to the scene illumination. Alternatively, if the SDR video to be converted contains the power used in generating the video, the corresponding power is also used in the mapping process of the pixel values to the scene luminances. If the power is not contained in the SDR video to be converted, a choice can be made between 2.0 and 2.4.
Continuing to refer to fig. 2, in step S220, a detail loss region in the SDR video is detected, and expansion coefficients of each pixel point in the SDR video are determined based on the detection result of the detail loss region.
In one embodiment of the present application, an overexposed area and a low-luminance area contained in the SDR video may be detected based on at least one of a set soft threshold and a set hard threshold, and the overexposed area and the low-luminance area may be used as a detail loss area. When the soft threshold is adopted, the stability in space and time can be considered, and the algorithm can smoothly transit from the soft threshold to the hard threshold by adjusting the distance between the high threshold and the low threshold in the soft threshold so as to adapt to different application scenes. Wherein, the overexposure area is an area with overhigh exposure, and when a hard threshold value is adopted, the overexposure area is an area with the exposure higher than a certain value; when a soft threshold is used, it is the area where the exposure is within the exposure interval defined by the soft threshold. The low-brightness area is an area with lower brightness, and when a hard threshold value is adopted, the area with lower brightness is an area with a certain value; when the soft threshold is adopted, the brightness is in the area within the brightness interval defined by the soft threshold.
In an embodiment of the present application, the process of determining the expansion coefficient of each pixel point in the SDR video based on the detection result of the detail loss area in step S220 may specifically include: acquiring a region detection map obtained by detecting a detail loss region; carrying out self-adaptive nonlinear filtering processing on the region detection image to obtain a filtering image obtained after filtering processing is carried out on the detail loss region; and carrying out normalized mapping processing on the filter graph to obtain the expansion coefficient of each pixel point in the SDR video.
In an embodiment of the present application, the area detection map is a detected map including a detail loss area, and the detail loss area may include the above-mentioned overexposed area and low-brightness area. Alternatively, the adaptive nonlinear filtering processing in the foregoing embodiment may be an adaptive nonlinear filtering algorithm with linear complexity, which may not ensure that the algorithm has low complexity, but may also ensure the processing speed of the algorithm.
It should be noted that: in the embodiment shown in fig. 2, the step S210 is first performed, and then the step S220 is performed. In other embodiments of the present application, step S220 may be performed first, and then step S210 may be performed; or step S210 and step S220 may be performed simultaneously.
In step S230, the dynamic range of the first video is expanded based on the expansion coefficient of each pixel point in the SDR video, so as to obtain a second video.
In an embodiment of the application, in step S230, the dynamic range of the first video is extended based on the expansion coefficient of each pixel to obtain the second video, specifically, the actual expansion coefficient corresponding to each pixel is calculated according to the expansion coefficient of each pixel and the whole expansion coefficient corresponding to the SDR video, and then the plurality of color components corresponding to each pixel in the first video are uniformly stretched according to the actual expansion coefficient corresponding to each pixel to obtain the second video. Optionally, a product of the expansion coefficient of each pixel point and the whole expansion coefficient corresponding to the SDR video may be calculated, and then the product is used as the actual expansion coefficient corresponding to each pixel point; or other additional mathematical operations (such as increasing or decreasing a certain multiple, increasing or subtracting a certain numerical value, etc.) may be performed on the product to obtain the actual expansion coefficient corresponding to each pixel.
In one embodiment of the present application, the overall expansion coefficient in the foregoing embodiment may be calculated according to the saturated maximum luminance and the required maximum luminance. Specifically, an external input control parameter including saturated maximum luminance and required maximum luminance for the output HDR video may be obtained, and then a ratio between the saturated maximum luminance and the required maximum luminance is calculated as the aforementioned overall expansion coefficient. Of course, other additional mathematical operations (e.g., increasing or decreasing by a certain factor, increasing or decreasing by a certain value, etc.) may be performed on the ratio to obtain the overall expansion coefficient.
In an embodiment of the present application, before performing the expansion processing of the dynamic range based on the expansion coefficient of each pixel and the first video in step S230, whether each region included in the video frame image in the first video is distorted may be further calculated, and if a distortion region exists, the distortion region may be subjected to filtering processing. Specifically, the first moment and the second moment of the area corresponding to each pixel point included in the video frame image in the first video may be calculated to obtain the first moment and the second moment corresponding to each pixel point, and then, according to the first moment and the second moment corresponding to each pixel point, it is determined whether the video frame image includes the distortion area.
Optionally, the region corresponding to each pixel may be a region of a set size including each pixel, and the first moment and the second moment of the region are used as the first moment and the second moment corresponding to each pixel.
Optionally, in an embodiment of the present application, assuming that a first moment corresponding to a pixel point in a video frame image is μ 1, and a second moment is μ 2, if μ 1 and μ 2 satisfy the following formula, it indicates that the pixel point has distortion:
Figure BDA0002875338610000101
wherein, a1, a2 and a3 are parameters obtained by learning, and T is a set threshold value.
After each distorted pixel point in the video frame image is found, each distorted pixel point can be synthesized to obtain a distortion area in the video frame image.
In the foregoing embodiment, by detecting the distortion region and performing filtering processing on the distortion region, on the basis of performing filtering processing on the distortion region, the problem that details of an undistorted region in an image are lost due to performing filtering processing on the whole video frame image can be avoided.
Optionally, in an embodiment of the present application, a base filter strength parameter from the outside may also be obtained, so as to adjust the filter strength according to the base filter strength parameter. The filter strength-based parameter may be set by a user or autonomously generated by a computer.
Continuing to refer to fig. 2, in step S240, a high dynamic range HDR video is generated based on the second video.
In one embodiment of the present application, before generating the high dynamic range HDR video based on the second video, the video conversion processing method further includes: and globally mapping the second video through a mapping curve to enhance the dark area in the second video, wherein the mapping curve is a piecewise function, the piecewise function comprises an exponential function corresponding to the dark area and a linear function corresponding to a non-dark area, and the function curve of the exponential function and the function curve of the linear function are continuously derivable at the junction.
In an embodiment of the present application, the dark area enhancement strength may be further obtained from the input control parameter, and then the strength of the enhancement processing performed on the second video based on the mapping curve is adjusted based on the dark area enhancement strength.
In an embodiment of the present application, the saturated maximum brightness and the dark area enhancement intensity in the foregoing embodiment may also be adjusted according to different scenes of the SDR video, so that video contents in different scenes may be adapted to each other, and the quality of the HDR video obtained by conversion may be improved. Specifically, as shown in fig. 3, the following steps S310 to S340 may be included:
in step S310, scene detection is performed on the SDR video to obtain at least one scene in the SDR video.
In an embodiment of the present application, a similarity between adjacent frames in an SDR video may be calculated, and then if the similarity between adjacent frames is large, it is indicated that the two adjacent video frames belong to different scenes, and in this way, the SDR video may be divided into at least one scene.
In step S320, a first ratio of video frames in each scene whose luminance exceeds a first luminance threshold and a second ratio of video frames whose luminance is lower than a second luminance threshold are counted.
In an embodiment of the present application, after at least one scene is obtained through division, luminance distributions of video frames in the respective scenes may be counted, and then a first proportion of video frames in the respective scenes, whose luminance exceeds a first luminance threshold, and a second proportion of video frames, whose luminance is lower than a second luminance threshold, may be determined according to the luminance distributions of the video frames in the respective scenes.
In step S330, an adjustment factor of the input control parameter is calculated according to the first ratio and the second ratio.
In one embodiment of the present application, assuming that the aforementioned first ratio is x1 and the second ratio is x2, the adjustment factor of the input control parameter can be calculated according to the following formula:
y1=a11×x1+a12×x2+b1
y2=a21×x1+a22×x2+b2
where y1 denotes the aforementioned saturated maximum luminance; y2 denotes the aforementioned dark-region enhancement intensity; a is11、a12、a21、a22B1 and b2 are learned parameters.
In step S340, the input control parameter is adjusted based on the adjustment factor.
In one embodiment of the present application, after the adjustment factor is calculated, the adjustment factor may be directly added to the aforementioned saturated maximum luminance and dark area enhancement intensity to obtain the adjusted input control parameter.
In an embodiment of the present application, as shown in fig. 4, the process of generating the high dynamic range HDR video based on the second video in step S240 may specifically include the following steps S410 to S440, which are described in detail as follows:
in step S410, a color distortion region in a video obtained by performing color space mapping processing on the SDR video is detected, and a high saturation region in the color distortion region is detected.
In an embodiment of the present application, a video obtained by performing color space mapping processing on an SDR video is in an RGB color space, colors too close to a color space boundary can be detected in the RGB color space, and regions where pixel points corresponding to the colors are located are marked as color distortion regions. Alternatively, when detecting a color that is too close to a boundary of the space, the detection may be done based on a hard threshold algorithm, i.e. if the distance to the boundary of the color space is less than a certain threshold, it is determined that the corresponding color is too close to the boundary of the color space.
In one embodiment of the present application, when detecting a high saturation region in a color distortion region, a region with too high saturation in the color distortion region may be detected based on a soft threshold.
It should be noted that step S410 may be performed after the SDR video is subjected to the color space mapping process.
In step S420, based on the detection result of the high saturation region, the enhancement coefficient of each pixel point in the high saturation region is determined.
In an embodiment of the present application, the nonlinear filtering processing may be performed on the high saturation region to obtain a filtering map corresponding to the high saturation region, and then the normalized mapping processing is performed on the filtering map corresponding to the high saturation region to obtain an enhancement coefficient of each pixel point in the high saturation region. Alternatively, the nonlinear filtering process may be a nonlinear filtering algorithm with linear complexity, which may not ensure that the algorithm has low complexity, but may also ensure the processing speed of the algorithm.
In step S430, based on the set basic enhancement coefficient and the enhancement coefficient of each pixel point in the high saturation region, color enhancement processing is performed on the color distortion region to obtain a third video.
In an embodiment of the present application, an actual enhancement coefficient corresponding to each pixel point in the high saturation region may be calculated according to the basic enhancement coefficient and the enhancement coefficient of each pixel point in the high saturation region, then color enhancement processing is performed on the high saturation region according to the actual enhancement coefficient corresponding to each pixel point in the high saturation region, and color enhancement processing is performed on a region except the high saturation region in the color distortion region according to the basic enhancement coefficient.
Optionally, according to the basic enhancement coefficient and the enhancement coefficient of each pixel point in the high saturation region, the process of calculating the actual enhancement coefficient corresponding to each pixel point in the high saturation region may be to calculate a product between the basic enhancement coefficient and the enhancement coefficient of each pixel point in the high saturation region, and then take the product as the actual enhancement coefficient corresponding to each pixel point in the high saturation region; or other additional mathematical operations (such as increasing or decreasing by a certain factor, increasing or decreasing by a certain value, etc.) can be performed on the product to obtain the actual enhancement coefficient corresponding to each pixel point in the high saturation region.
In step S440, an HDR video is generated based on the third video.
In an embodiment of the present application, after the color enhancement processing is performed to obtain the third video, the third video may be mapped through an HLG (Hybrid log-gamma) curve or a PQ (Perceptual quantization) curve to map the scene luminance to the pixel value. Specifically, whether an HLG curve or a PQ curve is adopted is determined according to the format of the needed HDR video, and if the needed HDR video is the HDR video of the HLQ curve, the HLG curve is selected; if HDR video of PQ curves is desired, the PQ curve is selected.
In an embodiment of the present application, after the mapping processing of the HLG curve or the PQ curve, the video is converted from the RGB color space to the YUV color space, and then the quantization processing is performed on the mapped pixel values, and the quantized pixel values are output to an encoder for encoding processing, so as to obtain the final HDR video.
In an embodiment of the present application, as shown in fig. 5, a conversion processing apparatus for converting an SDR video into an HDR video specifically includes: YUV to RGB module 501, linearization processing module 502, stripe/noise/block suppression module 503, dynamic range extension module 504, color gamut extension module 505, PQ/HLG mapping module 506, RGB to YUV module 507, quantization module 508, overexposure/underbrightness detection module 509, brightness detail supplement module 510, scene analysis module 511, and color distortion detection module 512. The individual modules are explained in detail below:
in one embodiment of the present application, after the SDR video is input, the YUV to RGB module 501 converts the pixel value of the SDR video from YUV space to RGB space; then, the linear processing module 502 linearizes the inverse camera response curve to obtain normalized scene illumination; then, the band/noise/block suppression module 503 performs nonlinear filtering to remove the band and suppress distortion such as noise and blocking effect; then the dynamic range expansion module 504 performs dynamic range expansion; the gamut extension module 505 then extends the gamut range; then the PQ/HLG mapping module 506 performs mapping processing through a PQ curve or an HLG curve; then the RGB to YUV module 507 converts the video from the RGB space back to the YUV space; finally, the quantization module 508 performs quantization processing to output HDR video. The dynamic range extension module 504 has two additional inputs besides the input of the band/noise/block suppression module 503: the first way is that the overexposure/low brightness detection module 509 detects overexposure and low brightness regions from the original SDR video, and the video is input to the dynamic range expansion module 504 after being subjected to detail supplement by the brightness detail supplement module 510; the second path is that the scene analysis module 511 performs scene analysis on the original SDR video, then obtains the luminance distribution information of each scene of the video, and adaptively adjusts the parameters of the dynamic range extension module. In addition, the color gamut extension module 505 receives the color distortion area detected by the color distortion detection module 512 from the video output by the YUV to RGB module 501 to guide the range of influence of the color gamut extension module 505.
In one embodiment of the present application, the YUV to RGB module 501 and the RGB to YUV module 507 convert the video from the YUV color space to the RGB color difference space and convert the video from the RGB color difference space to the YUV color space, respectively. The conversion between the YUV color space and the RGB color space belongs to a fixed linear transformation. However, if the color standards adopted by the SDR video are different, such as bt.601, bt.709, bt.2020, etc., then when converting between the YUV color space and the RGB color space, a linear transformation corresponding to the corresponding color standard is also required. The YUV to RGB module 501 may automatically detect a color standard used in SDR video coding, and then select a corresponding linear transformation mode. Whereas the RGB to YUV module 507 uses a fixed bt.2020 color standard due to the specifications of the HDR video standard ITU-R rec.bt.2100.
In one embodiment of the present application, the linearization processing module 502 employs a power function to approximate an inverse camera response curve, mapping (i.e., normalizing) pixel values of the video to scene illumination. If the SDR video to be converted contains the power exponent adopted in the video generation, the corresponding power exponent is also adopted when the mapping processing from the pixel value to the scene illumination is carried out; if the power is not contained in the SDR video to be converted, a choice can be made between 2.0 and 2.4.
Correspondingly, the PQ/HLG mapping module 506 maps the normalized scene illumination to the pixel value space, using either a PQ curve or a HLG curve, depending on the video output format selected by the user. The quantization module 508 mainly quantizes the continuous values that have been mapped to the pixel value space into 1024 different luminance levels, and then outputs them to the encoder for encoding to generate HDR video.
In one embodiment of the present application, the slice/noise/block suppression module 503 adaptively suppresses distortions such as banding, blocking artifacts, and noise that occur during the sampling, quantization, and encoding processes. Specifically, the band/noise/block suppression module 503 calculates the local statistical characteristics (the statistical characteristics may be a first moment and a second moment) of the image, and then determines whether significant distortion occurs in the image according to the statistical characteristics. For the area with distortion, the band/noise/block suppression module 503 suppresses the distortion by using an adaptive nonlinear filtering algorithm by adjusting the filtering strength while protecting the detail information from being lost. The band/noise/block suppression module 503 may also receive an external "base filter strength" parameter, so that an experienced user may adjust the average filter strength to suit his specific needs.
In an embodiment of the present application, the overexposure/low brightness detection module 509 detects the regions of the video where details are lost due to insufficient SDR dynamic range and brightness truncation by setting corresponding thresholds. Specifically, a soft threshold method can be adopted to give consideration to stability in space and time, and meanwhile, the distance between the high threshold and the low threshold in the soft threshold can be adjusted to smoothly transition from the soft threshold to the hard threshold, so that the method can be suitable for different application scenes. The selection of specific parameters may be learned based on observations of a large number of different types of videos.
In one embodiment of the present application, the luminance detail supplement module 510 takes the output of the overexposure/low luminance detection module 509 as input and calculates a dynamic range expansion coefficient to supplement the details by adjusting the expansion coefficients of the overexposure and low luminance regions. Specifically, the output of the overexposure/underbrightness detection module 509 is a region detection map, which is filtered by the brightness detail supplementation module 510 using an adaptive non-linear filtering algorithm of linear complexity, so as to effectively estimate the information lost by truncation from the information remaining near the region boundary where the detail is lost. After the nonlinear filtering is performed, normalization processing can be performed by using an exponential function, so that an expansion coefficient for each pixel point is finally output. The processing mode of the brightness detail supplement module 510 saves a large amount of calculation, so that the algorithm keeps linear complexity, is easy to be accelerated in parallel, can fully utilize the characteristics that an overexposed area and a low-brightness area are not intersected in space, and can well keep the characteristic of a strong edge by a filtering algorithm, and simultaneously supplement the details of the overexposed area and the low-brightness area in one-time filtering.
In one embodiment of the present application, the dynamic range expansion module 504 performs the core dynamic range expansion task, and the algorithm employs an adaptive linear stretching algorithm. Specifically, for each pixel, its three color components are stretched by a uniform expansion coefficient to prevent color distortion caused by the stretching process. Each pixel has a different expansion coefficient determined by the overall expansion coefficient and the coefficient of the output of the brightness detail supplement module 510 in the previous embodiment. The global expansion coefficient is determined by an externally input "saturated maximum luminance" parameter and the maximum luminance of the output video. An experienced user can control the visual effect of HDR video by adjusting this "saturated maximum luminance" parameter.
In an embodiment of the present application, in order to adapt to the dark scene video, the dynamic range extension module 504 further integrates an additional dark region enhancement algorithm, which uses global mapping to additionally enhance the details of the dark region. To ensure excessive naturalness, the mapping curve is a smooth piecewise function: a segment corresponding to an overly dark region is an exponential function, the remainder is linear, and the junction is continuously derivable. The dynamic range extension module 504 may also receive an externally input "dark field enhancement intensity" parameter to control the degree of enhancement for adjustment as desired by an experienced user.
The dynamic range extension module 504 also reserves an interface for the scene analysis module 511, so that the scene analysis module 511 can adjust the visual effect of the HDR video finally output by the algorithm by adjusting the "saturated maximum brightness" and the "dark region enhancement intensity".
The scene analysis module 511 may automatically analyze the luminance distribution of the original SDR video and control the visual effect of the output HDR video through the parameter interface reserved by the dynamic range extension module 504. Specifically, the scene analysis module 511 may employ a scene segmentation algorithm, a luminance distribution statistical algorithm, and an optimal luminance parameter calculation algorithm. The scene segmentation algorithm intelligently divides the video into different scenes by calculating the similarity between two adjacent frames and a linear classifier; the brightness distribution statistical algorithm is used for counting the average brightness distribution of all video frames in each scene; finally, the optimal brightness parameter calculation algorithm calculates an adjustment factor by the ratio of the high luminance portion and the low luminance portion in the scene average luminance distribution and outputs the adjustment factor to the dynamic range expansion module 504.
In an embodiment of the present application, the color distortion detection module 512 detects a color too close to a space boundary in the RGB color space, and a region where a corresponding pixel point is located is marked as a color distortion region. In order to recover the rich colors of the HDR video, the color distortion detection module 512 may detect a high saturation region in the color distortion region by using a soft threshold algorithm, then perform nonlinear filtering processing on the high saturation region, and then perform normalization processing on the result of the filtering processing to obtain an enhancement coefficient of each pixel point in the high saturation region, where the enhancement coefficient is used to adjust the enhancement intensity in the color gamut extension module 505.
In one embodiment of the present application, the color gamut extension module 505 first converts the RGB values input by the dynamic range extension module 503 into RGB values in the wide color gamut bt.2020 color space, and then performs adaptive linear color enhancement on the color distortion region detected by the color distortion detection module 512. The gamut expansion module 505 receives an externally input "color enhancement base strength" parameter for controlling the enhancement factor. On this basis, the enhancement coefficient is also affected by the enhancement coefficient of each pixel output by the color distortion detection module 512, that is, the "color enhancement base strength" parameter is multiplied by the enhancement coefficient output by the color distortion detection module 512, so as to obtain the final actual enhancement coefficient. And then performs a gamut extension process based on the finally determined enhancement coefficient.
According to the technical scheme of the embodiment of the application, a self-adaptive noise and distortion suppression algorithm is designed, the details of an image are protected while noise and stripe distortion are suppressed, and a certain blocking effect suppression effect is achieved, so that the algorithm can be suitable for a low-bit-rate video; the self-adaptive nonlinear filtering algorithm is adopted to process high-brightness and low-brightness areas simultaneously, and a dark area enhancing module is designed, so that the generated HDR video has richer details in the high-brightness and low-brightness areas simultaneously; the designed color gamut expansion module enables the generated HDR video to be richer in color; the designed scene analysis module and the adaptive brightness adjustment algorithm matched with the scene analysis module enable the scheme of the application to be well adaptive to video contents with different brightness. Meanwhile, a nonlinear filtering algorithm with linear complexity is adopted, so that the algorithm complexity is greatly reduced, and the algorithm can be suitable for high-definition high-code-rate videos.
The following describes embodiments of the apparatus of the present application, which can be used to perform the video conversion processing method in the above embodiments of the present application. For details that are not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the video conversion processing method described above in the present application.
Fig. 6 shows a block diagram of a video conversion processing apparatus according to an embodiment of the present application, which may be provided in a device having a calculation processing function, such as the server 105 or the terminal device shown in fig. 1.
Referring to fig. 6, a video conversion processing apparatus 600 according to an embodiment of the present application includes: a first processing unit 602, a second processing unit 604, an expansion unit 606 and a generation unit 608.
The first processing unit 602 is configured to perform color space mapping processing on an SDR video to be converted and perform mapping processing from a pixel value to scene illumination to obtain a first video; the second processing unit 604 is configured to detect a detail loss region in the SDR video, and determine an expansion coefficient of each pixel point in the SDR video based on a detection result of the detail loss region; the expansion unit 606 is configured to perform expansion processing of a dynamic range on the first video based on the expansion coefficient of each pixel point to obtain a second video; the generating unit 608 is configured to generate an HDR video based on the second video.
In some embodiments of the present application, based on the foregoing solution, the second processing unit 604 is configured to: acquiring a region detection map obtained by detecting a detail loss region; performing adaptive nonlinear filtering processing on the region detection image to obtain a filtering image obtained after filtering processing is performed on the detail loss region; and carrying out normalized mapping processing on the filter graph to obtain the expansion coefficient of each pixel point in the SDR video.
In some embodiments of the present application, based on the foregoing scheme, the expanding unit 606 is configured to: calculating actual expansion coefficients corresponding to the pixel points according to the expansion coefficients of the pixel points and the whole expansion coefficients corresponding to the SDR video; and according to the actual expansion coefficient corresponding to each pixel point, uniformly stretching a plurality of color components of each corresponding pixel point in the first video to obtain the second video.
In some embodiments of the present application, based on the foregoing scheme, the expanding unit 606 is configured to: and calculating the product of the expansion coefficient of each pixel point and the integral expansion coefficient corresponding to the SDR video so as to obtain the actual expansion coefficient corresponding to each pixel point.
In some embodiments of the present application, based on the foregoing solution, the expanding unit 606 is further configured to: obtaining input control parameters and a required maximum luminance for the HDR video, the input control parameters including a saturated maximum luminance; calculating a ratio between the saturated maximum luminance and the required maximum luminance to obtain the global expansion coefficient.
In some embodiments of the present application, based on the foregoing solution, the video conversion processing apparatus 600 further includes: a third processing unit configured to, before generating a high dynamic range HDR video based on the second video, globally map the second video by a mapping curve to perform enhancement processing on a dark region in the second video, the mapping curve being a piecewise function including an exponential function corresponding to the dark region and a linear function corresponding to a non-dark region, a function curve of the exponential function being continuously derivable at a junction with a function curve of the linear function.
In some embodiments of the present application, based on the foregoing solution, the third processing unit is further configured to: obtaining an input control parameter, wherein the input control parameter comprises dark area enhancement intensity, and adjusting the intensity of enhancement processing on the second video based on the mapping curve based on the dark area enhancement intensity.
In some embodiments of the present application, based on the foregoing solution, the video conversion processing apparatus 600 further includes: the adjusting unit is configured to perform scene detection on the SDR video to obtain at least one scene in the SDR video; counting a first proportion occupied by video frames with brightness exceeding a first brightness threshold value and a second proportion occupied by video frames with brightness lower than a second brightness threshold value in each scene; calculating an adjustment factor of an input control parameter according to the first proportion and the second proportion; adjusting the input control parameter based on the adjustment factor.
In some embodiments of the present application, based on the foregoing scheme, the generating unit 608 is configured to: detecting a color distortion region in a video obtained by performing color space mapping processing on the SDR video, and detecting a high saturation region in the color distortion region; determining enhancement coefficients of all pixel points in a high saturation region based on a detection result of the high saturation region; performing color enhancement processing on the color distortion region based on a set basic enhancement coefficient and enhancement coefficients of all pixel points in the high saturation region to obtain a third video; generating the HDR video based on the third video.
In some embodiments of the present application, based on the foregoing scheme, the generating unit 608 is configured to: carrying out nonlinear filtering processing on the detection result of the high saturation region to obtain a filtering graph corresponding to the high saturation region; and carrying out normalized mapping processing on the filter graph corresponding to the high saturation region to obtain the enhancement coefficient of each pixel point in the high saturation region.
In some embodiments of the present application, based on the foregoing scheme, the generating unit 608 is configured to: calculating actual enhancement coefficients corresponding to all the pixel points in the high saturation region according to the basic enhancement coefficients and the enhancement coefficients of all the pixel points in the high saturation region; and carrying out color enhancement processing on the high saturation region according to the actual enhancement coefficient corresponding to each pixel point in the high saturation region, and carrying out color enhancement processing on the regions except the high saturation region in the color distortion region according to the basic enhancement coefficient.
In some embodiments of the present application, based on the foregoing solution, the video conversion processing apparatus 600 further includes: a fourth processing unit, configured to calculate a first order moment and a second order moment of a region corresponding to each pixel point included in a video frame image in the first video before performing expansion processing of a dynamic range based on the expansion coefficient of each pixel point and the first video, and obtain the first order moment and the second order moment corresponding to each pixel point; determining whether the video frame image contains a distortion area or not according to the first moment and the second moment corresponding to each pixel point; and if the video frame image is determined to contain a distortion area, filtering the distortion area.
In some embodiments of the present application, based on the foregoing solution, the second processing unit 604 is configured to: detecting an overexposed area and a low-brightness area contained in the SDR video based on at least one of a set soft threshold and a set hard threshold, and taking the overexposed area and the low-brightness area as the detail loss area.
FIG. 7 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 700 of the electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for system operation are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An Input/Output (I/O) interface 705 is also connected to the bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (15)

1. A video conversion processing method, comprising:
carrying out color space mapping processing and pixel value to scene illumination mapping processing on a standard dynamic range SDR video to be converted to obtain a first video;
detecting a detail loss area in the SDR video, and determining the expansion coefficient of each pixel point in the SDR video based on the detection result of the detail loss area;
performing dynamic range expansion processing on the first video based on the expansion coefficient of each pixel point to obtain a second video;
generating a High Dynamic Range (HDR) video based on the second video.
2. The video conversion processing method of claim 1, wherein determining the expansion coefficient of each pixel point in the SDR video based on the detection result of the detail loss region comprises:
acquiring a region detection map obtained by detecting a detail loss region;
performing adaptive nonlinear filtering processing on the region detection image to obtain a filtering image obtained after filtering processing is performed on the detail loss region;
and carrying out normalized mapping processing on the filter graph to obtain the expansion coefficient of each pixel point in the SDR video.
3. The video conversion processing method according to claim 1, wherein performing dynamic range expansion processing on the first video based on the expansion coefficient of each pixel point to obtain a second video, includes:
calculating actual expansion coefficients corresponding to the pixel points according to the expansion coefficients of the pixel points and the whole expansion coefficients corresponding to the SDR video;
and according to the actual expansion coefficient corresponding to each pixel point, uniformly stretching a plurality of color components of each corresponding pixel point in the first video to obtain the second video.
4. The video conversion processing method according to claim 3, wherein calculating an actual expansion coefficient corresponding to each pixel point according to the expansion coefficient of each pixel point and the whole expansion coefficient corresponding to the SDR video comprises:
and calculating the product of the expansion coefficient of each pixel point and the integral expansion coefficient corresponding to the SDR video so as to obtain the actual expansion coefficient corresponding to each pixel point.
5. The video conversion processing method according to claim 3, further comprising:
obtaining input control parameters and a required maximum luminance for the HDR video, the input control parameters including a saturated maximum luminance;
calculating a ratio between the saturated maximum luminance and the required maximum luminance to obtain the global expansion coefficient.
6. The video conversion processing method according to claim 1, wherein before generating the high dynamic range HDR video based on the second video, the video conversion processing method further comprises:
the second video is globally mapped through a mapping curve to perform enhancement processing on a dark region in the second video, wherein the mapping curve is a piecewise function, the piecewise function comprises an exponential function corresponding to the dark region and a linear function corresponding to a non-dark region, and a function curve of the exponential function and a function curve of the linear function are continuously derivable at a junction.
7. The video conversion processing method according to claim 6, further comprising:
acquiring input control parameters, wherein the input control parameters comprise dark area enhancement intensity;
adjusting an intensity of enhancement processing of the second video based on the mapping curve based on the dark region enhancement intensity.
8. The video conversion processing method according to claim 5 or 7, further comprising:
performing scene detection on the SDR video to obtain at least one scene in the SDR video;
counting a first proportion occupied by video frames with brightness exceeding a first brightness threshold value and a second proportion occupied by video frames with brightness lower than a second brightness threshold value in each scene;
calculating an adjustment factor of an input control parameter according to the first proportion and the second proportion;
adjusting the input control parameter based on the adjustment factor.
9. The video conversion processing method according to claim 1, wherein generating a High Dynamic Range (HDR) video based on the second video comprises:
detecting a color distortion region in a video obtained by performing color space mapping processing on the SDR video, and detecting a high saturation region in the color distortion region;
determining enhancement coefficients of all pixel points in a high saturation region based on a detection result of the high saturation region;
performing color enhancement processing on the color distortion region based on a set basic enhancement coefficient and enhancement coefficients of all pixel points in the high saturation region to obtain a third video;
generating the HDR video based on the third video.
10. The method of claim 9, wherein determining the enhancement factor of each pixel in the high saturation region based on the detection result of the high saturation region comprises:
carrying out nonlinear filtering processing on the detection result of the high saturation region to obtain a filtering graph corresponding to the high saturation region;
and carrying out normalized mapping processing on the filter graph corresponding to the high saturation region to obtain the enhancement coefficient of each pixel point in the high saturation region.
11. The video conversion processing method according to claim 9, wherein performing color enhancement processing on the color distortion region based on the set basic enhancement coefficient and the enhancement coefficient of each pixel point in the high saturation region comprises:
calculating actual enhancement coefficients corresponding to all the pixel points in the high saturation region according to the basic enhancement coefficients and the enhancement coefficients of all the pixel points in the high saturation region;
and carrying out color enhancement processing on the high saturation region according to the actual enhancement coefficient corresponding to each pixel point in the high saturation region, and carrying out color enhancement processing on the regions except the high saturation region in the color distortion region according to the basic enhancement coefficient.
12. The video conversion processing method according to any one of claims 1 to 7 and 9 to 11, wherein before the dynamic range expansion processing based on the expansion coefficient of each pixel point and the first video, the video conversion processing method further includes:
calculating a first moment and a second moment of a region corresponding to each pixel point contained in a video frame image in the first video to obtain the first moment and the second moment corresponding to each pixel point;
determining whether the video frame image contains a distortion area or not according to the first moment and the second moment corresponding to each pixel point;
and if the video frame image is determined to contain a distortion area, filtering the distortion area.
13. The video conversion processing method according to any one of claims 1-7 and 9-11, wherein detecting the detail loss region in the SDR video comprises:
detecting an overexposed area and a low-brightness area contained in the SDR video based on at least one of a set soft threshold and a set hard threshold, and taking the overexposed area and the low-brightness area as the detail loss area.
14. A video conversion processing apparatus, comprising:
the first processing unit is configured to perform color space mapping processing and pixel value to scene illumination mapping processing on the SDR video to be converted to obtain a first video;
the second processing unit is configured to detect a detail loss area in the SDR video and determine expansion coefficients of all pixel points in the SDR video based on a detection result of the detail loss area;
the expansion unit is configured to perform dynamic range expansion processing on the first video based on the expansion coefficient of each pixel point to obtain a second video;
a generating unit configured to generate an HDR video based on the second video.
15. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the video conversion processing method of any of claims 1 to 13.
CN202011642805.8A 2020-12-30 2020-12-30 Video conversion processing method and device, computer readable medium and electronic equipment Active CN113518185B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011642805.8A CN113518185B (en) 2020-12-30 2020-12-30 Video conversion processing method and device, computer readable medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011642805.8A CN113518185B (en) 2020-12-30 2020-12-30 Video conversion processing method and device, computer readable medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113518185A true CN113518185A (en) 2021-10-19
CN113518185B CN113518185B (en) 2022-08-05

Family

ID=78060176

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011642805.8A Active CN113518185B (en) 2020-12-30 2020-12-30 Video conversion processing method and device, computer readable medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113518185B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114051126A (en) * 2021-12-06 2022-02-15 北京达佳互联信息技术有限公司 Video processing method and video processing device
CN114501023A (en) * 2022-03-31 2022-05-13 深圳思谋信息科技有限公司 Video processing method and device, computer equipment and storage medium
CN114866809A (en) * 2022-06-13 2022-08-05 百果园技术(新加坡)有限公司 Video conversion method, device, equipment, storage medium and program product
CN115293994A (en) * 2022-09-30 2022-11-04 腾讯科技(深圳)有限公司 Image processing method, image processing device, computer equipment and storage medium
CN115442636A (en) * 2022-07-19 2022-12-06 广州博冠信息科技有限公司 Live video stream conversion method, device, equipment and storage medium
WO2023125467A1 (en) * 2021-12-30 2023-07-06 北京字跳网络技术有限公司 Image processing method and apparatus, electronic device and readable storage medium
WO2023241339A1 (en) * 2022-06-13 2023-12-21 广州市百果园信息技术有限公司 Color cast correction method and apparatus, device, storage medium and program product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101595719A (en) * 2006-11-27 2009-12-02 杜比实验室特许公司 Be used for increasing the equipment and the method for the dynamic range of digital picture
CN102625060A (en) * 2011-01-31 2012-08-01 海力士半导体有限公司 Dynamic range extension for CMOS image sensors for mobile applications
CN105850114A (en) * 2013-12-27 2016-08-10 汤姆逊许可公司 Method for inverse tone mapping of an image
CN106886985A (en) * 2017-04-25 2017-06-23 哈尔滨工业大学 A kind of self adaptation enhancement method of low-illumination image for reducing colour cast
CN109544463A (en) * 2018-10-17 2019-03-29 天津大学 The inverse tone mapping (ITM) method of image content-based
CN110807735A (en) * 2018-08-06 2020-02-18 Tcl集团股份有限公司 Image processing method, image processing device, terminal equipment and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101595719A (en) * 2006-11-27 2009-12-02 杜比实验室特许公司 Be used for increasing the equipment and the method for the dynamic range of digital picture
CN102625060A (en) * 2011-01-31 2012-08-01 海力士半导体有限公司 Dynamic range extension for CMOS image sensors for mobile applications
US20120195502A1 (en) * 2011-01-31 2012-08-02 Hynix Semiconductor Inc. Dynamic range extension for cmos image sensors for mobile applications
CN105850114A (en) * 2013-12-27 2016-08-10 汤姆逊许可公司 Method for inverse tone mapping of an image
CN106886985A (en) * 2017-04-25 2017-06-23 哈尔滨工业大学 A kind of self adaptation enhancement method of low-illumination image for reducing colour cast
CN110807735A (en) * 2018-08-06 2020-02-18 Tcl集团股份有限公司 Image processing method, image processing device, terminal equipment and computer readable storage medium
CN109544463A (en) * 2018-10-17 2019-03-29 天津大学 The inverse tone mapping (ITM) method of image content-based

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114051126A (en) * 2021-12-06 2022-02-15 北京达佳互联信息技术有限公司 Video processing method and video processing device
CN114051126B (en) * 2021-12-06 2023-12-19 北京达佳互联信息技术有限公司 Video processing method and video processing device
WO2023125467A1 (en) * 2021-12-30 2023-07-06 北京字跳网络技术有限公司 Image processing method and apparatus, electronic device and readable storage medium
CN114501023A (en) * 2022-03-31 2022-05-13 深圳思谋信息科技有限公司 Video processing method and device, computer equipment and storage medium
CN114866809A (en) * 2022-06-13 2022-08-05 百果园技术(新加坡)有限公司 Video conversion method, device, equipment, storage medium and program product
WO2023241339A1 (en) * 2022-06-13 2023-12-21 广州市百果园信息技术有限公司 Color cast correction method and apparatus, device, storage medium and program product
CN114866809B (en) * 2022-06-13 2024-02-23 百果园技术(新加坡)有限公司 Video conversion method, apparatus, device, storage medium, and program product
CN115442636A (en) * 2022-07-19 2022-12-06 广州博冠信息科技有限公司 Live video stream conversion method, device, equipment and storage medium
CN115293994A (en) * 2022-09-30 2022-11-04 腾讯科技(深圳)有限公司 Image processing method, image processing device, computer equipment and storage medium
CN115293994B (en) * 2022-09-30 2022-12-16 腾讯科技(深圳)有限公司 Image processing method, image processing device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113518185B (en) 2022-08-05

Similar Documents

Publication Publication Date Title
CN113518185B (en) Video conversion processing method and device, computer readable medium and electronic equipment
Rao et al. A Survey of Video Enhancement Techniques.
KR102049481B1 (en) Electronic device for performing image conversion and method thereof
JP5086067B2 (en) Method for encoding a high dynamic range image, data structure for representing, and encoding apparatus
KR101831551B1 (en) High dynamic range image generation and rendering
KR20160102524A (en) Method for inverse tone mapping of an image
KR20120107429A (en) Zone-based tone mapping
US20140079319A1 (en) Methods for enhancing images and apparatuses using the same
CN104335565A (en) Image processing method with detail-enhancing filter with adaptive filter core
WO2018231968A1 (en) Efficient end-to-end single layer inverse display management coding
CN110620924B (en) Method and device for processing coded data, computer equipment and storage medium
CN110310231B (en) Device and method for converting first dynamic range video into second dynamic range video
CN116188296A (en) Image optimization method and device, equipment, medium and product thereof
EP3639238A1 (en) Efficient end-to-end single layer inverse display management coding
Song et al. Luminance enhancement and detail preservation of images and videos adapted to ambient illumination
CN112153240B (en) Method and device for adjusting image quality and readable storage medium
CN116468636A (en) Low-illumination enhancement method, device, electronic equipment and readable storage medium
CN115471413A (en) Image processing method and device, computer readable storage medium and electronic device
CN115239578A (en) Image processing method and device, computer readable storage medium and terminal equipment
CN112488933A (en) Video detail enhancement method and device, mobile terminal and storage medium
CN113613024A (en) Video preprocessing method and device
CN111031301A (en) Method for adjusting color gamut space, storage device and display terminal
CN111754412B (en) Method and device for constructing data pair and terminal equipment
US10848772B2 (en) Histogram-based edge/text detection
Khan et al. Unified implementation of global high dynamic range image tone-mapping algorithms

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40053185

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant