WO2022111269A1 - Method and device for enhancing video details, mobile terminal, and storage medium - Google Patents

Method and device for enhancing video details, mobile terminal, and storage medium Download PDF

Info

Publication number
WO2022111269A1
WO2022111269A1 PCT/CN2021/129369 CN2021129369W WO2022111269A1 WO 2022111269 A1 WO2022111269 A1 WO 2022111269A1 CN 2021129369 W CN2021129369 W CN 2021129369W WO 2022111269 A1 WO2022111269 A1 WO 2022111269A1
Authority
WO
WIPO (PCT)
Prior art keywords
parameter
video
parameters
video data
detail enhancement
Prior art date
Application number
PCT/CN2021/129369
Other languages
French (fr)
Chinese (zh)
Inventor
杨敏
Original Assignee
百果园技术(新加坡)有限公司
杨敏
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 百果园技术(新加坡)有限公司, 杨敏 filed Critical 百果园技术(新加坡)有限公司
Publication of WO2022111269A1 publication Critical patent/WO2022111269A1/en

Links

Images

Classifications

    • G06T5/77
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person

Definitions

  • the embodiments of the present application relate to the technical field of computer vision, for example, to a video detail enhancement method, apparatus, mobile terminal, and storage medium.
  • the sharpness of video data is an evaluation index of video quality. Therefore, the sharpness of video data will be improved in business operations, and most of the methods to improve sharpness are detail enhancement. Afterwards, detail enhancement processing is typically performed on the video data.
  • the detail enhancement processing will bring about negative effects such as distortion, and the detail enhancement processing is continuously performed, which consumes a lot of computing power. Enhancement processing is less robust.
  • the embodiments of the present application propose a video detail enhancement method, device, mobile terminal, and storage medium, so as to perform detail enhancement processing on video data under the condition of limited performance, reduce negative effects and improve robustness.
  • an embodiment of the present application provides a video detail enhancement method, which is applied to a mobile terminal, and the method includes:
  • parameters related to detail enhancement processing are collected from the environment as environment parameters;
  • the state in which the detail enhancement processing is performed on the video data is determined according to the environment parameter and the video parameter.
  • an embodiment of the present application further provides a video detail enhancement device, which is applied to a mobile terminal, and the device includes:
  • the video data acquisition module is set to collect video data
  • an environment parameter collection module configured to collect parameters related to detail enhancement processing from the environment as environment parameters during the process of collecting the video data
  • a video parameter collection module configured to collect parameters related to detail enhancement processing from the video data as video parameters
  • An enhancement state determination module configured to determine the state of performing the detail enhancement processing on the video data according to the environment parameter and the video parameter.
  • an embodiment of the present application further provides a mobile terminal, where the mobile terminal includes:
  • processors one or more processors
  • memory arranged to store one or more programs
  • the one or more programs When executed by the one or more processors, the one or more programs cause the one or more processors to implement the video detail enhancement method as described in the first aspect.
  • an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, realizes the video according to the first party. Detail enhancement method.
  • FIG. 1 is a flowchart of a method for enhancing details of a video provided by an embodiment of the present application
  • FIG. 2 is a flowchart of a service operation provided by an embodiment of the present application
  • FIG. 3 is a frequency comparison diagram of video data and environmental parameters provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of a method for enhancing details of a video provided by another embodiment of the present application.
  • FIG. 5 is a comparative example diagram of a detail enhancement process provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a video detail enhancement apparatus provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
  • These detail enhancement processing can be sorted into template-based detail enhancement processing, filtering algorithm-based detail enhancement processing, and deep learning-based detail enhancement processing according to the timeline.
  • This embodiment proposes an algorithm that takes both performance and effect into consideration.
  • the detail enhancement processing is applied to the video capture of the mobile terminal. While retaining the effect of the detail enhancement processing, it adapts to complex and diverse environments and filters out artifacts that are prone to produce artifacts. In the process of image processing, there are unnatural and abnormal traces, areas, flaws, etc. that can be seen as artificially processed, thus improving the quality of video data.
  • FIG. 1 is a flowchart of a video detail enhancement method provided by an embodiment of the present application. This embodiment is applicable to the case where a decision on whether to perform detail enhancement processing is performed according to the environment of the mobile terminal and the characteristics of the video data itself.
  • Executed by a video detail enhancement device which can be implemented by software and/or hardware, and can be configured in a mobile terminal, such as a mobile phone, tablet computer, smart wearable devices (such as smart watches, smart glasses, etc.) , etc., including the following steps:
  • Step 101 Collect video data.
  • the mobile terminal is configured with one or more cameras (Camera), which can be used for taking pictures and recording videos.
  • the camera can be set on the back of the mobile terminal (also known as a rear camera), or It may be set on the front of the mobile terminal (also known as a front-facing camera), etc., which is not limited in this embodiment of the present application.
  • the operating system of the mobile terminal includes Android (Android), iOS, Windows, etc., and can support the running of various applications, such as shopping applications, instant messaging applications, live broadcasting applications, video conference applications, short video applications, and so on.
  • Android Android
  • iOS iOS
  • Windows etc.
  • applications such as shopping applications, instant messaging applications, live broadcasting applications, video conference applications, short video applications, and so on.
  • these applications perform business operations, in S202, by calling the camera to collect video data, so as to carry out related business operations, for example, in the Android system, MediaRecorder can be called to collect video data, in iOS In the system, you can call AVCaptureFileOutputRecordingDelegate under AVFoundation to collect video data, and so on.
  • the video data collected by these applications can be used to undertake real-time business operations.
  • the video data collected by the shopping application can be used to carry the business operations of selling goods, that is, the anchor user explains and demonstrates the goods, and provides shopping links in the video data.
  • the video data collected by the instant messaging tool can be used to carry the business operation of the video call, that is, the multi-party users of the communication conduct a conversation.
  • the video data collected by the live broadcast application can be used to carry the live broadcast business operations, that is, the host user performs talent performances, game commentary, and the like.
  • the video data collected by the video conference application can be used to carry the business operations of the conference, that is, multiple users participating in the conference sequentially speak as the host.
  • video data collected by these applications can also undertake business operations with lower real-time requirements.
  • a short video application collects video data as a short video, and so on, which is not limited in this embodiment.
  • Step 102 In the process of collecting video data, parameters related to detail enhancement processing are collected from the environment as environment parameters.
  • parameters related to detail enhancement processing are collected for the environment in which the mobile terminal is located, as environment parameters.
  • the environment parameter may be a brightness value of light in an environment where the mobile terminal is located.
  • the noise level of the collected video data is relatively high. If the detail enhancement processing is performed at this time, the artifact phenomenon is likely to appear in the area where the noise is concentrated.
  • the detail enhancement processing increases the CPU (central processing unit, central processing unit) in the mobile terminal. ), memory and other resources, but there is no obvious actual benefit.
  • the mobile terminal is equipped with a sensor that detects light, such as a light intensity sensor, and its API (Application Programming Interface) is opened, the sensor can be directly called to detect the brightness value of the light in the environment where the mobile terminal is located.
  • a sensor that detects light such as a light intensity sensor, and its API (Application Programming Interface) is opened.
  • the sensor can be directly called to detect the brightness value of the light in the environment where the mobile terminal is located.
  • the brightness value of the light detected by the Light Intensity Sensor can be registered through the SensorManager.
  • the mobile terminal can automatically adjust the screen brightness according to the brightness value of the light, and automatically adjust the white balance according to the brightness value of the light when the camera is turned on.
  • the brightness value is mapped to the brightness value of the light in the environment where the mobile terminal is located, or the brightness value of the light in the environment where the mobile terminal is located is detected from the camera, and so on.
  • the frame rate at which the mobile terminal collects video data is generally different from the frame rate at which the environment parameters are collected, and the frame rate at which the environment parameters are collected is generally greater than the frame rate at which the video data is collected. There are often multiple environmental parameters in between.
  • the frame rate of video data collected by the mobile terminal is lower than the frame rate of environmental parameters collected by the sensor, and there are 7 frames of environmental parameters between the first frame of video data and the second frame of video data.
  • the image data and the environmental parameters may be aligned in a segmented manner.
  • parameters related to detail enhancement processing collected between the image data of the current frame and the image data of the previous frame are acquired in the environment as environmental parameters, so that the video data is used as a reference to divide the environmental parameters into Multi-segment.
  • the environmental parameter is smoothed, and the smoothed environmental parameter is used as the environmental parameter corresponding to the current frame image data, thereby highlighting the difference in the correlation between the image data and the environmental parameters at different time points in the time series , and subsequently use the environment parameter to perform detail enhancement processing on the frame of image data, so as to improve the quality of the detail enhancement processing.
  • a parameter weight can be configured for each environmental parameter, and the environmental weight can reflect the importance of the environmental parameter, that is, the more important environmental parameter, the greater the environmental weight.
  • the time stamp for collecting each piece of environmental parameters may be determined, and a parameter weight is set for each piece of environmental parameters based on the time stamp, wherein the parameter weight is positively correlated with the time stamp, that is, the closer the time of collecting environmental parameters to the current time, the more The stronger the correlation between the environmental parameters and the image data of the current frame, the greater the weight of the configured parameters.
  • the farther the time of collecting the environmental parameters is from the current time the worse the correlation between the environmental parameters and the image data of the current frame, the weight of the configured parameters.
  • the parameter weight may also be configured in other manners, for example, the inverse of the number of environmental parameters is used as the parameter weight, etc., which is not limited in this embodiment.
  • the ratio between the first target value and the second target value can be calculated, and the ratio can be used as the environmental parameter corresponding to the current frame image data, wherein the first target value is a multi-segment environmental parameter
  • the first target value is a multi-segment environmental parameter
  • the second target value is the sum of the parameter weights corresponding to the multi-stage environmental parameters respectively, and the environmental parameters are expressed as follows:
  • y ti is the i-th frame environmental parameter before the t-th frame of image data
  • w i is the weight of the i-th parameter
  • Step 103 Collect parameters related to detail enhancement processing from the video data as video parameters.
  • parameters related to detail enhancement processing can be collected from itself as video parameters, so as to characterize the characteristics of the shooting object.
  • the video parameter may be the resolution in the video data, the first probability that a pixel belongs to the skin, and the number of pixels representing the skin.
  • the resolution of the video data can be read from the MediaRecorder object, which reflects the fineness of the details in the image data.
  • the higher the resolution the more pixels it contains. The clearer the image data is.
  • the lower the resolution the fewer pixels it contains, and the more blurred the image data is.
  • the image data is more blurred. If the detail enhancement processing is performed at this time, The artifact phenomenon is easy to appear in the blurred area, and the detail enhancement processing increases the occupation of resources such as CPU and memory in the mobile terminal, but there is no obvious actual benefit.
  • video data is usually beautified, such as skin resurfacing, etc. If detail enhancement is performed at this time, artifact is prone to appear in the area where the skin is located. phenomenon, the detail enhancement processing increases the occupation of resources such as CPU and memory in the mobile terminal, but there is no obvious actual benefit.
  • the video data has multiple frames of image data, and each frame of image data includes multiple pixels.
  • skin color detection can be performed on each frame of image data by means of a parameterized model, a non-parametric model, or the like, Calculate the first probability of belonging to the skin for each pixel in each frame of image data, in response to determining that the first probability is greater than a preset skin color threshold, determine that the pixel represents the skin, and count the number of at least one pixel representing the skin , and the quantity of the at least one pixel is taken as the quantity of skin color.
  • the parametric model is based on the assumption that skin color can obey the Gaussian probability distribution model, and the non-parametric model estimates the skin color histogram and compares it with the histogram of the training set.
  • the video data collected by the camera is mostly YUV (“Y” represents the brightness (Luminance or Luma), that is, the grayscale value, and “U” and “V” represent the chromaticity. (Chrominance or Chroma), which is used to describe the color and saturation of the image, and is used to specify the color of the pixel) format.
  • YUV represents the brightness (Luminance or Luma)
  • RGB Red Green Blue, Red Green Blue
  • each frame of image data can be converted from YUV color space to RGB color space by the following conversion relationship:
  • the R (red), G (green), and B (blue) components of each pixel in the image data are traversed to determine whether the pixel meets the preset threshold condition.
  • the first probability that the pixel points belong to the skin is set to 1.
  • the first probability that the pixel belongs to the skin is set to 0.
  • the threshold conditions include:
  • the R component is greater than the first color threshold, the G component is greater than the second color threshold, the B component is greater than the third color threshold, the R component is greater than the G component, and the R component is greater than the B component;
  • the difference between the maximum value of the R component, the G component, and the B component and the minimum value of the R component, the G component, and the B component is greater than the fourth color threshold
  • the difference between the R component and the G component is greater than the fifth color threshold.
  • the threshold conditions are expressed as follows:
  • the threshold condition can also be equivalent to the YUV color space through conversion formulas such as BT601.FullRange, and skin color detection is performed in the YUV color space.
  • the threshold condition is Cb>77, Cb ⁇ 127, 133 ⁇ Cr ⁇ 173, etc., which are not limited in this embodiment.
  • the threshold condition can meet the requirements, and the threshold condition is simple, using statistical
  • the method is simple, the operation is simple, and the execution time of the skin color detection can be effectively reduced.
  • video parameters and their detection methods are only examples.
  • other video parameters and their detection methods may be set according to actual conditions, such as the average brightness value of image data, etc. Unrestricted.
  • those skilled in the art may also adopt other video parameters and their detection methods according to actual needs, which are not limited in this embodiment.
  • Step 104 Determine the state of performing detail enhancement processing on the video data according to the environment parameter and the video parameter.
  • the environment parameters related to the detail enhancement processing are combined with the video parameters to estimate the difference between the current environment where the mobile terminal is located, the photographed object and the detail enhancement processing. Therefore, based on the degree of adaptation, a decision is made to determine the state of performing detail enhancement processing on the video data, that is, to decide whether to perform detail enhancement processing. When certain conditions are met, it is allowed to perform detail enhancement processing on the video data. , when this condition is not met, the detail enhancement processing on the video data is prohibited.
  • step 104 includes the following steps:
  • Step 1041 For the multiple frames of image data in the video data, compare the environmental parameters with the preset environmental conditions, and compare the video parameters with the preset video conditions, respectively.
  • corresponding environmental conditions can be preset for the environmental parameters, and the environmental conditions are used to indicate the degree of adaptation between the environment where the mobile terminal is located and the detail enhancement processing; on the other hand, for the video parameters
  • a video condition may be preset, and the video condition is used to indicate the degree of adaptation between the object photographed by the mobile terminal and the detail enhancement processing.
  • the environmental parameter includes the brightness value of light
  • the video parameter includes the resolution of the video data and the number of skin color, where the number of skin color is the number of pixels representing the skin.
  • the luminance value is compared to a preset luminance threshold.
  • the environment where the mobile terminal is located is not a dark light environment, and at this time, it can be determined that the environmental parameters meet the environmental conditions; in response to determining that the brightness value is less than or equal to the preset brightness threshold, it means that The environment where the mobile terminal is located belongs to a dark light environment, and at this time, it can be determined that the environmental parameters do not meet the environmental conditions.
  • the resolution of the video data is compared with a preset resolution threshold, and the ratio between the number of skin colors and the resolution of the video data is calculated as the skin color ratio, and the skin color ratio is compared with the preset skin color threshold.
  • the video parameters can be determined. Meet the video conditions; in response to determining that the resolution of the video data is less than or equal to the preset resolution threshold, and/or, the skin color ratio is greater than or equal to the preset skin color threshold, indicating that the video data is relatively blurred, and the object photographed by the mobile terminal is Characters are the main character. At this time, it may not be determined that the video parameters meet the video conditions.
  • the environmental condition f 1 and the video condition f 2 are expressed as follows:
  • ⁇ 1 is the brightness threshold
  • ⁇ 2 is the resolution threshold
  • ⁇ 3 is the skin color threshold
  • the above environmental conditions and video conditions are only examples.
  • other environmental conditions and video conditions may be set according to the actual conditions of the environmental parameters and video parameters.
  • the environmental parameter is the CPU occupancy rate
  • the video parameter is an average brightness value
  • the average brightness value is greater than the preset video brightness threshold
  • the video parameter satisfies the video condition, etc.
  • those skilled in the art can also adopt other environmental conditions and video conditions according to actual needs, which are not limited in this embodiment.
  • Step 1042 In response to determining that the environmental parameters satisfy the environmental conditions and the video parameters satisfy the video conditions, determine that the image data matches the detail enhancement processing.
  • the environmental parameters of a certain frame of image data meet the environmental conditions and the video parameters meet the video conditions, it means that when the frame of image data is captured, the degree of adaptation between the environment where the mobile terminal is located and the detail enhancement processing is high, and the mobile terminal The degree of fit between the captured subject and the detail enhancement processing is high.
  • Step 1043 Based on the distribution of the image data matching the detail enhancement processing, set the state of performing the detail enhancement processing on the video data.
  • the proportion of the image data of the matching detail enhancement process in the part of the image data may be calculated, the proportion is taken as the matching ratio, and the matching ratio is compared with a preset matching threshold.
  • the matching ratio is greater than or equal to the preset matching threshold, it means that the environment where the mobile terminal is located is relatively stably adapted to the detail enhancement processing, and the object photographed by the mobile terminal is relatively stably adapted to the detail enhancement processing.
  • Detail enhancement processing is performed on video data.
  • the environment where the mobile terminal is located and the objects photographed by the mobile terminal are relatively stable.
  • the environmental parameters and video parameters can no longer be detected. According to the environmental parameters and video parameters to determine the state of performing detail enhancement processing on video data, to avoid frequent switching of detail enhancement processing, resulting in sudden changes in the picture of the video data.
  • the video data may be subjected to subsequent processing according to the business scenario, which is not limited in this embodiment.
  • the video data can be displayed on the screen, and in S209, the video data can be encoded, such as according to H.264 Format encoding, and encapsulate it in FLV (Flash Video, streaming media) format, waiting to be transmitted to the device that plays the video data.
  • FLV Flash Video, streaming media
  • video data is collected, and in the process of collecting video data, parameters related to detail enhancement processing are collected from the environment as environmental parameters, and parameters related to detail enhancement processing are collected from video data as video parameters. , according to the environmental parameters and video parameters to determine the state of performing detail enhancement processing on the video data.
  • the environmental parameters and video parameters to determine the state of performing detail enhancement processing on the video data.
  • the normal execution of the detail enhancement processing is guaranteed. , so as to ensure the quality of the video data.
  • the execution of the detail enhancement processing is prohibited, the frequency of the detail enhancement processing is reduced, and the details are saved. Enhance the computing power of processing, reduce the occupation of CPU, memory and other resources, reserve more computing power to ensure the normal execution of business operations, and finally improve the flexibility of detail enhancement processing and improve the robustness of detail enhancement processing.
  • FIG. 4 is a flowchart of a video detail enhancement method provided by another embodiment of the present application. Based on the foregoing embodiment, this embodiment further adds detail enhancement processing operations, and deploys detail enhancement processing on a mobile terminal to record video In the process of data recording, users can perceive the effect of detail enhancement processing in real time, which can maximize the user's experience of shooting video data. A better input to improve the viewing experience, the method includes the following steps:
  • Step 401 Collect video data.
  • Step 402 In the process of collecting video data, parameters related to detail enhancement processing are collected from the environment as environment parameters.
  • Step 403 Collect parameters related to detail enhancement processing from the video data as video parameters.
  • Step 404 Determine the state of performing detail enhancement processing on the video data according to the environment parameter and the video parameter.
  • Step 405 In the process of echoing video data, parameters related to detail enhancement processing are collected as echo parameters.
  • an echo operation can be performed, that is, the video data collected by the camera is displayed on the screen of the mobile terminal, as shown in Figure 2, in S205, during the process of echoing the video data,
  • the parameters related to detail enhancement processing are collected for echo and used as echo parameters.
  • the echo parameter includes the resolution of the screen.
  • the resolution of the screen can be read by calling the DisplayMetries object or the like.
  • the environment parameters, video parameters, and echo parameters are passed to the code corresponding to the detail enhancement processing through JNI (Java Native Interface, Java Native Interface), etc., waiting for the detail enhancement processing to be performed on each frame of image data in the video data. .
  • JNI Java Native Interface, Java Native Interface
  • Step 406 In response to determining that the state is to allow the detail enhancement processing to be performed on the video data, calculate the adjustment parameters according to the environmental parameters, the video parameters and the echo parameters.
  • the environmental parameters, video parameters and echo parameters can be comprehensively measured, thereby calculating the parameters for adjusting the detail enhancement processing, as the adjustment parameters
  • the The adjustment parameters can be used to adjust the intensity of the detail enhancement processing, that is, to adjust the intensity of the detail enhancement processing performed by each pixel in each frame of image data, thereby adjusting the detail enhancement processing, so that the detail enhancement processing can be used in the environment where the mobile terminal is located, and the mobile terminal. A better comprehensive performance is achieved between the photographed object and the echo effect of the mobile terminal.
  • step 406 includes the following steps:
  • Step 4061 Convert the video parameters to the first target parameters participating in the detail enhancement process.
  • Step 4062 Convert the echo parameter to the second target parameter participating in the detail enhancement process.
  • the environment parameters, video parameters, and echo parameters are normalized, the video parameters are converted into the first target parameters participating in the detail enhancement processing, and the echo parameters are converted into the second target parameters involved in the detail enhancement processing. target parameters, so as to perform linear fusion with the environmental parameters and the second target parameters at the same scale.
  • the video parameters include a first probability that a pixel belongs to skin and a resolution of the video data.
  • the first probability can be subtracted from one to obtain a second probability that the pixel belongs to non-skin, the The second probability is the first target parameter.
  • the skin color area is considered as smooth as possible from the user's subjective aesthetic point of view, if the details of the skin color area are enhanced, it is easy to enter the artifact. Although the clarity is improved, the quality of the video data is degraded.
  • the pixel points belong to the second probability of non-skin, which can reduce the detail enhancement of the skin and increase the detail enhancement of the non-skin in the detail enhancement process.
  • the echo parameter includes the resolution of the screen, then in this example, the ratio between the resolution of the video data and the resolution of the screen is calculated, and the ratio is used as the display ratio, and the display ratio is The second target parameter.
  • Step 4063 linearly fuse the environmental parameters, the first target parameters and the second target parameters to obtain adjustment parameters.
  • the environmental parameter, the first target parameter and the second target parameter can be linearly fused to obtain the adjustment parameter, that is, the adjustment parameter is positively correlated with the environmental parameter, the first target parameter, and the second target parameter, that is, the environment
  • the environment parameter includes the brightness value of light
  • the first target parameter includes the second probability that the pixel belongs to non-skin
  • the second target parameter includes the display ratio
  • the first adjustment weight, the second adjustment weight, and the third adjustment weight can be set by those skilled in the art according to the actual situation.
  • the second adjustment weight is dominant, that is, the second adjustment weight is larger than the first adjustment weight.
  • the weight, the third adjustment weight, etc. are not limited in this embodiment.
  • the second adjustment value represents the product between the second probability and the second adjustment weight
  • the third adjustment value represents the product between the display scale rate and the third adjustment weight.
  • a preset second adjustment coefficient is added on the basis of the product between the fourth adjustment value and the preset first adjustment coefficient as an adjustment parameter.
  • the tuning parameters are as follows:
  • the S ti table is the adjustment parameter of the i-th pixel point of the t-th frame, is the brightness value, p 1 is the first probability, p 2 is the second probability, R 1 is the resolution of the video data, R 2 is the resolution of the screen, r is the display ratio, ⁇ is the first adjustment weight, and ⁇ is the first adjustment weight.
  • the second adjustment weight, ⁇ is the third adjustment weight, k is the first adjustment coefficient, and b is the second adjustment coefficient.
  • Step 407 Perform detail enhancement processing on the video data according to the adjustment parameters.
  • the relevant parameters in the detail enhancement process may be adjusted according to the intensity (ie, the adjustment parameter), so as to perform the detail enhancement process on the video data.
  • step 407 may include the following steps:
  • Step 4071 Extract details from the image data of the video data to obtain original detail data.
  • the video data may be filtered by methods such as box filtering, mean filtering, etc., so as to extract details from the image data of the video data as original detail data.
  • Step 4072 Adjust the original detail data based on the adjustment parameter to obtain the target detail data.
  • the adjustment parameters are applied to the original detail data and adjusted to realize the intensity adjustment of the detail enhancement processing.
  • the adjustment weight can be queried, and the adjustment weight and the adjustment parameter are multiplied by the original detail data to obtain the target detail data.
  • the adjustment parameter can also be multiplied by the original detail data to obtain the target detail data, etc., which is not limited in this embodiment.
  • Step 4073 superimpose the target detail data on the image data.
  • the target detail data after adjusting the adjustment parameters can be superimposed on the original image data by means such as USM sharpening, and the image data after detail enhancement can be obtained.
  • the detail enhancement processing is expressed as follows:
  • y t (i,j) y t (i,j)+ ⁇ *S ti *D t (i,j)
  • y t (i, j) is the image data after detail enhancement
  • y t (i, j) is the image data before detail enhancement
  • is the adjustment weight
  • S ti is the adjustment parameter
  • the detail enhancement processing can be performed under a certain channel (such as the Y channel in the YUV color space and the G channel in the RGB color space) to which the user is sensitive, and the obtained detail enhancement channel (such as Y t ) is fused with other channels (such as U t V t ) to obtain video data with improved definition.
  • a certain channel such as the Y channel in the YUV color space and the G channel in the RGB color space
  • the obtained detail enhancement channel such as Y t
  • other channels such as U t V t
  • the left side is the original image data
  • the right side is the image data after the detail enhancement processing is performed by applying this embodiment.
  • the right image data is compared with the left image data in the background of plants. In the area where the character's collar area has a noticeable improvement in sharpness.
  • the above-mentioned detail enhancement processing is just an example.
  • the detail enhancement processing can be set according to the actual situation. size, etc., which are not limited in this embodiment.
  • those skilled in the art may also adopt other detail enhancement processing according to actual needs, which is not limited in this embodiment.
  • subsequent processing may be performed according to the service scenario, which is not limited in this embodiment.
  • the video data after the detail enhancement processing is displayed on the screen, and in S209, the video data after the detail enhancement is encoded, for example, according to the H.264 format, and packaged as FLV format, waiting to be transferred to the device that plays the video data.
  • the detail enhancement processing in response to determining that the detail enhancement processing is allowed to be performed on the video data, in the process of echoing the video data, parameters related to the detail enhancement processing are collected for the echoing, and are used as the echoing parameters, according to the environmental parameters, video parameters
  • the adjustment parameters are calculated with the echo parameters, and the detail enhancement processing is performed on the video data according to the adjustment parameters, so that the detail enhancement intensity is adapted to the environment where the mobile terminal is located, the objects photographed by the mobile terminal, and the echo effect of the mobile terminal as a whole.
  • the efficiency of power utilization due to the consideration of the effect of detail enhancement processing and the consideration of computational complexity, makes it possible to apply detail enhancement processing in the process of real-time video communication on mobile terminals or in the process of collecting short videos.
  • FIG. 6 is a structural block diagram of a video detail enhancement apparatus provided by an embodiment of the present application.
  • the apparatus may include the following modules:
  • the environment parameter collection module 602 is configured to collect parameters related to detail enhancement processing from the environment as environment parameters during the process of collecting the video data;
  • a video parameter collection module 603, configured to collect parameters related to detail enhancement processing from the video data as video parameters;
  • the enhancement state determining module 604 is configured to determine the state of performing the detail enhancement processing on the video data according to the environment parameter and the video parameter.
  • the video data has multiple frames of image data, and each frame of image data includes multiple pixels;
  • the environmental parameter collection module 602 includes:
  • a parameter acquisition sub-module configured to acquire parameters related to detail enhancement processing collected between the image data of the current frame and the image data of the previous frame in the environment, as environmental parameters;
  • the smoothing processing sub-module is configured to perform smoothing processing on the environmental parameters, and use the smoothed environmental parameters as the environmental parameters corresponding to the image data of the current frame.
  • the environmental parameters are divided into multiple segments, and the smoothing sub-module includes:
  • the parameter weight configuration unit which is set to configure the parameter weight for each environmental parameter
  • the ratio calculation unit is configured to calculate the ratio between the first target value and the second target value, and use the ratio as the environmental parameter corresponding to the image data of the current frame, wherein the first target value is a plurality of environmental parameters corresponding to The sum value of the products between the parameter weights, the second target value is the sum value between the parameter weights corresponding to the multi-segment environment parameters respectively.
  • the parameter weight configuration unit includes:
  • a timestamp determining subunit configured to determine a timestamp for collecting the environmental parameters of each segment
  • the parameter weight setting subunit is configured to set a parameter weight for each segment of environmental parameters based on the timestamp, where the parameter weight is positively correlated with the timestamp.
  • the video data has multiple frames of image data, and each frame of image data includes multiple pixels;
  • the video parameter collection module 603 includes:
  • a first probability calculation submodule configured to calculate the first probability of belonging to the skin for each pixel in the image data of each frame
  • a skin color pixel point determination submodule configured to determine that the pixel point corresponding to the first probability represents the skin in response to determining that the first probability is greater than a preset skin color threshold
  • the skin color quantity counting sub-module is configured to count the quantity of at least one pixel point representing the skin, and use the quantity of the at least one pixel point as the skin color quantity.
  • the first probability calculation submodule includes:
  • the color space conversion unit is set to convert each frame of image data from the YUV color space to the RGB color space;
  • the first numerical value setting unit is set to in the RGB color space, in response to determining that the pixel points in each frame of image data meet the preset threshold condition, the first probability that the pixel points belong to the skin is set to 1 ;
  • a second numerical value setting unit configured to set the first probability that the pixel belongs to the skin to 0 in response to determining that the pixel in each frame of image data does not meet the preset threshold condition
  • the threshold condition includes:
  • the R component is greater than the first color threshold, the G component is greater than the second color threshold, the B component is greater than the third color threshold, the R component is greater than the G component, and the R component is greater than the B component;
  • the difference between the maximum value of the R component, the G component, and the B component and the minimum value of the R component, the G component, and the B component is greater than the fourth color threshold
  • the difference between the R component and the G component is greater than the fifth color threshold.
  • the enhanced state determination module 604 includes:
  • Condition comparison submodule is set to for the multi-frame image data in the described video data, compares described environment parameter and preset environment condition respectively, and described video parameter is compared with preset video condition;
  • an image matching submodule configured to determine that the image data matches the detail enhancement processing in response to determining that the environmental parameter satisfies the environmental condition and the video parameter satisfies the video condition;
  • a distribution setting sub-module configured to set a state of performing the detail enhancement processing on the video data based on the distribution of the image data matching the detail enhancement processing.
  • the environmental parameter includes a brightness value of light
  • the video parameter includes the resolution of the video data and the number of skin colors, and the number of skin colors is the number of pixels representing skin;
  • the conditional comparison submodule includes:
  • an environmental condition satisfaction determination unit configured to determine that the environmental parameter satisfies the environmental condition in response to determining that the brightness value is greater than a preset brightness threshold
  • a resolution comparison unit configured to compare the resolution of the video data with a preset resolution threshold
  • a skin color ratio calculation unit set to calculate the ratio between the skin color number and the resolution of the video data, as the skin color ratio
  • the video condition satisfaction determination unit is configured to determine that the video parameter satisfies the video condition in response to determining that the resolution of the video data is greater than a preset resolution threshold and the skin color ratio is less than the preset skin color threshold.
  • the distribution setting sub-module includes:
  • a matching ratio calculation unit configured to calculate the ratio of the image data matching the detail enhancement processing in the video data, and use the ratio as a matching ratio
  • an enhancement unit configured to allow the detail enhancement processing to be performed on the video data in response to determining that the matching ratio is greater than or equal to a preset matching threshold
  • a disabling enhancement unit configured to disallow performing the detail enhancement processing on the video data in response to determining that the matching ratio is smaller than a preset matching threshold.
  • the echo parameter acquisition module is configured to collect parameters related to the detail enhancement processing as echo parameters during the process of echoing the video data
  • An adjustment parameter calculation module configured to, in response to determining that the state is to allow the execution of detail enhancement processing on the video data, calculate an adjustment parameter according to the environmental parameter, the video parameter and the echo parameter, and the adjustment parameter uses for adjusting the intensity of the detail enhancement processing;
  • the detail enhancement processing execution module is configured to perform the detail enhancement processing on the video data according to the adjustment parameter.
  • the adjustment parameter calculation module includes:
  • a first target parameter conversion submodule configured to convert the video parameters into the first target parameters participating in the detail enhancement processing
  • a second target parameter conversion submodule configured to convert the echo parameter into a second target parameter participating in the detail enhancement processing
  • the linear fusion sub-module is configured to perform linear fusion of the environmental parameter, the first target parameter and the second target parameter to obtain adjustment parameters.
  • the video parameter includes a first probability that a pixel belongs to the skin, a resolution of the video data, and the echo parameter includes a screen resolution;
  • the first target parameter conversion submodule includes:
  • a second probability calculation unit configured to subtract the first probability from one to obtain the second probability that the pixel point belongs to non-skin
  • the second target parameter conversion submodule includes:
  • a display ratio calculation unit configured to calculate the ratio between the resolution of the video data and the resolution of the screen, and the ratio between the resolution of the video data and the resolution of the screen will be used as a display ratio .
  • the environmental parameter includes a brightness value of light
  • the linear fusion submodule includes:
  • a first adjustment weight configuration unit configured to configure a first adjustment weight for the brightness value
  • a second adjustment weight configuration unit configured to configure a second adjustment weight for the second probability
  • a third adjustment weight configuration unit configured to configure a third adjustment weight for the display scale
  • an adjustment value calculation unit configured to calculate a sum value among the first adjustment value, the second adjustment value, and the third adjustment value, and use the sum value as a fourth adjustment value, the first adjustment value representing the brightness value and the first adjustment weight, the second adjustment value represents the product of the second probability and the second adjustment weight, and the third adjustment value represents the display ratio and the the product between the third adjustment weights;
  • the adjustment value adjustment unit is configured to add a preset second adjustment coefficient on the basis of the product between the fourth adjustment value and the preset first adjustment coefficient as an adjustment parameter.
  • the detail enhancement processing execution module includes:
  • An original detail data extraction submodule configured to extract detail from the image data of the video data to obtain original detail data
  • an original detail data adjustment submodule configured to adjust the original detail data based on the adjustment parameter to obtain target detail data
  • a target detail data superimposition sub-module configured to overlay the target detail data to the image data.
  • the original detail data adjustment sub-module includes:
  • the weight adjustment query unit is set to query adjustment weight
  • the detail multiplication unit is configured to multiply the adjustment weight, the adjustment parameter and the original detail data to obtain target detail data.
  • the video detail enhancement apparatus provided by the embodiment of the present application can execute the video detail enhancement method provided by any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.
  • FIG. 7 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
  • FIG. 7 shows a block diagram of an exemplary mobile terminal 12 suitable for use in implementing embodiments of the present application.
  • the mobile terminal 12 shown in FIG. 7 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present application.
  • the mobile terminal 12 takes the form of a general-purpose computing device.
  • Components of the mobile terminal 12 may include, but are not limited to, one or more processors or processing units 16 , a system memory 28 , and a bus 18 connecting various system components including the system memory 28 and the processing unit 16 .
  • Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures.
  • these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect ( PCI) bus.
  • Mobile terminal 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the mobile terminal 12, including volatile and non-volatile media, removable and non-removable media.
  • System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32 .
  • the mobile terminal 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media.
  • storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 7, commonly referred to as a "hard drive”).
  • a disk drive for reading and writing to removable non-volatile magnetic disks eg "floppy disks”
  • removable non-volatile optical disks eg CD-ROM, DVD-ROM
  • each drive may be connected to bus 18 through one or more data media interfaces.
  • the memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present application.
  • a program/utility 40 having a set (at least one) of program modules 42, which may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data , each or some combination of these examples may include an implementation of a network environment.
  • Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
  • the mobile terminal 12 may also communicate with one or more external devices 14 (eg, a keyboard, pointing device, display 24, etc.), may also communicate with one or more devices that enable a user to interact with the mobile terminal 12, and/or communicate with Any device (eg, network card, modem, etc.) that enables the mobile terminal 12 to communicate with one or more other computing devices. Such communication may take place through input/output (I/O) interface 22 . Also, the mobile terminal 12 may communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network such as the Internet) through a network adapter 20 . As shown, the network adapter 20 communicates with other modules of the mobile terminal 12 via the bus 18 . It should be understood that, although not shown, other hardware and/or software modules may be used in conjunction with the mobile terminal 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives and data backup storage systems.
  • the processing unit 16 executes a variety of functional applications and data processing by running the programs stored in the system memory 28, for example, implementing the video detail enhancement method provided by the embodiments of the present application.
  • An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, multiple processes of the above-mentioned video detail enhancement method can be achieved, and the same In order to avoid repetition, the technical effect will not be repeated here.
  • the computer-readable storage medium may be a non-transitory computer-readable storage medium.
  • the computer-readable storage medium may include, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples (a non-exhaustive list) of computer readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

Abstract

A method and device for enhancing video details, a mobile terminal, and a storage medium. The method comprises: collecting video data (101); during the process of collecting the video data, collecting a parameter related to detail enhancement processing from the environment to serve as an environment parameter (102); collecting a parameter related to detail enhancement processing from the video data to serve as a video parameter (103), and determining, on the basis of the environment parameter and of the video parameter, a state of detail enhancement processing executed with respect to the video data (104).

Description

视频的细节增强方法、装置、移动终端和存储介质Video detail enhancement method, device, mobile terminal and storage medium
本申请要求在2020年11月26日提交中国专利局、申请号为202011348089.2的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 202011348089.2 filed with the China Patent Office on November 26, 2020, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请实施例涉及计算机视觉的技术领域,例如涉及一种视频的细节增强方法、装置、移动终端和存储介质。The embodiments of the present application relate to the technical field of computer vision, for example, to a video detail enhancement method, apparatus, mobile terminal, and storage medium.
背景技术Background technique
随着移动互联网与移动终端的迅速发展,移动终端中的视频数据已成为许多业务操作常用的信息载体,如直播、视频通话等,它们包含着物体的大量信息,成为人们获取外界原始信息的途径之一。With the rapid development of mobile Internet and mobile terminals, video data in mobile terminals has become a common information carrier for many business operations, such as live broadcasts, video calls, etc. They contain a large amount of information about objects and become a way for people to obtain original information from the outside world. one.
视频数据的清晰度是视频质量的一个评价指标,因此,在业务操作中会对改善视频数据的清晰度,而改善清晰度的方法大部分是细节增强处理(detail enhancement),在采集到视频数据之后,通常对视频数据执行细节增强处理。The sharpness of video data is an evaluation index of video quality. Therefore, the sharpness of video data will be improved in business operations, and most of the methods to improve sharpness are detail enhancement. Afterwards, detail enhancement processing is typically performed on the video data.
但是,在某些情况下细节增强处理会带来失真等负向影响,并且,细节增强处理是持续进行,消耗的算力较多,在移动终端的性能受限的情况下,将会导致细节增强处理的鲁棒性较低。However, in some cases, the detail enhancement processing will bring about negative effects such as distortion, and the detail enhancement processing is continuously performed, which consumes a lot of computing power. Enhancement processing is less robust.
发明内容SUMMARY OF THE INVENTION
本申请实施例提出了一种视频的细节增强方法、装置、移动终端和存储介质,以实现在性能受限的情况下对视频数据进行细节增强处理,减缓负向影响并提高鲁棒性。The embodiments of the present application propose a video detail enhancement method, device, mobile terminal, and storage medium, so as to perform detail enhancement processing on video data under the condition of limited performance, reduce negative effects and improve robustness.
第一方面,本申请实施例提供了一种视频的细节增强方法,应用于移动终端中,所述方法包括:In a first aspect, an embodiment of the present application provides a video detail enhancement method, which is applied to a mobile terminal, and the method includes:
采集视频数据;collect video data;
在采集所述视频数据的过程中,从环境中采集与细节增强处理相关的参数,作为环境参数;In the process of collecting the video data, parameters related to detail enhancement processing are collected from the environment as environment parameters;
从所述视频数据中采集与细节增强处理相关的参数,作为视频参数;Collect parameters related to detail enhancement processing from the video data as video parameters;
根据所述环境参数和所述视频参数确定对所述视频数据执行所述细节增强处理的状态。The state in which the detail enhancement processing is performed on the video data is determined according to the environment parameter and the video parameter.
第二方面,本申请实施例还提供了一种视频的细节增强装置,应用于移动终端中,所述装置包括:In a second aspect, an embodiment of the present application further provides a video detail enhancement device, which is applied to a mobile terminal, and the device includes:
视频数据采集模块,设置为采集视频数据;The video data acquisition module is set to collect video data;
环境参数采集模块,设置为在采集所述视频数据的过程中,从环境中采集与细节增强处理相关的参数,作为环境参数;an environment parameter collection module, configured to collect parameters related to detail enhancement processing from the environment as environment parameters during the process of collecting the video data;
视频参数采集模块,设置为从所述视频数据中采集与细节增强处理相关的参数,作为视频参数;A video parameter collection module, configured to collect parameters related to detail enhancement processing from the video data as video parameters;
增强状态确定模块,设置为根据所述环境参数和所述视频参数确定对所述视频数据执行所述细节增强处理的状态。An enhancement state determination module, configured to determine the state of performing the detail enhancement processing on the video data according to the environment parameter and the video parameter.
第三方面,本申请实施例还提供了一种移动终端,所述移动终端包括:In a third aspect, an embodiment of the present application further provides a mobile terminal, where the mobile terminal includes:
一个或多个处理器;one or more processors;
存储器,设置为存储一个或多个程序,memory, arranged to store one or more programs,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如第一方面所述的视频的细节增强方法。When executed by the one or more processors, the one or more programs cause the one or more processors to implement the video detail enhancement method as described in the first aspect.
第四方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如第一方所述的视频的细节增强方法。In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, realizes the video according to the first party. Detail enhancement method.
附图说明Description of drawings
图1为本申请一实施例提供的一种视频的细节增强方法的流程图;FIG. 1 is a flowchart of a method for enhancing details of a video provided by an embodiment of the present application;
图2为本申请一实施例提供的一种业务操作的流程图;FIG. 2 is a flowchart of a service operation provided by an embodiment of the present application;
图3为本申请一实施例提供的一种视频数据与环境参数的频率对比图;3 is a frequency comparison diagram of video data and environmental parameters provided by an embodiment of the present application;
图4是本申请另一实施例提供的一种视频的细节增强方法的流程图;FIG. 4 is a flowchart of a method for enhancing details of a video provided by another embodiment of the present application;
图5是本申请一实施例提供的一种细节增强处理的对比示例图;5 is a comparative example diagram of a detail enhancement process provided by an embodiment of the present application;
图6为本申请一实施例提供的一种视频的细节增强装置的结构示意图;6 is a schematic structural diagram of a video detail enhancement apparatus provided by an embodiment of the present application;
图7为本申请一实施例提供的一种移动终端的结构示意图。FIG. 7 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此 处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all the structures related to the present application.
针对图像数据的细节增强处理作为计算机视觉从发展到繁荣的过程中一直以来都备受关注,从一开始的基于单帧图像数据的细节增强算法,发展到现在由于多种平台的算力飞速提升而出现的基于视频数据的细节增强算法。Detail enhancement processing for image data has always attracted attention as a process of computer vision from development to prosperity. From the beginning of the detail enhancement algorithm based on single frame image data, it has developed to the present due to the rapid increase of computing power of various platforms. And the emergence of detail enhancement algorithms based on video data.
对于这些细节增强处理,可根据时间线将梳理为基于模板的细节增强处理、基于滤波算法的细节增强处理和基于深度学习的细节增强处理。These detail enhancement processing can be sorted into template-based detail enhancement processing, filtering algorithm-based detail enhancement processing, and deep learning-based detail enhancement processing according to the timeline.
随着直播、短视频等业务操作的飞速发展,视频数据的质量成为了不可忽视的问题,针对移动终端采集的视频数据进行清晰度改善成为了提高视频数据质量的重要一环。With the rapid development of live broadcast, short video and other business operations, the quality of video data has become a problem that cannot be ignored. Improving the definition of video data collected by mobile terminals has become an important part of improving the quality of video data.
针对移动终端的细节增强处理与传统的单帧图像数据或者视频数据的暗光增强相比,有着更为苛刻的计算复杂度的要求,那么如何权衡效果与性能就成为了一个新的难题。相关技术中大多数的细节增强算法都还是基于PC(personal computer,个人电脑)或者是带GPU(Graphics Processing Unit,图形处理器)的服务器提出,计算量较大,一般无法迁移到计算资源非常有限的移动终端来执行。Compared with traditional single-frame image data or dark light enhancement of video data, the detail enhancement processing for mobile terminals has more stringent computational complexity requirements, so how to balance the effect and performance has become a new problem. Most of the detail enhancement algorithms in related technologies are still based on PC (personal computer, personal computer) or server with GPU (Graphics Processing Unit, graphics processor), which requires a large amount of calculation and generally cannot be migrated to very limited computing resources. mobile terminal to execute.
本实施例提出一种兼顾性能和效果的算法,将细节增强处理应用到移动终端的视频采集,在保留细节增强处理的效果的同时,适应复杂多样的环境,过滤容易产生artifact现象的,即在图像处理的过程中,出现不自然的、反常的、能让人看出是人为处理过的痕迹、区域、瑕疵等,从而提到实现提高视频数据的质量。This embodiment proposes an algorithm that takes both performance and effect into consideration. The detail enhancement processing is applied to the video capture of the mobile terminal. While retaining the effect of the detail enhancement processing, it adapts to complex and diverse environments and filters out artifacts that are prone to produce artifacts. In the process of image processing, there are unnatural and abnormal traces, areas, flaws, etc. that can be seen as artificially processed, thus improving the quality of video data.
图1为本申请一实施例提供的一种视频的细节增强方法的流程图,本实施例可适用于根据移动终端的环境、视频数据本身的特性决策是否执行细节增强处理的情况,该方法可以由视频的细节增强装置来执行,该视频的细节增强装置可以由软件和/或硬件实现,可配置在移动终端中,例如,手机、平板电脑、智能穿戴设备(如智能手表、智能眼镜等),等等,包括如下步骤:1 is a flowchart of a video detail enhancement method provided by an embodiment of the present application. This embodiment is applicable to the case where a decision on whether to perform detail enhancement processing is performed according to the environment of the mobile terminal and the characteristics of the video data itself. Executed by a video detail enhancement device, which can be implemented by software and/or hardware, and can be configured in a mobile terminal, such as a mobile phone, tablet computer, smart wearable devices (such as smart watches, smart glasses, etc.) , etc., including the following steps:
步骤101、采集视频数据。Step 101: Collect video data.
在本实施例中,移动终端配置有一个或多个摄像头(Camera),该摄像头可用于拍照、录像,一般情况下,该摄像头可以是设置在移动终端的背部(又称后置摄像头),也可以设置在移动终端的正面(又称前置摄像头),等等, 本申请实施例对此也不加以限制。In this embodiment, the mobile terminal is configured with one or more cameras (Camera), which can be used for taking pictures and recording videos. In general, the camera can be set on the back of the mobile terminal (also known as a rear camera), or It may be set on the front of the mobile terminal (also known as a front-facing camera), etc., which is not limited in this embodiment of the present application.
此外,移动终端的操作系统包括Android(安卓)、iOS、Windows等等,可以支持多种应用的运行,例如,购物应用、即时通讯应用、直播应用、视频会议应用、短视频应用,等等。In addition, the operating system of the mobile terminal includes Android (Android), iOS, Windows, etc., and can support the running of various applications, such as shopping applications, instant messaging applications, live broadcasting applications, video conference applications, short video applications, and so on.
如图2所示,在S201中,这些应用执行业务操作,在S202中,通过调用摄像头采集视频数据,从而进行相关的业务操作,例如,在Android系统中,可调用MediaRecorder采集视频数据,在iOS系统中,可调用AVFoundation下的AVCaptureFileOutputRecordingDelegate采集视频数据,等等。As shown in Figure 2, in S201, these applications perform business operations, in S202, by calling the camera to collect video data, so as to carry out related business operations, for example, in the Android system, MediaRecorder can be called to collect video data, in iOS In the system, you can call AVCaptureFileOutputRecordingDelegate under AVFoundation to collect video data, and so on.
需要说明的是,因业务场景不同,这些应用采集的视频数据所承担的业务操作也有所不同。It should be noted that, due to different business scenarios, the business operations undertaken by the video data collected by these applications are also different.
一般而言,这些应用采集的视频数据可以用于承担具有实时性的业务操作。Generally speaking, the video data collected by these applications can be used to undertake real-time business operations.
例如,在购物的业务场景中,购物应用采集的视频数据可以用于承载销售商品的业务操作,即主播用户进行商品的解说、演示等,并在视频数据中提供购物的链接。For example, in the shopping business scenario, the video data collected by the shopping application can be used to carry the business operations of selling goods, that is, the anchor user explains and demonstrates the goods, and provides shopping links in the video data.
又例如,在即时通讯的业务场景中,即时通讯工具采集的视频数据可以用于承载视频通话的业务操作,即通讯的多方用户进行会话。For another example, in the instant messaging service scenario, the video data collected by the instant messaging tool can be used to carry the business operation of the video call, that is, the multi-party users of the communication conduct a conversation.
又例如,在直播的业务场景中,直播应用采集的视频数据可以用于承载直播的业务操作,即主播用户进行才艺表演、游戏评述等。For another example, in a live broadcast business scenario, the video data collected by the live broadcast application can be used to carry the live broadcast business operations, that is, the host user performs talent performances, game commentary, and the like.
又例如,在会议的业务场景中,视频会议应用采集的视频数据可以用于承载会议的业务操作,即参与会议的多方用户依次作为主持人进行发言等。For another example, in a business scenario of a conference, the video data collected by the video conference application can be used to carry the business operations of the conference, that is, multiple users participating in the conference sequentially speak as the host.
当然,这些应用采集的视频数据也可以承担实时性要求较低的业务操作,例如,短视频应用采集视频数据作为短视频,等等,本实施例对此不加以限制。Of course, the video data collected by these applications can also undertake business operations with lower real-time requirements. For example, a short video application collects video data as a short video, and so on, which is not limited in this embodiment.
步骤102、在采集视频数据的过程中,从环境中采集与细节增强处理相关的参数,作为环境参数。Step 102: In the process of collecting video data, parameters related to detail enhancement processing are collected from the environment as environment parameters.
如图2所示,在移动终端采集视频数据的同时,在S203中,针对移动终端所处的环境,采集与细节增强处理相关的参数,作为环境参数。As shown in FIG. 2 , while the mobile terminal collects video data, in S203 , parameters related to detail enhancement processing are collected for the environment in which the mobile terminal is located, as environment parameters.
在本申请的一个实施例中,该环境参数可以为移动终端所处环境中光线的亮度值。In an embodiment of the present application, the environment parameter may be a brightness value of light in an environment where the mobile terminal is located.
在暗光的环境下,采集的视频数据噪声水平比较高,若此时进行细节增强处理,在噪声集中的区域容易出现artifact现象,细节增强处理增加移动终端中CPU(central processing unit,中央处理器)、内存等资源的占用,但是未有明 显的实际收益。In the dark environment, the noise level of the collected video data is relatively high. If the detail enhancement processing is performed at this time, the artifact phenomenon is likely to appear in the area where the noise is concentrated. The detail enhancement processing increases the CPU (central processing unit, central processing unit) in the mobile terminal. ), memory and other resources, but there is no obvious actual benefit.
若移动终端中配置有检测光的传感器,如光照强度传感器等,并且开放了其API(Application Programming Interface,应用程序接口),则可以直接调用该传感器检测移动终端所处环境中光线的亮度值。If the mobile terminal is equipped with a sensor that detects light, such as a light intensity sensor, and its API (Application Programming Interface) is opened, the sensor can be directly called to detect the brightness value of the light in the environment where the mobile terminal is located.
例如,在Android系统中,可通过SensorManager注册监听光照强度传感器(LIGHT)检测到光线的亮度值。For example, in the Android system, the brightness value of the light detected by the Light Intensity Sensor (LIGHT) can be registered through the SensorManager.
若移动终端中配置有检测光的传感器,但未开放其API,则可以根据移动终端根据光线的亮度值自动调节屏幕亮度、开启摄像头时根据光线的亮度值自动调节白平衡等关系,检测屏幕的亮度值并映射为移动终端所处环境中光线的亮度值,或者,从摄像头处检测移动终端所处环境中光线的亮度值,等等。If the mobile terminal is equipped with a sensor for detecting light, but its API has not been opened, the mobile terminal can automatically adjust the screen brightness according to the brightness value of the light, and automatically adjust the white balance according to the brightness value of the light when the camera is turned on. The brightness value is mapped to the brightness value of the light in the environment where the mobile terminal is located, or the brightness value of the light in the environment where the mobile terminal is located is detected from the camera, and so on.
当然,上述环境参数及其采集方式只是作为示例,在实施本实施例时,可以根据实际情况设置其他环境参数及其采集方式,例如,CPU占用率、内存占用率等,本实施例对此不加以限制。另外,除了上述环境参数及其采集方式外,本领域技术人员还可以根据实际需要采用其它环境参数及其采集方式,本实施例对此也不加以限制。Of course, the above-mentioned environmental parameters and their collection methods are only examples. When implementing this embodiment, other environmental parameters and their collection methods may be set according to actual conditions, such as CPU occupancy rate, memory occupancy rate, etc. This embodiment does not be restricted. In addition, in addition to the above-mentioned environmental parameters and their collection methods, those skilled in the art may also adopt other environmental parameters and their collection methods according to actual needs, which are not limited in this embodiment.
在实际应用中,移动终端采集视频数据的帧率与采集环境参数的帧率一般不相同,采集环境参数的帧率一般大于采集视频数据的帧率,即视频数据中、每两帧图像数据之间通常存在多个环境参数。In practical applications, the frame rate at which the mobile terminal collects video data is generally different from the frame rate at which the environment parameters are collected, and the frame rate at which the environment parameters are collected is generally greater than the frame rate at which the video data is collected. There are often multiple environmental parameters in between.
如图3所示,移动终端采集视频数据的帧率低于传感器采集环境参数的帧率,在第1帧视频数据与第2帧视频数据之间存在7帧环境参数。As shown in FIG. 3 , the frame rate of video data collected by the mobile terminal is lower than the frame rate of environmental parameters collected by the sensor, and there are 7 frames of environmental parameters between the first frame of video data and the second frame of video data.
因此,为了保证细节增强处理和环境参数的稳定性,在本实施例中,可采用分段式来对齐图像数据以及环境参数。Therefore, in order to ensure the stability of the detail enhancement processing and the environmental parameters, in this embodiment, the image data and the environmental parameters may be aligned in a segmented manner.
在实施例中,在环境中获取在当前帧图像数据与上一帧图像数据之间采集的、与细节增强处理相关的参数,作为环境参数,从而以视频数据作为参考,将环境参数切分为多段。In an embodiment, parameters related to detail enhancement processing collected between the image data of the current frame and the image data of the previous frame are acquired in the environment as environmental parameters, so that the video data is used as a reference to divide the environmental parameters into Multi-segment.
针对每段环境参数,对环境参数进行平滑处理,将所述平滑处理后的环境参数作为当前帧图像数据对应的环境参数,从而凸显时间序列上不同时间点的图像数据与环境参数相关性的差异,后续使用该环境参数对该帧图像数据执行细节增强处理,提高细节增强处理的质量。For each environmental parameter, the environmental parameter is smoothed, and the smoothed environmental parameter is used as the environmental parameter corresponding to the current frame image data, thereby highlighting the difference in the correlation between the image data and the environmental parameters at different time points in the time series , and subsequently use the environment parameter to perform detail enhancement processing on the frame of image data, so as to improve the quality of the detail enhancement processing.
在一种平滑处理的方式中,可对每段环境参数配置参数权重,该环境权重可体现环境参数的重要程度,即,越重要的环境参数,其环境权重越大。In a smoothing method, a parameter weight can be configured for each environmental parameter, and the environmental weight can reflect the importance of the environmental parameter, that is, the more important environmental parameter, the greater the environmental weight.
在一个示例中,可确定采集每段环境参数的时间戳,基于时间戳对每段环境参数设置参数权重,其中,参数权重与时间戳正相关,即采集环境参数的时间越靠近当前时间,该环境参数与当前帧图像数据的相关性越强,配置的参数权重越大,反之,采集环境参数的时间越远离当前时间,该环境参数与当前帧图像数据的相关性越差,配置的参数权重越小,从而使得参数权重自当前帧图像数据向上一帧图像数据单调递减。In one example, the time stamp for collecting each piece of environmental parameters may be determined, and a parameter weight is set for each piece of environmental parameters based on the time stamp, wherein the parameter weight is positively correlated with the time stamp, that is, the closer the time of collecting environmental parameters to the current time, the more The stronger the correlation between the environmental parameters and the image data of the current frame, the greater the weight of the configured parameters. On the contrary, the farther the time of collecting the environmental parameters is from the current time, the worse the correlation between the environmental parameters and the image data of the current frame, the weight of the configured parameters. The smaller the value, the parameter weight decreases monotonically from the current frame of image data to the previous frame of image data.
当然,除了采集时间之外,还可以采用其他方式配置参数权重,例如,以环境参数的数量的倒数作为参数权重,等等,本实施例对此不加以限制。Of course, in addition to the collection time, the parameter weight may also be configured in other manners, for example, the inverse of the number of environmental parameters is used as the parameter weight, etc., which is not limited in this embodiment.
若每个环境参数已配置相应的参数权重,可计算第一目标值与第二目标值之间的比值,将比值作为当前帧图像数据对应的环境参数,其中,第一目标值为多段环境参数分别与对应的参数权重之间乘积的和值,第二目标值为多段环境参数分别对应的参数权重之间的和值,则环境参数表示如下:If a corresponding parameter weight has been configured for each environmental parameter, the ratio between the first target value and the second target value can be calculated, and the ratio can be used as the environmental parameter corresponding to the current frame image data, wherein the first target value is a multi-segment environmental parameter The sum of the products of the corresponding parameter weights respectively, the second target value is the sum of the parameter weights corresponding to the multi-stage environmental parameters respectively, and the environmental parameters are expressed as follows:
Figure PCTCN2021129369-appb-000001
Figure PCTCN2021129369-appb-000001
其中,
Figure PCTCN2021129369-appb-000002
为第t帧图像数据对应的环境参数,第t帧图像数据与第t-1帧图像数据之间存在n个环境参数,y t-i为位于第t帧图像数据之前第i帧环境参数,w i为第i个参数权重。
in,
Figure PCTCN2021129369-appb-000002
is the environmental parameter corresponding to the t-th frame of image data, there are n environmental parameters between the t-th frame of image data and the t-1-th frame of image data, y ti is the i-th frame environmental parameter before the t-th frame of image data, w i is the weight of the i-th parameter.
步骤103、从视频数据中采集与细节增强处理相关的参数,作为视频参数。Step 103: Collect parameters related to detail enhancement processing from the video data as video parameters.
如图2所示,针对移动终端采集的视频数据,在S204中,可以从其自身采集与细节增强处理相关的参数,作为视频参数,从而表征拍摄对象的特性。As shown in FIG. 2 , for the video data collected by the mobile terminal, in S204 , parameters related to detail enhancement processing can be collected from itself as video parameters, so as to characterize the characteristics of the shooting object.
在本申请的一个实施例中,该视频参数可以为视频数据中的分辨率、像素点属于皮肤的第一概率、表示皮肤的像素点的数量。In an embodiment of the present application, the video parameter may be the resolution in the video data, the first probability that a pixel belongs to the skin, and the number of pixels representing the skin.
一方面,可从MediaRecorder对象等方式可读取在视频数据的分辨率,该分辨率体现了图像数据中细节的精细程度,通常情况下,分辨率越高,所包含的像素点就越多,图像数据就越清晰,反之,分辨率越低,所包含的像素点就越少,图像数据就越模糊,在分辨率较低的情况下,图像数据较为模糊,若此时进行细节增强处理,在模糊的区域容易出现artifact现象,细节增强处理增加移动终端中CPU、内存等资源的占用,但是未有明显的实际收益On the one hand, the resolution of the video data can be read from the MediaRecorder object, which reflects the fineness of the details in the image data. Generally, the higher the resolution, the more pixels it contains. The clearer the image data is. On the contrary, the lower the resolution, the fewer pixels it contains, and the more blurred the image data is. In the case of a lower resolution, the image data is more blurred. If the detail enhancement processing is performed at this time, The artifact phenomenon is easy to appear in the blurred area, and the detail enhancement processing increases the occupation of resources such as CPU and memory in the mobile terminal, but there is no obvious actual benefit.
另一方面,在直播、短视频等业务操作中,通常会对视频数据进行美颜处理,如对皮肤进行磨皮处理等,若此时进行细节增强处理,在皮肤所处的区域容易出现artifact现象,细节增强处理增加移动终端中CPU、内存等资源的占用, 但是未有明显的实际收益。On the other hand, in live broadcast, short video and other business operations, video data is usually beautified, such as skin resurfacing, etc. If detail enhancement is performed at this time, artifact is prone to appear in the area where the skin is located. phenomenon, the detail enhancement processing increases the occupation of resources such as CPU and memory in the mobile terminal, but there is no obvious actual benefit.
在实施例中,视频数据具有多帧图像数据,每帧图像数据包括多个像素点,针对每帧图像数据,可通过参数化模型、非参数化模型等方式对每帧图像数据进行肤色检测,对每帧图像数据中的每个像素点计算属于皮肤的第一概率,响应于确定该第一概率大于预设的肤色阈值,确定该像素点表示皮肤,统计表示皮肤的至少一个像素点的数量,并将所述至少一个像素点的数量作为肤色数量。In an embodiment, the video data has multiple frames of image data, and each frame of image data includes multiple pixels. For each frame of image data, skin color detection can be performed on each frame of image data by means of a parameterized model, a non-parametric model, or the like, Calculate the first probability of belonging to the skin for each pixel in each frame of image data, in response to determining that the first probability is greater than a preset skin color threshold, determine that the pixel represents the skin, and count the number of at least one pixel representing the skin , and the quantity of the at least one pixel is taken as the quantity of skin color.
其中,参数化模型基于肤色能够服从高斯概率分布模型的假设,非参数化模型估测肤色直方图,并且和训练集的直方图进行比较。Among them, the parametric model is based on the assumption that skin color can obey the Gaussian probability distribution model, and the non-parametric model estimates the skin color histogram and compares it with the histogram of the training set.
在一个肤色检测的示例中,对于摄像头采集的视频数据,多为YUV(“Y”表示明亮度(Luminance或Luma),也就是灰阶值,“U”和“V”表示的则是色度(Chrominance或Chroma),作用是描述影像色彩及饱和度,用于指定像素的颜色)格式,为便于肤色检测,可将图像数据从YUV颜色空间转换至RGB(Red Green Blue,红绿蓝)颜色空间。In an example of skin color detection, the video data collected by the camera is mostly YUV (“Y” represents the brightness (Luminance or Luma), that is, the grayscale value, and “U” and “V” represent the chromaticity. (Chrominance or Chroma), which is used to describe the color and saturation of the image, and is used to specify the color of the pixel) format. In order to facilitate skin color detection, the image data can be converted from the YUV color space to RGB (Red Green Blue, Red Green Blue) color space.
例如,通过如下转换关系式可以将每帧图像数据从YUV颜色空间转换至RGB颜色空间:For example, each frame of image data can be converted from YUV color space to RGB color space by the following conversion relationship:
R=Y+1.4075*(V-128)R=Y+1.4075*(V-128)
G=Y-0.3455*(U-128)-0.7169*(V-128)G=Y-0.3455*(U-128)-0.7169*(V-128)
B=Y+1.779*(U-128)B=Y+1.779*(U-128)
在RGB颜色空间中,遍历图像数据中的每个像素点的R(红色)分量、G(绿色)分量、B(蓝色)分量,判断该像素点是否符合预设的阈值条件。In the RGB color space, the R (red), G (green), and B (blue) components of each pixel in the image data are traversed to determine whether the pixel meets the preset threshold condition.
响应于确定每帧图像数据中的像素点符合预设的阈值条件,将像素点属于皮肤的第一概率设置为1。In response to determining that the pixel points in each frame of image data meet the preset threshold condition, the first probability that the pixel points belong to the skin is set to 1.
响应于确定每帧图像数据中的像素点不符合预设的阈值条件,将像素点属于皮肤的第一概率设置为0。In response to determining that the pixel in each frame of image data does not meet the preset threshold condition, the first probability that the pixel belongs to the skin is set to 0.
其中,阈值条件包括:Among them, the threshold conditions include:
R分量大于第一颜色阈值,G分量大于第二颜色阈值,B分量大于第三颜色阈值,R分量大于G分量,R分量大于B分量;The R component is greater than the first color threshold, the G component is greater than the second color threshold, the B component is greater than the third color threshold, the R component is greater than the G component, and the R component is greater than the B component;
R分量、G分量、B分量中的最大值与R分量、G分量、B分量中的最小值之间的差值大于第四颜色阈值;The difference between the maximum value of the R component, the G component, and the B component and the minimum value of the R component, the G component, and the B component is greater than the fourth color threshold;
R分量与G分量之间的差值大于第五颜色阈值。The difference between the R component and the G component is greater than the fifth color threshold.
假设第一颜色阈值为95、第二颜色阈值为40、第三颜色阈值为20、第四颜 色阈值为15、第五颜色阈值为5,则阈值条件表示如下:Assuming that the first color threshold is 95, the second color threshold is 40, the third color threshold is 20, the fourth color threshold is 15, and the fifth color threshold is 5, the threshold conditions are expressed as follows:
R>95,G>40,B>20,R>G,R>BR>95,G>40,B>20,R>G,R>B
(Max(R,G,B)-Min(R,G,B))>15(Max(R,G,B)-Min(R,G,B))>15
Abs(R-G)>5Abs(R-G)>5
需要说明的是,除了在RGB颜色空间进行肤色检测之外,也可以通过BT601.FullRange等转换公式将阈值条件等价至YUV颜色空间,在YUV颜色空间中进行肤色检测,此时,阈值条件为Cb>77、Cb<127、133<Cr<173,等等,本实施例对此不加以限制。It should be noted that, in addition to skin color detection in the RGB color space, the threshold condition can also be equivalent to the YUV color space through conversion formulas such as BT601.FullRange, and skin color detection is performed in the YUV color space. At this time, the threshold condition is Cb>77, Cb<127, 133<Cr<173, etc., which are not limited in this embodiment.
在本示例中,肤色检测作为判断是否对视频数据执行细节增强处理的一个条件,对肤色检测的精确度要求并非很高,因此,通过阈值条件可满足要求,并且,阈值条件简单,使用统计的方式即可,操作简便,能有效的降低肤色检测的执行时间。In this example, skin color detection is used as a condition for judging whether to perform detail enhancement processing on video data, and the accuracy requirements for skin color detection are not very high. Therefore, the threshold condition can meet the requirements, and the threshold condition is simple, using statistical The method is simple, the operation is simple, and the execution time of the skin color detection can be effectively reduced.
当然,上述视频参数及其检测方式只是作为示例,在实施本实施例时,可以根据实际情况设置其他视频参数及其检测方式,例如,图像数据的平均亮度值,等等,本实施例对此不加以限制。另外,除了上述视频参数及其检测方式外,本领域技术人员还可以根据实际需要采用其它视频参数及其检测方式,本实施例对此也不加以限制。Of course, the above video parameters and their detection methods are only examples. When implementing this embodiment, other video parameters and their detection methods may be set according to actual conditions, such as the average brightness value of image data, etc. Unrestricted. In addition, in addition to the above video parameters and their detection methods, those skilled in the art may also adopt other video parameters and their detection methods according to actual needs, which are not limited in this embodiment.
步骤104、根据环境参数和视频参数确定对视频数据执行细节增强处理的状态。Step 104: Determine the state of performing detail enhancement processing on the video data according to the environment parameter and the video parameter.
在本实施例中,如图2所示,在S206中,将与细节增强处理相关的环境参数与视频参数进行结合,预估当前移动终端所处的环境及拍摄的对象与细节增强处理之间的适配程度,从而基于该适配程度对进行决策,确定对视频数据执行细节增强处理的状态,即决定是否执行细节增强处理,在满足一定的条件时,可允许对视频数据执行细节增强处理,未满足该条件时,禁止对视频数据执行细节增强处理。In this embodiment, as shown in FIG. 2, in S206, the environment parameters related to the detail enhancement processing are combined with the video parameters to estimate the difference between the current environment where the mobile terminal is located, the photographed object and the detail enhancement processing. Therefore, based on the degree of adaptation, a decision is made to determine the state of performing detail enhancement processing on the video data, that is, to decide whether to perform detail enhancement processing. When certain conditions are met, it is allowed to perform detail enhancement processing on the video data. , when this condition is not met, the detail enhancement processing on the video data is prohibited.
在本申请的一个实施例中,步骤104包括如下步骤:In an embodiment of the present application, step 104 includes the following steps:
步骤1041、针对视频数据中的多帧图像数据,分别将环境参数与预设的环境条件进行比较、将视频参数与预设的视频条件进行比较。Step 1041: For the multiple frames of image data in the video data, compare the environmental parameters with the preset environmental conditions, and compare the video parameters with the preset video conditions, respectively.
在本实施例中,一方面,针对环境参数可以预设设置相应的环境条件,该环境条件用于表示移动终端所处环境与细节增强处理之间的适配程度,另一方面,针对视频参数可预先设置视频条件,该视频条件用于表示移动终端拍摄的 对象与细节增强处理之间的适配程度。In this embodiment, on the one hand, corresponding environmental conditions can be preset for the environmental parameters, and the environmental conditions are used to indicate the degree of adaptation between the environment where the mobile terminal is located and the detail enhancement processing; on the other hand, for the video parameters A video condition may be preset, and the video condition is used to indicate the degree of adaptation between the object photographed by the mobile terminal and the detail enhancement processing.
在一个示例中,环境参数包括光线的亮度值,视频参数包括视频数据的分辨率、肤色数量,该肤色数量为表示皮肤的像素点的数量。In one example, the environmental parameter includes the brightness value of light, and the video parameter includes the resolution of the video data and the number of skin color, where the number of skin color is the number of pixels representing the skin.
则在此示例中,将亮度值与预设的亮度阈值进行比较。Then in this example, the luminance value is compared to a preset luminance threshold.
响应于确定亮度值大于预设的亮度阈值,表示移动终端所处环境并非属于暗光环境,此时,可确定环境参数满足环境条件;响应于确定亮度值小于或等于预设的亮度阈值,表示移动终端所处环境属于暗光环境,此时,可确定环境参数未满足环境条件。In response to determining that the brightness value is greater than the preset brightness threshold, it means that the environment where the mobile terminal is located is not a dark light environment, and at this time, it can be determined that the environmental parameters meet the environmental conditions; in response to determining that the brightness value is less than or equal to the preset brightness threshold, it means that The environment where the mobile terminal is located belongs to a dark light environment, and at this time, it can be determined that the environmental parameters do not meet the environmental conditions.
此外,将视频数据的分辨率与预设的分辨率阈值进行比较,计算肤色数量与视频数据的分辨率之间的比值,作为肤色占比,将肤色占比与预设的肤色阈值进行比较。In addition, the resolution of the video data is compared with a preset resolution threshold, and the ratio between the number of skin colors and the resolution of the video data is calculated as the skin color ratio, and the skin color ratio is compared with the preset skin color threshold.
响应于确定视频数据的分辨率大于预设的分辨率阈值、肤色占比小于预设的肤色阈值,表示视频数据较为清晰、移动终端拍摄的对象并非以人物为主,此时,可确定视频参数满足视频条件;响应于确定视频数据的分辨率小于或等于预设的分辨率阈值、和/或、肤色占比大于或等于预设的肤色阈值,表示视频数据较为模糊、移动终端拍摄的对象以人物为主,此时,可未确定视频参数满足视频条件。In response to determining that the resolution of the video data is greater than the preset resolution threshold, and the skin color ratio is less than the preset skin color threshold, it means that the video data is relatively clear, and the object photographed by the mobile terminal is not mainly a person. At this time, the video parameters can be determined. Meet the video conditions; in response to determining that the resolution of the video data is less than or equal to the preset resolution threshold, and/or, the skin color ratio is greater than or equal to the preset skin color threshold, indicating that the video data is relatively blurred, and the object photographed by the mobile terminal is Characters are the main character. At this time, it may not be determined that the video parameters meet the video conditions.
在本示例中,环境条件f 1、视频条件f 2表示如下: In this example, the environmental condition f 1 and the video condition f 2 are expressed as follows:
Figure PCTCN2021129369-appb-000003
Figure PCTCN2021129369-appb-000003
Figure PCTCN2021129369-appb-000004
Figure PCTCN2021129369-appb-000004
其中,
Figure PCTCN2021129369-appb-000005
为光线的亮度值,S 1为肤色数量,R 1为视频数据的分辨率,τ 1为亮度阈值,τ 2为分辨率阈值,τ 3为肤色阈值。
in,
Figure PCTCN2021129369-appb-000005
is the brightness value of light, S 1 is the number of skin color, R 1 is the resolution of video data, τ 1 is the brightness threshold, τ 2 is the resolution threshold, and τ 3 is the skin color threshold.
当然,上述环境条件、视频条件只是作为示例,在实施本实施例时,可以根据环境参数、视频参数的实际情况设置其他环境条件、视频条件,例如,响应于确定环境参数为CPU占用率,在CPU占用率小于预设的占用阈值时,确定环境参数满足环境条件,响应于确定视频参数为平均亮度值,在平均亮度值大于预设的视频亮度阈值时,确定视频参数满足视频条件,等等,本实施例对此不加以限制。另外,除了上述环境条件、视频条件外,本领域技术人员还可以根据实际需要采用其它环境条件、视频条件,本实施例对此也不加以限制。Of course, the above environmental conditions and video conditions are only examples. When implementing this embodiment, other environmental conditions and video conditions may be set according to the actual conditions of the environmental parameters and video parameters. For example, in response to determining that the environmental parameter is the CPU occupancy rate, When the CPU occupancy rate is less than the preset occupancy threshold, it is determined that the environmental parameter satisfies the environmental condition, in response to determining that the video parameter is an average brightness value, when the average brightness value is greater than the preset video brightness threshold, it is determined that the video parameter satisfies the video condition, etc. , which is not limited in this embodiment. In addition, in addition to the above environmental conditions and video conditions, those skilled in the art can also adopt other environmental conditions and video conditions according to actual needs, which are not limited in this embodiment.
步骤1042、响应于确定环境参数满足环境条件、视频参数满足视频条件, 确定图像数据匹配细节增强处理。Step 1042: In response to determining that the environmental parameters satisfy the environmental conditions and the video parameters satisfy the video conditions, determine that the image data matches the detail enhancement processing.
如果拍摄某帧图像数据时的环境参数满足环境条件、视频参数满足视频条件,则表示在拍摄该帧图像数据时,移动终端所处环境与细节增强处理之间的适配程度较高,移动终端拍摄的对象与细节增强处理之间的适配程度较高。If the environmental parameters of a certain frame of image data meet the environmental conditions and the video parameters meet the video conditions, it means that when the frame of image data is captured, the degree of adaptation between the environment where the mobile terminal is located and the detail enhancement processing is high, and the mobile terminal The degree of fit between the captured subject and the detail enhancement processing is high.
步骤1043、基于匹配细节增强处理的图像数据的分布,设置对视频数据执行细节增强处理的状态。Step 1043: Based on the distribution of the image data matching the detail enhancement processing, set the state of performing the detail enhancement processing on the video data.
由于采集视频数据是一个连续性的行为,考虑到视频数据的连续性,可以针对初始采集视频数据时的部分图像数据(如前80-120帧图像数据),识别匹配细节增强处理的图像数据在该部分图像数据中的分布,从而设置对视频数据执行细节增强处理的状态,即确定是否对对视频数据执行细节增强处理。Since collecting video data is a continuous behavior, considering the continuity of video data, it is possible to identify and match the image data for detail enhancement processing for part of the image data (such as the first 80-120 frames of image data) when the video data is initially collected. distribution in this part of the image data, thereby setting the state of performing the detail enhancement processing on the video data, that is, determining whether to perform the detail enhancement processing on the video data.
在实施例中,可计算匹配细节增强处理的图像数据在该部分图像数据中的占比,将占比作为匹配比例,并将该匹配比例与预设的匹配阈值进行比较。In an embodiment, the proportion of the image data of the matching detail enhancement process in the part of the image data may be calculated, the proportion is taken as the matching ratio, and the matching ratio is compared with a preset matching threshold.
响应于确定该匹配比例大于或等于预设的匹配阈值,表示移动终端所处环境较为稳定地与细节增强处理适配,移动终端拍摄的对象较为稳定地与细节增强处理适配,此时,允许对视频数据执行细节增强处理。In response to determining that the matching ratio is greater than or equal to the preset matching threshold, it means that the environment where the mobile terminal is located is relatively stably adapted to the detail enhancement processing, and the object photographed by the mobile terminal is relatively stably adapted to the detail enhancement processing. Detail enhancement processing is performed on video data.
响应于确定匹配比例小于预设的匹配阈值,表示移动终端所处环境与细节增强处理适配的波动较大,移动终端拍摄的对象与细节增强处理适配的波动较大,此时,此时,禁止对视频数据执行细节增强处理。In response to determining that the matching ratio is less than the preset matching threshold, it indicates that the environment where the mobile terminal is located has a large fluctuation in the adaptation of the detail enhancement processing, and the object photographed by the mobile terminal has a large fluctuation in the adaptation of the detail enhancement processing. At this time, at this time , which disables detail enhancement processing on video data.
此外,对于直播等业务操作,移动终端所处的环境、移动终端拍摄的对象较为稳定,在设置了对视频数据执行细节增强处理的状态之后,可以不再检测环境参数、视频参数,根据环境参数和视频参数确定对视频数据执行细节增强处理的状态,避免频繁开关细节增强处理,造成视频数据的画面骤变。In addition, for business operations such as live broadcasting, the environment where the mobile terminal is located and the objects photographed by the mobile terminal are relatively stable. After setting the state of performing detail enhancement processing on video data, the environmental parameters and video parameters can no longer be detected. According to the environmental parameters and video parameters to determine the state of performing detail enhancement processing on video data, to avoid frequent switching of detail enhancement processing, resulting in sudden changes in the picture of the video data.
在本实施例中,对于禁止细节增强处理的情况,该视频数据可以根据业务场景进行后续的处理,本实施例对此不加以限制。In this embodiment, for the case where the detail enhancement processing is prohibited, the video data may be subjected to subsequent processing according to the business scenario, which is not limited in this embodiment.
例如,如图2所示,对于S206中禁止细节增强处理的视频数据,在S208中,可将视频数据显示在屏幕,以及,在S209中,可对视频数据进行编码,如按照H.264的格式编码,并封装为FLV(Flash Video,流媒体)格式,等待传输至播放该视频数据的设备。For example, as shown in FIG. 2, for the video data for which the detail enhancement processing is prohibited in S206, in S208, the video data can be displayed on the screen, and in S209, the video data can be encoded, such as according to H.264 Format encoding, and encapsulate it in FLV (Flash Video, streaming media) format, waiting to be transmitted to the device that plays the video data.
在本实施例中,采集视频数据,在采集视频数据的过程中,从环境中采集与细节增强处理相关的参数,作为环境参数,从视频数据中采集与细节增强处理相关的参数,作为视频参数,根据环境参数和视频参数确定对视频数据执行 细节增强处理的状态,一方面,在移动终端所处的环境、移动终端拍摄的对象与细节增强处理匹配的情况下,保证细节增强处理的正常执行,从而保证视频数据的质量,另一方面,在移动终端所处的环境、移动终端拍摄的对象与细节增强处理不匹配的情况下,禁止执行细节增强处理,降低细节增强处理的频次,节省细节增强处理的算力,减轻对CPU、内存等资源的占用,保留更多的算力保证业务操作的正常执行,最终提高细节增强处理的灵活程度,提高细节增强处理的鲁棒性。In this embodiment, video data is collected, and in the process of collecting video data, parameters related to detail enhancement processing are collected from the environment as environmental parameters, and parameters related to detail enhancement processing are collected from video data as video parameters. , according to the environmental parameters and video parameters to determine the state of performing detail enhancement processing on the video data. On the one hand, in the case where the environment where the mobile terminal is located and the object photographed by the mobile terminal match the detail enhancement processing, the normal execution of the detail enhancement processing is guaranteed. , so as to ensure the quality of the video data. On the other hand, in the case where the environment where the mobile terminal is located and the object shot by the mobile terminal do not match the detail enhancement processing, the execution of the detail enhancement processing is prohibited, the frequency of the detail enhancement processing is reduced, and the details are saved. Enhance the computing power of processing, reduce the occupation of CPU, memory and other resources, reserve more computing power to ensure the normal execution of business operations, and finally improve the flexibility of detail enhancement processing and improve the robustness of detail enhancement processing.
图4为本申请另一实施例提供的一种视频的细节增强方法的流程图,本实施例以前述实施例为基础,进一步增加细节增强处理的操作,将细节增强处理部署在移动终端录制视频数据的过程中,可以让用户能实时感知细节增强处理的效果,可以最大化改善用户在拍摄视频数据的画质体验,并且,当录制视频数据的过程执行细节增强处理可以为后续的编解码提供一个较好的输入,改善观看体验,该方法包括如下步骤:FIG. 4 is a flowchart of a video detail enhancement method provided by another embodiment of the present application. Based on the foregoing embodiment, this embodiment further adds detail enhancement processing operations, and deploys detail enhancement processing on a mobile terminal to record video In the process of data recording, users can perceive the effect of detail enhancement processing in real time, which can maximize the user's experience of shooting video data. A better input to improve the viewing experience, the method includes the following steps:
步骤401、采集视频数据。Step 401: Collect video data.
步骤402、在采集视频数据的过程中,从环境中采集与细节增强处理相关的参数,作为环境参数。Step 402: In the process of collecting video data, parameters related to detail enhancement processing are collected from the environment as environment parameters.
步骤403、从视频数据中采集与细节增强处理相关的参数,作为视频参数。Step 403: Collect parameters related to detail enhancement processing from the video data as video parameters.
步骤404、根据环境参数和视频参数确定对视频数据执行细节增强处理的状态。Step 404: Determine the state of performing detail enhancement processing on the video data according to the environment parameter and the video parameter.
步骤405、在回显视频数据的过程中,采集与细节增强处理相关的参数,作为回显参数。Step 405: In the process of echoing video data, parameters related to detail enhancement processing are collected as echo parameters.
在直播、短视频等业务操作中,可执行回显操作,即在移动终端的屏幕上显示摄像头采集的视频数据,如图2所示,在S205中,可在回显视频数据的过程中,针对回显采集与细节增强处理相关的参数,作为回显参数。In business operations such as live broadcast and short video, an echo operation can be performed, that is, the video data collected by the camera is displayed on the screen of the mobile terminal, as shown in Figure 2, in S205, during the process of echoing the video data, The parameters related to detail enhancement processing are collected for echo and used as echo parameters.
在本申请的一个实施例中,回显参数包括屏幕的分辨率,此时,可通过调用DisplayMetries对象等方式读取屏幕的分辨率。In an embodiment of the present application, the echo parameter includes the resolution of the screen. In this case, the resolution of the screen can be read by calling the DisplayMetries object or the like.
此外,将环境参数、视频参数、回显参数通过JNI(Java Native Interface,Java本地接口)等形式将传递到细节增强处理对应的代码中,等待对视频数据中的每帧图像数据执行细节增强处理。In addition, the environment parameters, video parameters, and echo parameters are passed to the code corresponding to the detail enhancement processing through JNI (Java Native Interface, Java Native Interface), etc., waiting for the detail enhancement processing to be performed on each frame of image data in the video data. .
步骤406、响应于确定状态为允许对视频数据执行细节增强处理,根据环境参数、视频参数与回显参数计算调节参数。Step 406: In response to determining that the state is to allow the detail enhancement processing to be performed on the video data, calculate the adjustment parameters according to the environmental parameters, the video parameters and the echo parameters.
如图2所示,在S207中,在允许对视频数据执行细节增强处理的情况下,可以综合衡量环境参数、视频参数与回显参数,从而计算调节细节增强处理的参数,作为调节参数,该调节参数可用于调节细节增强处理的强度,即调节每帧图像数据中每个像素点在执行细节增强处理的强度,从而调节细节增强处理,使得细节增强处理在移动终端所处的环境、移动终端拍摄的对象、移动终端的回显效果之间取得一个较佳的综合表现。As shown in FIG. 2, in S207, in the case of allowing the detail enhancement processing to be performed on the video data, the environmental parameters, video parameters and echo parameters can be comprehensively measured, thereby calculating the parameters for adjusting the detail enhancement processing, as the adjustment parameters, the The adjustment parameters can be used to adjust the intensity of the detail enhancement processing, that is, to adjust the intensity of the detail enhancement processing performed by each pixel in each frame of image data, thereby adjusting the detail enhancement processing, so that the detail enhancement processing can be used in the environment where the mobile terminal is located, and the mobile terminal. A better comprehensive performance is achieved between the photographed object and the echo effect of the mobile terminal.
在本申请的一个实施例中,步骤406包括如下步骤:In an embodiment of the present application, step 406 includes the following steps:
步骤4061、将视频参数转换为参与细节增强处理的第一目标参数。Step 4061: Convert the video parameters to the first target parameters participating in the detail enhancement process.
步骤4062、将回显参数转换为参与细节增强处理的第二目标参数。Step 4062: Convert the echo parameter to the second target parameter participating in the detail enhancement process.
在本实施例中,对环境参数、视频参数、回显参数转进行归一化,将视频参数转换为参与细节增强处理的第一目标参数,将回显参数转换为参与细节增强处理的第二目标参数,从而在相同的尺度下与环境参数与第二目标参数进行线性融合。In this embodiment, the environment parameters, video parameters, and echo parameters are normalized, the video parameters are converted into the first target parameters participating in the detail enhancement processing, and the echo parameters are converted into the second target parameters involved in the detail enhancement processing. target parameters, so as to perform linear fusion with the environmental parameters and the second target parameters at the same scale.
在一个示例中,视频参数包括像素点属于皮肤的第一概率、视频数据的分辨率,则在此示例中,可将一减去第一概率,获得像素点属于非皮肤的第二概率,该第二概率为第一目标参数。In an example, the video parameters include a first probability that a pixel belongs to skin and a resolution of the video data. In this example, the first probability can be subtracted from one to obtain a second probability that the pixel belongs to non-skin, the The second probability is the first target parameter.
在此示例中,由于肤色区域在用户主观审美的角度上是认为尽可能平滑,如果对肤色区域进行细节增强,容易进入artifact,虽然清晰度提升了,但视频数据的质量反而下降了,统计出像素点属于非皮肤的第二概率,可在细节增强处理中减弱对皮肤的细节增强,加大对非皮肤的细节增强。In this example, since the skin color area is considered as smooth as possible from the user's subjective aesthetic point of view, if the details of the skin color area are enhanced, it is easy to enter the artifact. Although the clarity is improved, the quality of the video data is degraded. The pixel points belong to the second probability of non-skin, which can reduce the detail enhancement of the skin and increase the detail enhancement of the non-skin in the detail enhancement process.
在另一个示例中,回显参数包括屏幕的分辨率,则在此示例中,计算视频数据的分辨率与屏幕的分辨率之间的比值,并将所述比值作为显示比例,该显示比例为第二目标参数。In another example, the echo parameter includes the resolution of the screen, then in this example, the ratio between the resolution of the video data and the resolution of the screen is calculated, and the ratio is used as the display ratio, and the display ratio is The second target parameter.
在此示例中,如果显示比例较小,在回显操作时通常会执行较大尺度的上采样,细节增强处理容易导致不均匀的细节表现。In this example, if the display scale is small, a large-scale upsampling is usually performed during the echo operation, and the detail enhancement process is likely to lead to uneven detail performance.
步骤4063、对环境参数、第一目标参数与第二目标参数进行线性融合,获得调节参数。Step 4063 , linearly fuse the environmental parameters, the first target parameters and the second target parameters to obtain adjustment parameters.
在本实施例中,可对环境参数、第一目标参数与第二目标参数进行线性融合,获得调节参数,即调节参数与环境参数、第一目标参数、第二目标参数均正相关,即环境参数、第一目标参数、第二目标参数越大,调节参数越大,细节增强处理的强度越强,反之,环境参数、第一目标参数、第二目标参数越小, 调节参数越小,细节增强处理的强度越弱。In this embodiment, the environmental parameter, the first target parameter and the second target parameter can be linearly fused to obtain the adjustment parameter, that is, the adjustment parameter is positively correlated with the environmental parameter, the first target parameter, and the second target parameter, that is, the environment The larger the parameter, the first target parameter, and the second target parameter, the larger the adjustment parameter, and the stronger the intensity of the detail enhancement processing. On the contrary, the smaller the environmental parameter, the first target parameter, and the second target parameter The intensity of the enhancement processing is weaker.
在一个示例中,环境参数包括光线的亮度值,第一目标参数包括像素点属于非皮肤的第二概率、第二目标参数包括显示比例,则在本示例中,对亮度值配置第一调节权重,对第二概率配置第二调节权重,对显示比例配置第三调节权重。In an example, the environment parameter includes the brightness value of light, the first target parameter includes the second probability that the pixel belongs to non-skin, and the second target parameter includes the display ratio, then in this example, the first adjustment weight is configured for the brightness value , configure the second adjustment weight for the second probability, and configure the third adjustment weight for the display ratio.
需要说明的是,第一调节权重、第二调节权重、第三调节权重可以由本领域技术人员根据实际情况进行设置,例如,以第二调节权重为主导,即第二调节权重均大于第一调节权重、第三调节权重,等等,本实施例对此不加以限制。It should be noted that the first adjustment weight, the second adjustment weight, and the third adjustment weight can be set by those skilled in the art according to the actual situation. For example, the second adjustment weight is dominant, that is, the second adjustment weight is larger than the first adjustment weight. The weight, the third adjustment weight, etc., are not limited in this embodiment.
计算第一调节值、第二调节值、第三调节值之间的和值,并将所述和值作为第四调节值,第一调节值表示亮度值与第一调节权重之间的乘积,第二调节值表示第二概率与第二调节权重之间的乘积,第三调节值表示显示比例率与第三调节权重之间的乘积。Calculate the sum between the first adjustment value, the second adjustment value, and the third adjustment value, and use the sum as the fourth adjustment value, where the first adjustment value represents the product of the brightness value and the first adjustment weight, The second adjustment value represents the product between the second probability and the second adjustment weight, and the third adjustment value represents the product between the display scale rate and the third adjustment weight.
在第四调节值与预设的第一调节系数之间乘积的基础上加上预设的第二调节系数,作为调节参数。A preset second adjustment coefficient is added on the basis of the product between the fourth adjustment value and the preset first adjustment coefficient as an adjustment parameter.
在本示例中,调节参数示如下:In this example, the tuning parameters are as follows:
Figure PCTCN2021129369-appb-000006
Figure PCTCN2021129369-appb-000006
p 2=1-p 1 p 2 =1-p 1
Figure PCTCN2021129369-appb-000007
Figure PCTCN2021129369-appb-000007
其中,S ti表为第t帧第i个像素点的调节参数,
Figure PCTCN2021129369-appb-000008
为亮度值、p 1为第一概率、p 2为第二概率、R 1为视频数据的分辨率、R 2为屏幕的分辨率、r为显示比例、α为第一调节权重、β为第二调节权重、γ为第三调节权重、k为第一调节系数、b为第二调节系数。
Among them, the S ti table is the adjustment parameter of the i-th pixel point of the t-th frame,
Figure PCTCN2021129369-appb-000008
is the brightness value, p 1 is the first probability, p 2 is the second probability, R 1 is the resolution of the video data, R 2 is the resolution of the screen, r is the display ratio, α is the first adjustment weight, and β is the first adjustment weight. The second adjustment weight, γ is the third adjustment weight, k is the first adjustment coefficient, and b is the second adjustment coefficient.
步骤407、按照调节参数对视频数据执行细节增强处理。Step 407: Perform detail enhancement processing on the video data according to the adjustment parameters.
在确定当前细节增强处理的强度(即调节参数)之后,则可按照该强度(即调节参数)对细节增强处理中的相关参数进行调节,从而对视频数据进行细节增强处理。After the intensity of the current detail enhancement process (ie, the adjustment parameter) is determined, the relevant parameters in the detail enhancement process may be adjusted according to the intensity (ie, the adjustment parameter), so as to perform the detail enhancement process on the video data.
在本申请的一个实施例中,步骤407可以包括如下步骤:In an embodiment of the present application, step 407 may include the following steps:
步骤4071、从视频数据的图像数据中提取细节,获得原始细节数据。Step 4071: Extract details from the image data of the video data to obtain original detail data.
在实施例中,可以通过盒式滤波、均值滤波等方法对视频数据进行滤波处理,从而从视频数据的图像数据中提取细节,作为原始细节数据。In an embodiment, the video data may be filtered by methods such as box filtering, mean filtering, etc., so as to extract details from the image data of the video data as original detail data.
步骤4072、基于调节参数调整原始细节数据,获得目标细节数据。Step 4072: Adjust the original detail data based on the adjustment parameter to obtain the target detail data.
将调节参数应用于原始细节数据,对其进行调整,实现细节增强处理的强度调节。The adjustment parameters are applied to the original detail data and adjusted to realize the intensity adjustment of the detail enhancement processing.
在一个示例中,可查询调整权重,将调整权重、调节参数与原始细节数据相乘,获得目标细节数据。In one example, the adjustment weight can be queried, and the adjustment weight and the adjustment parameter are multiplied by the original detail data to obtain the target detail data.
当然,除了调整权重之外,也可以将调节参数与原始细节数据相乘,获得目标细节数据,等等,本实施例对此不加以限制。Of course, in addition to adjusting the weight, the adjustment parameter can also be multiplied by the original detail data to obtain the target detail data, etc., which is not limited in this embodiment.
步骤4073、将目标细节数据叠加至图像数据。Step 4073, superimpose the target detail data on the image data.
可通过USM锐化等方式将调节参数调整之后的目标细节数据叠加到原始的图像数据上,可以得到细节增强后的图像数据,此时,细节增强处理表示如下:The target detail data after adjusting the adjustment parameters can be superimposed on the original image data by means such as USM sharpening, and the image data after detail enhancement can be obtained. At this time, the detail enhancement processing is expressed as follows:
y t(i,j)=y t(i,j)+λ*S ti*D t(i,j) y t (i,j)=y t (i,j)+λ*S ti *D t (i,j)
其中,y t(i,j)为细节增强后的图像数据、y t(i,j)为细节增强前的图像数据、λ为调整权重、S ti为调节参数、D t(i,j)为原始细节数据。 Among them, y t (i, j) is the image data after detail enhancement, y t (i, j) is the image data before detail enhancement, λ is the adjustment weight, S ti is the adjustment parameter, D t (i, j) for the original detail data.
为降低细节增强处理的运算量,可在用户敏感的某个通道(如YUV颜色空间中的Y通道、RGB颜色空间中G通道)下执行细节增强处理,将得到的细节增强后的通道(如Y t)与其他通道(如U tV t)进行融合得到清晰度改善过后的视频数据。 In order to reduce the computational complexity of the detail enhancement processing, the detail enhancement processing can be performed under a certain channel (such as the Y channel in the YUV color space and the G channel in the RGB color space) to which the user is sensitive, and the obtained detail enhancement channel (such as Y t ) is fused with other channels (such as U t V t ) to obtain video data with improved definition.
如图5所示,左侧为原始的图像数据,右侧为应用本实施例执行细节增强处理之后的图像数据,对比而言,右侧的图像数据相比左侧的图像数据在背景中植物所在的区域,人物的衣领区域有明显的清晰度改善。As shown in FIG. 5 , the left side is the original image data, and the right side is the image data after the detail enhancement processing is performed by applying this embodiment. In contrast, the right image data is compared with the left image data in the background of plants. In the area where the character's collar area has a noticeable improvement in sharpness.
当然,上述细节增强处理只是作为示例,在实施本实施例时,可以根据实际情况设置其细节增强处理,例如,响应于确定使用卷积执行细节增强处理时,该调节参数可调节卷积核的大小,等等,本实施例对此不加以限制。另外,除了上述细节增强处理外,本领域技术人员还可以根据实际需要采用其它细节增强处理,本实施例对此也不加以限制。Of course, the above-mentioned detail enhancement processing is just an example. When implementing this embodiment, the detail enhancement processing can be set according to the actual situation. size, etc., which are not limited in this embodiment. In addition, in addition to the above-mentioned detail enhancement processing, those skilled in the art may also adopt other detail enhancement processing according to actual needs, which is not limited in this embodiment.
对于细节增强处理之后的视频数据,可以根据业务场景进行后续的处理,本实施例对此不加以限制。For the video data after the detail enhancement processing, subsequent processing may be performed according to the service scenario, which is not limited in this embodiment.
例如,如图2所示,在S208中将细节增强处理之后的视频数据显示在屏幕,以及,在S209中对细节增强之后的视频数据进行编码,如按照H.264的格式编码,并封装为FLV格式,等待传输至播放该视频数据的设备。For example, as shown in FIG. 2, in S208, the video data after the detail enhancement processing is displayed on the screen, and in S209, the video data after the detail enhancement is encoded, for example, according to the H.264 format, and packaged as FLV format, waiting to be transferred to the device that plays the video data.
在本实施例中,响应于确定允许对视频数据执行细节增强处理,在回显视 频数据的过程中,针对回显采集与细节增强处理相关的参数,作为回显参数,根据环境参数、视频参数与回显参数计算调节参数,按照调节参数对视频数据执行细节增强处理,使得细节增强强度与移动终端所处的环境、移动终端拍摄的对象、移动终端的回显效果整体相适配,提高算力的利用效率,由于兼顾细节增强处理的效果的同时考虑了计算的复杂度,使得细节增强处理在移动终端实时视频通信或者是采集短视频采集的过程中应用成为可能。In this embodiment, in response to determining that the detail enhancement processing is allowed to be performed on the video data, in the process of echoing the video data, parameters related to the detail enhancement processing are collected for the echoing, and are used as the echoing parameters, according to the environmental parameters, video parameters The adjustment parameters are calculated with the echo parameters, and the detail enhancement processing is performed on the video data according to the adjustment parameters, so that the detail enhancement intensity is adapted to the environment where the mobile terminal is located, the objects photographed by the mobile terminal, and the echo effect of the mobile terminal as a whole. The efficiency of power utilization, due to the consideration of the effect of detail enhancement processing and the consideration of computational complexity, makes it possible to apply detail enhancement processing in the process of real-time video communication on mobile terminals or in the process of collecting short videos.
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于示例实施例,所涉及的动作并不一定是本申请实施例所必须的。It should be noted that, for the sake of simple description, the method embodiments are expressed as a series of action combinations, but those skilled in the art should know that the embodiments of the present application are not limited by the described action sequence, because According to the embodiments of the present application, certain steps may be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all exemplary embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
图6为本申请一实施例提供的一种视频的细节增强装置的结构框图,应用于移动终端中,该装置可以包括如下模块:FIG. 6 is a structural block diagram of a video detail enhancement apparatus provided by an embodiment of the present application. When applied to a mobile terminal, the apparatus may include the following modules:
视频数据采集模块601,设置为采集视频数据;A video data collection module 601, configured to collect video data;
环境参数采集模块602,设置为在采集所述视频数据的过程中,从环境中采集与细节增强处理相关的参数,作为环境参数;The environment parameter collection module 602 is configured to collect parameters related to detail enhancement processing from the environment as environment parameters during the process of collecting the video data;
视频参数采集模块603,设置为从所述视频数据中采集与细节增强处理相关的参数,作为视频参数;A video parameter collection module 603, configured to collect parameters related to detail enhancement processing from the video data as video parameters;
增强状态确定模块604,设置为根据所述环境参数和所述视频参数确定对所述视频数据执行所述细节增强处理的状态。The enhancement state determining module 604 is configured to determine the state of performing the detail enhancement processing on the video data according to the environment parameter and the video parameter.
在本申请的一个实施例中,所述视频数据具有多帧图像数据,每帧图像数据包括多个像素点;所述环境参数采集模块602包括:In an embodiment of the present application, the video data has multiple frames of image data, and each frame of image data includes multiple pixels; the environmental parameter collection module 602 includes:
参数采集子模块,设置为在环境中获取在当前帧所述图像数据与上一帧所述图像数据之间采集的、与细节增强处理相关的参数,作为环境参数;A parameter acquisition sub-module, configured to acquire parameters related to detail enhancement processing collected between the image data of the current frame and the image data of the previous frame in the environment, as environmental parameters;
平滑处理子模块,设置为对所述环境参数进行平滑处理,将所述平滑处理后的环境参数作为当前帧所述图像数据对应的环境参数。The smoothing processing sub-module is configured to perform smoothing processing on the environmental parameters, and use the smoothed environmental parameters as the environmental parameters corresponding to the image data of the current frame.
在本申请的一个实施例中,以视频数据作为参考,将环境参数切分为多段,所述平滑处理子模块包括:In an embodiment of the present application, taking video data as a reference, the environmental parameters are divided into multiple segments, and the smoothing sub-module includes:
参数权重配置单元,设置为对每段环境参数配置参数权重;The parameter weight configuration unit, which is set to configure the parameter weight for each environmental parameter;
比值计算单元,设置为计算第一目标值与第二目标值之间的比值,将比值作为当前帧所述图像数据对应的环境参数,其中,所述第一目标值为多段环境 参数分别与对应的参数权重之间乘积的和值,所述第二目标值为所述多段环境参数分别对应的参数权重之间的和值。The ratio calculation unit is configured to calculate the ratio between the first target value and the second target value, and use the ratio as the environmental parameter corresponding to the image data of the current frame, wherein the first target value is a plurality of environmental parameters corresponding to The sum value of the products between the parameter weights, the second target value is the sum value between the parameter weights corresponding to the multi-segment environment parameters respectively.
在本申请的一个实施例中,所述参数权重配置单元包括:In an embodiment of the present application, the parameter weight configuration unit includes:
时间戳确定子单元,设置为确定采集所述每段环境参数的时间戳;a timestamp determining subunit, configured to determine a timestamp for collecting the environmental parameters of each segment;
参数权重设置子单元,设置为基于所述时间戳对所述每段环境参数设置参数权重,所述参数权重与所述时间戳正相关。The parameter weight setting subunit is configured to set a parameter weight for each segment of environmental parameters based on the timestamp, where the parameter weight is positively correlated with the timestamp.
在本申请的一个实施例中,所述视频数据具有多帧图像数据,每帧图像数据包括多个像素点;所述视频参数采集模块603包括:In an embodiment of the present application, the video data has multiple frames of image data, and each frame of image data includes multiple pixels; the video parameter collection module 603 includes:
第一概率计算子模块,设置为对所述每帧图像数据中的每个像素点计算属于皮肤的第一概率;a first probability calculation submodule, configured to calculate the first probability of belonging to the skin for each pixel in the image data of each frame;
肤色像素点确定子模块,设置为响应于确定所述第一概率大于预设的肤色阈值,确定所述第一概率对应的像素点表示皮肤;a skin color pixel point determination submodule, configured to determine that the pixel point corresponding to the first probability represents the skin in response to determining that the first probability is greater than a preset skin color threshold;
肤色数量统计子模块,设置为统计表示皮肤的至少一个像素点的数量,并将所述至少一个像素点的数量作为肤色数量。The skin color quantity counting sub-module is configured to count the quantity of at least one pixel point representing the skin, and use the quantity of the at least one pixel point as the skin color quantity.
在本申请的一个实施例中,所述第一概率计算子模块包括:In an embodiment of the present application, the first probability calculation submodule includes:
颜色空间转换单元,设置为将每帧图像数据从YUV颜色空间转换至RGB颜色空间;The color space conversion unit is set to convert each frame of image data from the YUV color space to the RGB color space;
第一数值设置单元,设置为在所述RGB颜色空间中,响应于确定所述每帧图像数据中的像素点符合预设的阈值条件,将所述像素点属于皮肤的第一概率设置为1;The first numerical value setting unit is set to in the RGB color space, in response to determining that the pixel points in each frame of image data meet the preset threshold condition, the first probability that the pixel points belong to the skin is set to 1 ;
第二数值设置单元,设置为响应于确定所述每帧图像数据中的像素点不符合预设的阈值条件,将所述像素点属于皮肤的第一概率设置为0;a second numerical value setting unit, configured to set the first probability that the pixel belongs to the skin to 0 in response to determining that the pixel in each frame of image data does not meet the preset threshold condition;
其中,所述阈值条件包括:Wherein, the threshold condition includes:
R分量大于第一颜色阈值,G分量大于第二颜色阈值,B分量大于第三颜色阈值,R分量大于G分量,R分量大于B分量;The R component is greater than the first color threshold, the G component is greater than the second color threshold, the B component is greater than the third color threshold, the R component is greater than the G component, and the R component is greater than the B component;
R分量、G分量、B分量中的最大值与R分量、G分量、B分量中的最小值之间的差值大于第四颜色阈值;The difference between the maximum value of the R component, the G component, and the B component and the minimum value of the R component, the G component, and the B component is greater than the fourth color threshold;
R分量与G分量之间的差值大于第五颜色阈值。The difference between the R component and the G component is greater than the fifth color threshold.
在本申请的一个实施例中,所述增强状态确定模块604包括:In an embodiment of the present application, the enhanced state determination module 604 includes:
条件比较子模块,设置为针对所述视频数据中的多帧图像数据,分别将所述环境参数与预设的环境条件进行比较、将所述视频参数与预设的视频条件进 行比较;Condition comparison submodule, is set to for the multi-frame image data in the described video data, compares described environment parameter and preset environment condition respectively, and described video parameter is compared with preset video condition;
图像匹配子模块,设置为响应于确定环境参数满足所述环境条件、所述视频参数满足所述视频条件,确定所述图像数据匹配所述细节增强处理;an image matching submodule, configured to determine that the image data matches the detail enhancement processing in response to determining that the environmental parameter satisfies the environmental condition and the video parameter satisfies the video condition;
分布设置子模块,设置为基于匹配所述细节增强处理的所述图像数据的分布,设置对所述视频数据执行所述细节增强处理的状态。A distribution setting sub-module configured to set a state of performing the detail enhancement processing on the video data based on the distribution of the image data matching the detail enhancement processing.
在本申请的一个实施例中,所述环境参数包括光线的亮度值,所述视频参数包括所述视频数据的分辨率、肤色数量,所述肤色数量为表示皮肤的所述像素点的数量;In an embodiment of the present application, the environmental parameter includes a brightness value of light, and the video parameter includes the resolution of the video data and the number of skin colors, and the number of skin colors is the number of pixels representing skin;
所述条件比较子模块包括:The conditional comparison submodule includes:
环境条件满足确定单元,设置为响应于确定所述亮度值大于预设的亮度阈值,确定环境参数满足环境条件;an environmental condition satisfaction determination unit, configured to determine that the environmental parameter satisfies the environmental condition in response to determining that the brightness value is greater than a preset brightness threshold;
分辨率比较单元,设置为将所述视频数据的分辨率与预设的分辨率阈值进行比较;a resolution comparison unit, configured to compare the resolution of the video data with a preset resolution threshold;
肤色占比计算单元,设置为计算所述肤色数量与所述视频数据的分辨率之间的比值,作为肤色占比;a skin color ratio calculation unit, set to calculate the ratio between the skin color number and the resolution of the video data, as the skin color ratio;
视频条件满足确定单元,设置为响应于确定所述视频数据的分辨率大于预设的分辨率阈值、所述肤色占比小于预设的肤色阈值,确定视频参数满足视频条件。The video condition satisfaction determination unit is configured to determine that the video parameter satisfies the video condition in response to determining that the resolution of the video data is greater than a preset resolution threshold and the skin color ratio is less than the preset skin color threshold.
在本申请的一个实施例中,所述分布设置子模块包括:In an embodiment of the present application, the distribution setting sub-module includes:
匹配比例计算单元,设置为计算匹配所述细节增强处理的所述图像数据在所述视频数据中的占比,并将占比作为匹配比例;a matching ratio calculation unit, configured to calculate the ratio of the image data matching the detail enhancement processing in the video data, and use the ratio as a matching ratio;
允许增强单元,设置为响应于确定所述匹配比例大于或等于预设的匹配阈值,允许对所述视频数据执行所述细节增强处理;an enhancement unit, configured to allow the detail enhancement processing to be performed on the video data in response to determining that the matching ratio is greater than or equal to a preset matching threshold;
禁止增强单元,设置为响应于确定所述匹配比例小于预设的匹配阈值,禁止对所述视频数据执行所述细节增强处理。A disabling enhancement unit, configured to disallow performing the detail enhancement processing on the video data in response to determining that the matching ratio is smaller than a preset matching threshold.
在本申请的一个实施例中,还包括:In an embodiment of the present application, it also includes:
回显参数采集模块,设置为在回显所述视频数据的过程中,采集与所述细节增强处理相关的参数,作为回显参数;The echo parameter acquisition module is configured to collect parameters related to the detail enhancement processing as echo parameters during the process of echoing the video data;
调节参数计算模块,设置为响应于确定所述状态为允许对所述视频数据执行细节增强处理,根据所述环境参数、所述视频参数与所述回显参数计算调节参数,所述调节参数用于调节所述细节增强处理的强度;An adjustment parameter calculation module, configured to, in response to determining that the state is to allow the execution of detail enhancement processing on the video data, calculate an adjustment parameter according to the environmental parameter, the video parameter and the echo parameter, and the adjustment parameter uses for adjusting the intensity of the detail enhancement processing;
细节增强处理执行模块,设置为按照所述调节参数对所述视频数据执行所述细节增强处理。The detail enhancement processing execution module is configured to perform the detail enhancement processing on the video data according to the adjustment parameter.
在本申请的一个实施例中,所述调节参数计算模块包括:In an embodiment of the present application, the adjustment parameter calculation module includes:
第一目标参数转换子模块,设置为将所述视频参数转换为参与所述细节增强处理的第一目标参数;a first target parameter conversion submodule, configured to convert the video parameters into the first target parameters participating in the detail enhancement processing;
第二目标参数转换子模块,设置为将所述回显参数转换为参与所述细节增强处理的第二目标参数;A second target parameter conversion submodule, configured to convert the echo parameter into a second target parameter participating in the detail enhancement processing;
线性融合子模块,设置为对所述环境参数、所述第一目标参数与所述第二目标参数进行线性融合,获得调节参数。The linear fusion sub-module is configured to perform linear fusion of the environmental parameter, the first target parameter and the second target parameter to obtain adjustment parameters.
在本申请的一个实施例中,所述视频参数包括像素点属于皮肤的第一概率、所述视频数据的分辨率,所述回显参数包括屏幕的分辨率;In an embodiment of the present application, the video parameter includes a first probability that a pixel belongs to the skin, a resolution of the video data, and the echo parameter includes a screen resolution;
所述第一目标参数转换子模块包括:The first target parameter conversion submodule includes:
第二概率计算单元,设置为将一减去所述第一概率,获得所述像素点属于非皮肤的第二概率;A second probability calculation unit, configured to subtract the first probability from one to obtain the second probability that the pixel point belongs to non-skin;
所述第二目标参数转换子模块包括:The second target parameter conversion submodule includes:
显示比例计算单元,设置为计算所述视频数据的分辨率与所述屏幕的分辨率之间的比值,并所述视频数据的分辨率与所述屏幕的分辨率之间的比值将作为显示比例。A display ratio calculation unit, configured to calculate the ratio between the resolution of the video data and the resolution of the screen, and the ratio between the resolution of the video data and the resolution of the screen will be used as a display ratio .
在本申请的一个实施例中,所述环境参数包括光线的亮度值;In an embodiment of the present application, the environmental parameter includes a brightness value of light;
所述线性融合子模块包括:The linear fusion submodule includes:
第一调节权重配置单元,设置为对所述亮度值配置第一调节权重;a first adjustment weight configuration unit, configured to configure a first adjustment weight for the brightness value;
第二调节权重配置单元,设置为对所述第二概率配置第二调节权重;a second adjustment weight configuration unit, configured to configure a second adjustment weight for the second probability;
第三调节权重配置单元,设置为对所述显示比例配置第三调节权重;a third adjustment weight configuration unit, configured to configure a third adjustment weight for the display scale;
调节值计算单元,设置为计算第一调节值、第二调节值、第三调节值之间的和值,并将所述和值作为第四调节值,所述第一调节值表示所述亮度值与所述第一调节权重之间的乘积,所述第二调节值表示所述第二概率与所述第二调节权重之间的乘积,所述第三调节值表示所述显示比例率与所述第三调节权重之间的乘积;an adjustment value calculation unit, configured to calculate a sum value among the first adjustment value, the second adjustment value, and the third adjustment value, and use the sum value as a fourth adjustment value, the first adjustment value representing the brightness value and the first adjustment weight, the second adjustment value represents the product of the second probability and the second adjustment weight, and the third adjustment value represents the display ratio and the the product between the third adjustment weights;
调节值调整单元,设置为在所述第四调节值与预设的第一调节系数之间乘积的基础上加上预设的第二调节系数,作为调节参数。The adjustment value adjustment unit is configured to add a preset second adjustment coefficient on the basis of the product between the fourth adjustment value and the preset first adjustment coefficient as an adjustment parameter.
在本申请的一个实施例中,所述细节增强处理执行模块包括:In an embodiment of the present application, the detail enhancement processing execution module includes:
原始细节数据提取子模块,设置为从所述视频数据的图像数据中提取细节,获得原始细节数据;An original detail data extraction submodule, configured to extract detail from the image data of the video data to obtain original detail data;
原始细节数据调整子模块,设置为基于所述调节参数调整所述原始细节数据,获得目标细节数据;an original detail data adjustment submodule, configured to adjust the original detail data based on the adjustment parameter to obtain target detail data;
目标细节数据叠加子模块,设置为将所述目标细节数据叠加至所述图像数据。A target detail data superimposition sub-module, configured to overlay the target detail data to the image data.
在本申请的一个实施例中,所述原始细节数据调整子模块包括:In an embodiment of the present application, the original detail data adjustment sub-module includes:
调整权重查询单元,设置为查询调整权重;The weight adjustment query unit is set to query adjustment weight;
细节相乘单元,设置为将所述调整权重、所述调节参数与所述原始细节数据相乘,获得目标细节数据。The detail multiplication unit is configured to multiply the adjustment weight, the adjustment parameter and the original detail data to obtain target detail data.
本申请实施例所提供的视频的细节增强装置可执行本申请任意实施例所提供的视频的细节增强方法,具备执行方法相应的功能模块和有益效果。The video detail enhancement apparatus provided by the embodiment of the present application can execute the video detail enhancement method provided by any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.
图7为本申请一实施例提供的一种移动终端的结构示意图。图7示出了适于用来实现本申请实施方式的示例性移动终端12的框图。图7显示的移动终端12仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。FIG. 7 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application. FIG. 7 shows a block diagram of an exemplary mobile terminal 12 suitable for use in implementing embodiments of the present application. The mobile terminal 12 shown in FIG. 7 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present application.
如图7所示,移动终端12以通用计算设备的形式表现。移动终端12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。As shown in FIG. 7, the mobile terminal 12 takes the form of a general-purpose computing device. Components of the mobile terminal 12 may include, but are not limited to, one or more processors or processing units 16 , a system memory 28 , and a bus 18 connecting various system components including the system memory 28 and the processing unit 16 .
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及外围组件互连(PCI)总线。 Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures. By way of example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect ( PCI) bus.
移动终端12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被移动终端12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。 Mobile terminal 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the mobile terminal 12, including volatile and non-volatile media, removable and non-removable media.
系统存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(RAM)30和/或高速缓存存储器32。移动终端12可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可移动的、非易失性磁介质(图7未显示,通常称为“硬盘驱动器”)。尽管图7中未示出,可以提供用于对可移动非易失性磁盘(例 如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本申请多个实施例的功能。 System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32 . The mobile terminal 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media. For example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 7, commonly referred to as a "hard drive"). Although not shown in Figure 7, a disk drive for reading and writing to removable non-volatile magnetic disks (eg "floppy disks") and removable non-volatile optical disks (eg CD-ROM, DVD-ROM) may be provided or other optical media) to read and write optical drives. In these cases, each drive may be connected to bus 18 through one or more data media interfaces. The memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present application.
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如存储器28中,这样的程序模块42包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本申请所描述的实施例中的功能和/或方法。A program/utility 40 having a set (at least one) of program modules 42, which may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data , each or some combination of these examples may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
移动终端12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该移动终端12交互的设备通信,和/或与使得该移动终端12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口22进行。并且,移动终端12还可以通过网络适配器20与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器20通过总线18与移动终端12的其它模块通信。应当明白,尽管图中未示出,可以结合移动终端12使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The mobile terminal 12 may also communicate with one or more external devices 14 (eg, a keyboard, pointing device, display 24, etc.), may also communicate with one or more devices that enable a user to interact with the mobile terminal 12, and/or communicate with Any device (eg, network card, modem, etc.) that enables the mobile terminal 12 to communicate with one or more other computing devices. Such communication may take place through input/output (I/O) interface 22 . Also, the mobile terminal 12 may communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network such as the Internet) through a network adapter 20 . As shown, the network adapter 20 communicates with other modules of the mobile terminal 12 via the bus 18 . It should be understood that, although not shown, other hardware and/or software modules may be used in conjunction with the mobile terminal 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives and data backup storage systems.
处理单元16通过运行存储在系统存储器28中的程序,从而执行多种功能应用以及数据处理,例如实现本申请实施例所提供的视频的细节增强方法。The processing unit 16 executes a variety of functional applications and data processing by running the programs stored in the system memory 28, for example, implementing the video detail enhancement method provided by the embodiments of the present application.
本申请一实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述视频的细节增强方法的多个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。计算机可读存储介质可以是非暂态计算机可读存储介质。An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, multiple processes of the above-mentioned video detail enhancement method can be achieved, and the same In order to avoid repetition, the technical effect will not be repeated here. The computer-readable storage medium may be a non-transitory computer-readable storage medium.
其中,计算机可读存储介质例如可以包括但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器 (CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。Wherein, the computer-readable storage medium may include, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples (a non-exhaustive list) of computer readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

Claims (18)

  1. 一种视频的细节增强方法,应用于移动终端中,所述方法包括:A video detail enhancement method, applied in a mobile terminal, the method comprising:
    采集视频数据;collect video data;
    在采集所述视频数据的过程中,从环境中采集与细节增强处理相关的参数作为环境参数;In the process of collecting the video data, parameters related to detail enhancement processing are collected from the environment as environment parameters;
    从所述视频数据中采集与细节增强处理相关的参数作为视频参数;Collect parameters related to detail enhancement processing from the video data as video parameters;
    根据所述环境参数和所述视频参数确定对所述视频数据执行所述细节增强处理的状态。The state in which the detail enhancement processing is performed on the video data is determined according to the environment parameter and the video parameter.
  2. 根据权利要求1所述的方法,其中,所述视频数据具有多帧图像数据;所述从环境中采集与细节增强处理相关的参数作为环境参数,包括:The method according to claim 1, wherein the video data has multiple frames of image data; the collecting parameters related to detail enhancement processing from the environment as the environment parameters, comprising:
    从环境中获取在当前帧所述图像数据与上一帧所述图像数据之间采集的且与细节增强处理相关的参数作为环境参数;Acquiring from the environment parameters collected between the image data of the current frame and the image data of the previous frame and related to detail enhancement processing as environment parameters;
    对所述环境参数进行平滑处理,将所述平滑处理后的环境参数作为当前帧所述图像数据对应的环境参数。Smoothing is performed on the environmental parameters, and the smoothed environmental parameters are used as environmental parameters corresponding to the image data of the current frame.
  3. 根据权利要求2所述的方法,其中,以所述视频数据作为参考,将所述环境参数切分为多段,所述对所述环境参数进行平滑处理,将所述平滑处理后的环境参数作为当前帧所述图像数据对应的环境参数,包括:The method according to claim 2, wherein, taking the video data as a reference, dividing the environmental parameters into multiple segments, performing smoothing processing on the environmental parameters, and using the smoothed environmental parameters as The environmental parameters corresponding to the image data of the current frame include:
    对每段环境参数配置参数权重;Configure parameter weights for each environmental parameter;
    计算第一目标值与第二目标值之间的比值,将所述比值作为当前帧所述图像数据对应的环境参数,其中,所述第一目标值为所述多段环境参数分别与对应的参数权重的乘积的和值,所述第二目标值为所述多段环境参数分别对应的参数权重的和值。Calculate the ratio between the first target value and the second target value, and use the ratio as the environmental parameter corresponding to the image data of the current frame, wherein the first target value is the corresponding parameter of the plurality of environmental parameters respectively The sum value of the product of the weights, and the second target value is the sum value of the parameter weights corresponding to the multi-stage environmental parameters respectively.
  4. 根据权利要求3所述的方法,其中,所述对每段环境参数配置参数权重,包括:The method according to claim 3, wherein the configuring parameter weights for each segment of environmental parameters comprises:
    确定采集所述每段环境参数的时间戳;determining the time stamp for collecting each of the environmental parameters;
    基于所述时间戳对所述每段环境参数设置参数权重,所述参数权重与所述时间戳正相关。A parameter weight is set for each piece of environmental parameters based on the timestamp, and the parameter weight is positively correlated with the timestamp.
  5. 根据权利要求1所述的方法,其中,所述视频数据包括多帧图像数据;每帧图像数据包括多个像素点,所述从所述视频数据中采集与细节增强处理相关的参数作为视频参数,包括:The method according to claim 1, wherein the video data includes multiple frames of image data; each frame of image data includes multiple pixels, and the parameters related to detail enhancement processing are collected from the video data as video parameters ,include:
    对所述每帧图像数据中的每个像素点计算属于皮肤的第一概率;Calculate the first probability of belonging to the skin for each pixel in the each frame of image data;
    响应于确定所述第一概率大于预设的肤色阈值,确定所述第一概率对应的像素点表示皮肤;In response to determining that the first probability is greater than a preset skin color threshold, determining that the pixel corresponding to the first probability represents skin;
    统计表示皮肤的至少一个像素点的数量,并将所述至少一个像素点的数量作为肤色数量。The number of at least one pixel point representing the skin is counted, and the number of the at least one pixel point is used as the number of skin color.
  6. 根据权利要求5所述的方法,其中,所述对所述每帧图像数据中的每个像素点计算属于皮肤的第一概率,包括:The method according to claim 5, wherein the calculating the first probability of belonging to the skin for each pixel in each frame of image data comprises:
    将所述每帧图像数据从YUV颜色空间转换至RGB颜色空间;Converting the image data of each frame from the YUV color space to the RGB color space;
    在所述RGB颜色空间中,响应于确定所述每帧图像数据中的像素点符合预设的阈值条件,将所述像素点属于皮肤的第一概率设置为1;In the RGB color space, in response to determining that the pixels in each frame of image data meet a preset threshold condition, setting the first probability that the pixels belong to the skin to 1;
    响应于确定所述每帧图像数据中的像素点不符合预设的阈值条件,将所述像素点属于皮肤的第一概率设置为0;In response to determining that the pixel in each frame of image data does not meet the preset threshold condition, setting the first probability that the pixel belongs to the skin to 0;
    其中,所述阈值条件包括:Wherein, the threshold condition includes:
    R分量大于第一颜色阈值,G分量大于第二颜色阈值,B分量大于第三颜色阈值,所述R分量大于所述G分量,所述R分量大于所述B分量;The R component is greater than the first color threshold, the G component is greater than the second color threshold, the B component is greater than the third color threshold, the R component is greater than the G component, and the R component is greater than the B component;
    所述R分量、所述G分量、所述B分量中的最大值与所述R分量、所述G分量、所述B分量中的最小值之间的差值大于第四颜色阈值;以及a difference between a maximum value of the R component, the G component, and the B component and a minimum value of the R component, the G component, and the B component greater than a fourth color threshold; and
    所述R分量与所述G分量之间的差值大于第五颜色阈值。The difference between the R component and the G component is greater than a fifth color threshold.
  7. 根据权利要求1所述的方法,其中,所述根据所述环境参数和所述视频参数确定对所述视频数据执行所述细节增强处理的状态,包括:The method according to claim 1, wherein the determining the state of performing the detail enhancement processing on the video data according to the environmental parameter and the video parameter comprises:
    针对所述视频数据中的多帧图像数据,分别将所述环境参数与预设的环境条件进行比较、将所述视频参数与预设的视频条件进行比较;For multiple frames of image data in the video data, compare the environmental parameters with preset environmental conditions, and compare the video parameters with preset video conditions;
    响应于确定所述环境参数满足所述环境条件、所述视频参数满足所述视频条件,确定所述图像数据匹配所述细节增强处理;In response to determining that the environmental parameter satisfies the environmental condition and the video parameter satisfies the video condition, determining that the image data matches the detail enhancement process;
    基于匹配所述细节增强处理的所述图像数据的分布,设置对所述视频数据执行所述细节增强处理的状态。A state in which the detail enhancement processing is performed on the video data is set based on the distribution of the image data matching the detail enhancement processing.
  8. 根据权利要求7所述的方法,其中,所述环境参数包括光线的亮度值,所述视频参数包括所述视频数据的分辨率、肤色数量,所述肤色数量为表示皮肤的像素点的数量;其中,所述视频数据包括多帧图像数据,每帧图像数据包括多个像素点;The method according to claim 7, wherein the environmental parameter includes a brightness value of light, and the video parameter includes a resolution of the video data and a skin color number, and the skin color number is the number of pixels representing skin; Wherein, the video data includes multiple frames of image data, and each frame of image data includes multiple pixels;
    所述分别将所述环境参数与预设的环境条件进行比较、将所述视频参数与预设的视频条件进行比较,包括:The step of comparing the environmental parameters with preset environmental conditions and comparing the video parameters with preset video conditions, respectively, includes:
    响应于确定所述亮度值大于预设的亮度阈值,确定所述环境参数满足环境条件;In response to determining that the brightness value is greater than a preset brightness threshold, determining that the environmental parameter satisfies an environmental condition;
    将所述视频数据的分辨率与预设的分辨率阈值进行比较;comparing the resolution of the video data with a preset resolution threshold;
    计算所述肤色数量与所述视频数据的分辨率之间的比值,作为肤色占比;Calculate the ratio between the number of the skin color and the resolution of the video data, as the skin color ratio;
    响应于确定所述视频数据的分辨率大于预设的分辨率阈值、所述肤色占比小于预设的肤色阈值,确定所述视频参数满足视频条件。In response to determining that the resolution of the video data is greater than a preset resolution threshold, and the skin color ratio is less than the preset skin color threshold, it is determined that the video parameter satisfies a video condition.
  9. 根据权利要求7所述的方法,其中,所述基于匹配所述细节增强处理的所述图像数据的分布,设置对所述视频数据执行所述细节增强处理的状态,包括:The method of claim 7, wherein the setting the state of performing the detail enhancement processing on the video data based on the distribution of the image data matching the detail enhancement processing comprises:
    计算匹配所述细节增强处理的所述图像数据在所述视频数据中的占比,将所述占比作为匹配比例;Calculate the proportion of the image data matching the detail enhancement processing in the video data, and use the proportion as a matching proportion;
    响应于确定所述匹配比例大于或等于预设的匹配阈值,允许对所述视频数据执行所述细节增强处理;in response to determining that the matching ratio is greater than or equal to a preset matching threshold, allowing the detail enhancement processing to be performed on the video data;
    响应于确定所述匹配比例小于预设的匹配阈值,禁止对所述视频数据执行所述细节增强处理。In response to determining that the matching ratio is less than a preset matching threshold, the detail enhancement processing is prohibited from being performed on the video data.
  10. 根据权利要求1-9任一项所述的方法,还包括:The method according to any one of claims 1-9, further comprising:
    在回显所述视频数据的过程中,采集与所述细节增强处理相关的参数作为回显参数;In the process of echoing the video data, collecting parameters related to the detail enhancement processing as echo parameters;
    响应于确定所述状态为允许对所述视频数据执行细节增强处理,根据所述环境参数、所述视频参数与所述回显参数计算调节参数,所述调节参数用于调节所述细节增强处理的强度;In response to determining that the state allows detail enhancement processing to be performed on the video data, an adjustment parameter is calculated from the environmental parameter, the video parameter, and the echo parameter, the adjustment parameter used to adjust the detail enhancement processing Strength of;
    按照所述调节参数对所述视频数据执行所述细节增强处理。The detail enhancement process is performed on the video data according to the adjustment parameter.
  11. 根据权利要求10所述的方法,其中,所述根据所述环境参数、所述视频参数与所述回显参数计算调节参数,包括:The method according to claim 10, wherein the calculating the adjustment parameter according to the environmental parameter, the video parameter and the echo parameter comprises:
    将所述视频参数转换为参与所述细节增强处理的第一目标参数;converting the video parameters into first target parameters participating in the detail enhancement process;
    将所述回显参数转换为参与所述细节增强处理的第二目标参数;converting the echo parameter into a second target parameter participating in the detail enhancement process;
    对所述环境参数、所述第一目标参数与所述第二目标参数进行线性融合,获得调节参数。Linearly fuse the environment parameter, the first target parameter and the second target parameter to obtain an adjustment parameter.
  12. 根据权利要求11所述的方法,其中,所述视频数据包括多帧图像数据,每帧图像数据包括多个像素点;所述视频参数包括像素点属于皮肤的第一概率、所述视频数据的分辨率,所述回显参数包括屏幕的分辨率;The method according to claim 11, wherein the video data includes multiple frames of image data, and each frame of image data includes multiple pixels; the video parameters include a first probability that a pixel belongs to the skin, a first probability of the video data Resolution, the echo parameter includes the resolution of the screen;
    所述将所述视频参数转换为参与所述细节增强处理的第一目标参数,包括:The converting the video parameters into the first target parameters participating in the detail enhancement processing includes:
    将一减去所述第一概率,获得像素点属于非皮肤的第二概率;Subtracting the first probability from one to obtain the second probability that the pixel belongs to non-skin;
    所述将所述回显参数转换为参与所述细节增强处理的第二目标参数,包括:The converting the echo parameter into the second target parameter participating in the detail enhancement processing includes:
    计算所述视频数据的分辨率与所述屏幕的分辨率之间的比值,并将所述视频数据的分辨率与所述屏幕的分辨率之间的比值作为显示比例。Calculate the ratio between the resolution of the video data and the resolution of the screen, and use the ratio between the resolution of the video data and the resolution of the screen as a display scale.
  13. 根据权利要求12所述的方法,其中,所述环境参数包括光线的亮度值;The method of claim 12, wherein the environmental parameter includes a brightness value of light;
    所述对所述环境参数、所述第一目标参数与所述第二目标参数进行线性融合,获得调节参数,包括:The linear fusion of the environmental parameter, the first target parameter and the second target parameter to obtain an adjustment parameter includes:
    对所述亮度值配置第一调节权重;configuring a first adjustment weight for the brightness value;
    对所述第二概率配置第二调节权重;configuring a second adjustment weight for the second probability;
    对所述显示比例配置第三调节权重;configuring a third adjustment weight for the display scale;
    计算第一调节值、第二调节值、第三调节值之间的和值,并将所述和值作为第四调节值,所述第一调节值表示所述亮度值与所述第一调节权重的乘积,所述第二调节值表示所述第二概率与所述第二调节权重之间的乘积,所述第三调节值表示所述显示比例率与所述第三调节权重之间的乘积;Calculate the sum of the first adjustment value, the second adjustment value, and the third adjustment value, and use the sum as the fourth adjustment value, where the first adjustment value represents the brightness value and the first adjustment value The product of weights, the second adjustment value represents the product between the second probability and the second adjustment weight, and the third adjustment value represents the difference between the display ratio and the third adjustment weight product;
    所述第四调节值与预设的第一调节系数之间乘积的基础上加上预设的第二调节系数作为调节参数。On the basis of the product between the fourth adjustment value and the preset first adjustment coefficient, a preset second adjustment coefficient is added as an adjustment parameter.
  14. 根据权利要求10所述的方法,其中,所述按照所述调节参数对所述视频数据执行所述细节增强处理,包括:The method according to claim 10, wherein the performing the detail enhancement processing on the video data according to the adjustment parameter comprises:
    从所述视频数据的图像数据中提取细节,获得原始细节数据;Extract details from the image data of the video data to obtain original detail data;
    基于所述调节参数调整所述原始细节数据,获得目标细节数据;Adjust the original detail data based on the adjustment parameter to obtain target detail data;
    将所述目标细节数据叠加至所述图像数据。The target detail data is superimposed on the image data.
  15. 根据权利要求14所述的方法,其中,所述基于所述调节参数调整所述原始细节数据,获得目标细节数据,包括:The method according to claim 14, wherein the adjusting the original detail data based on the adjustment parameter to obtain the target detail data comprises:
    查询调整权重;query adjustment weight;
    将所述调整权重、所述调节参数与所述原始细节数据相乘,获得目标细节数据。Multiplying the adjustment weight, the adjustment parameter and the original detail data to obtain target detail data.
  16. 一种视频的细节增强装置,应用于移动终端中,所述装置包括:A video detail enhancement device, applied in a mobile terminal, the device includes:
    视频数据采集模块,设置为采集视频数据;The video data acquisition module is set to collect video data;
    环境参数采集模块,设置为在采集所述视频数据的过程中,从环境中采集与细节增强处理相关的参数,作为环境参数;an environment parameter collection module, configured to collect parameters related to detail enhancement processing from the environment as environment parameters during the process of collecting the video data;
    视频参数采集模块,设置为从所述视频数据中采集与细节增强处理相关的参数,作为视频参数;A video parameter collection module, configured to collect parameters related to detail enhancement processing from the video data as video parameters;
    增强状态确定模块,设置为根据所述环境参数和所述视频参数确定对所述视频数据执行所述细节增强处理的状态。An enhancement state determination module, configured to determine the state of performing the detail enhancement processing on the video data according to the environment parameter and the video parameter.
  17. 一种移动终端,包括:A mobile terminal, comprising:
    至少一个处理器;at least one processor;
    存储器,设置为存储一个或多个程序,memory, arranged to store one or more programs,
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-15中任一所述的视频的细节增强方法。When the at least one program is executed by the at least one processor, the at least one processor is caused to implement the video detail enhancement method according to any one of claims 1-15.
  18. 一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如权利要求1-15中任一项所述的视频的细节增强方法。A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the video detail enhancement method according to any one of claims 1-15.
PCT/CN2021/129369 2020-11-26 2021-11-08 Method and device for enhancing video details, mobile terminal, and storage medium WO2022111269A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011348089.2 2020-11-26
CN202011348089.2A CN112488933A (en) 2020-11-26 2020-11-26 Video detail enhancement method and device, mobile terminal and storage medium

Publications (1)

Publication Number Publication Date
WO2022111269A1 true WO2022111269A1 (en) 2022-06-02

Family

ID=74935828

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/129369 WO2022111269A1 (en) 2020-11-26 2021-11-08 Method and device for enhancing video details, mobile terminal, and storage medium

Country Status (2)

Country Link
CN (1) CN112488933A (en)
WO (1) WO2022111269A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112488933A (en) * 2020-11-26 2021-03-12 有半岛(北京)信息科技有限公司 Video detail enhancement method and device, mobile terminal and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080056566A1 (en) * 2006-09-01 2008-03-06 Texas Instruments Incorporated Video processing
CN103226808A (en) * 2012-01-30 2013-07-31 深圳迈瑞生物医疗电子股份有限公司 Image enhancement method and image enhancement system
CN105894458A (en) * 2015-12-08 2016-08-24 乐视移动智能信息技术(北京)有限公司 Processing method and device of image with human face
CN108848318A (en) * 2018-05-30 2018-11-20 苏州树云网络科技有限公司 A kind of adaptive process monitoring method
CN111447374A (en) * 2020-05-13 2020-07-24 重庆紫光华山智安科技有限公司 Light supplement adjusting method and device, electronic equipment and storage medium
CN111696058A (en) * 2020-05-27 2020-09-22 重庆邮电大学移通学院 Image processing method, device and storage medium
CN111915529A (en) * 2020-08-05 2020-11-10 广州市百果园信息技术有限公司 Video dim light enhancement method and device, mobile terminal and storage medium
CN112488933A (en) * 2020-11-26 2021-03-12 有半岛(北京)信息科技有限公司 Video detail enhancement method and device, mobile terminal and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080056566A1 (en) * 2006-09-01 2008-03-06 Texas Instruments Incorporated Video processing
CN103226808A (en) * 2012-01-30 2013-07-31 深圳迈瑞生物医疗电子股份有限公司 Image enhancement method and image enhancement system
CN105894458A (en) * 2015-12-08 2016-08-24 乐视移动智能信息技术(北京)有限公司 Processing method and device of image with human face
CN108848318A (en) * 2018-05-30 2018-11-20 苏州树云网络科技有限公司 A kind of adaptive process monitoring method
CN111447374A (en) * 2020-05-13 2020-07-24 重庆紫光华山智安科技有限公司 Light supplement adjusting method and device, electronic equipment and storage medium
CN111696058A (en) * 2020-05-27 2020-09-22 重庆邮电大学移通学院 Image processing method, device and storage medium
CN111915529A (en) * 2020-08-05 2020-11-10 广州市百果园信息技术有限公司 Video dim light enhancement method and device, mobile terminal and storage medium
CN112488933A (en) * 2020-11-26 2021-03-12 有半岛(北京)信息科技有限公司 Video detail enhancement method and device, mobile terminal and storage medium

Also Published As

Publication number Publication date
CN112488933A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
WO2020140986A1 (en) Image denoising method and apparatus, storage medium and terminal
US9934438B2 (en) Scene recognition method and apparatus
US9639956B2 (en) Image adjustment using texture mask
US10565742B1 (en) Image processing method and apparatus
US11138695B2 (en) Method and device for video processing, electronic device, and storage medium
JP6615917B2 (en) Real-time video enhancement method, terminal, and non-transitory computer-readable storage medium
US11917158B2 (en) Static video recognition
CN105243371A (en) Human face beauty degree detection method and system and shooting terminal
US20190313071A1 (en) Dynamic chroma key for video background replacement
WO2022121893A1 (en) Image processing method and apparatus, and computer device and storage medium
WO2020108060A1 (en) Video processing method and apparatus, and electronic device and storage medium
WO2020108010A1 (en) Video processing method and apparatus, electronic device and storage medium
US20220109804A1 (en) Summing-up video frames to enhance image brightness
CN111899197A (en) Image brightening and denoising method and device, mobile terminal and storage medium
WO2022111269A1 (en) Method and device for enhancing video details, mobile terminal, and storage medium
WO2022151852A1 (en) Image processing method, apparatus, and system, electronic device, and storage medium
CN111147924B (en) Video enhancement processing method and system
CN111970501A (en) Pure color scene AE color processing method and device, electronic equipment and storage medium
CN115239578A (en) Image processing method and device, computer readable storage medium and terminal equipment
US20180012066A1 (en) Photograph processing method and system
CN111915529A (en) Video dim light enhancement method and device, mobile terminal and storage medium
CN112801932A (en) Image display method, image display device, electronic equipment and storage medium
RU2794062C2 (en) Image processing device and method and equipment
CN108737761B (en) Video recording method and device
CN113298888A (en) Image processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21896770

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21896770

Country of ref document: EP

Kind code of ref document: A1