Live broadcast processing method, device, electronic device and storage medium
By realizing the color cast correction processing of video in the live broadcast processing method, the problem that color differences in the live broadcast process affect the audience experience is solved, the visual perception effect and audience experience of the video are improved, and computing and communication resources are saved.
Patent Information
- Application Number
- CN202110518478.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-12
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2041-05-12
AI Technical Summary
During the live broadcast, there is a difference between the color of the items displayed by the audience terminal and the real color of the items, which affects the audience's live viewing experience and purchasing experience, resulting in unnecessary waste of computing resources and communication resources.
A live broadcast processing method is provided, by receiving videos in the live broadcast room, playing videos in the human-computer interactive interface and displaying a color cast correction portal, performing color cast correction processing on the video in response to a user trigger operation, and playing the processed video. The method includes determining the color cast detection result of the video based on the color cast factor of each image frame, performing color cast detection by calculating the average chromaticity and chromaticity center distance, and performing a first color cast correction process and a second color cast correction process on the video to ensure the accuracy of the color.
By ensuring the color accuracy of live videos, improving the visual perception effect of the video, enhancing the audience's live viewing experience, and saving computing and communication resources for live broadcasts.
Smart Images

Figure CN115348457B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to Internet technology, and in particular to a live broadcast processing method, device, electronic device and computer-readable storage medium. Background Art
[0002] Live streaming is an important way of disseminating information on the Internet. Based on big data processing based on cloud technology, the live streaming content of massive anchors is collected and distributed in real time to the audience participating in the anchors.
[0003] The anchor can conduct various recommendation activities in the live broadcast room. For example, the anchor can display the items in an all-round way in the live broadcast room. However, due to the limitations of the shooting equipment, ambient light source, and the viewer's terminal, the color of the items in the live broadcast displayed by the viewer's terminal is often different from the real color of the items. The color difference will affect the audience's live broadcast viewing experience and purchase experience, resulting in invalid recommendations of items, and further causing unnecessary waste of computing resources and communication resources used for live broadcast in the live broadcast system. There is no effective solution to this problem in the relevant technology. Summary of the invention
[0004] The embodiments of the present application provide a live broadcast processing method, device, electronic device and computer-readable storage medium, which can ensure the accuracy of video display color during live broadcast, thereby improving the visual perception effect of the video.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The present application provides a live broadcast processing method, including:
[0007] Receive live broadcast video;
[0008] Playing the video of the live broadcast room in the human-computer interaction interface, and displaying the color cast correction entrance in the human-computer interaction interface;
[0009] In response to a trigger operation on the color cast correction entry, the video is subjected to color cast correction processing, and the video after the color cast correction processing is played.
[0010] In the above solution, determining the color cast detection result of the video according to the color cast factor of each image frame includes:
[0011] Among the multiple image frames, determining the image frame whose color cast factor is greater than the color cast factor threshold as a color cast image frame;
[0012] When the ratio between the number of the color cast image frames and the number of the plurality of image frames is greater than a color cast number threshold, determining that the video has color cast;
[0013] When the ratio between the number of the color cast image frames and the number of the plurality of image frames is not greater than a color cast number threshold, it is determined that the video does not have color cast.
[0014] In the above solution, determining the average chromaticity and chromaticity center distance of the image frame includes:
[0015] Determine the color value of each pixel in the image frame in the red, green and blue color space;
[0016] Convert the color value of each pixel in the red, green and blue color space into a first color-opponent dimension and a second color-opponent dimension in a color-opponent space;
[0017] Performing a summing process on the first color-opposite dimension of each pixel, and determining a ratio between the summing result and the number of pixels in the image frame as a first chrominance component;
[0018] Performing a summing process on the second color-opposite dimension of each pixel, and determining a ratio between the summing result and the number of pixels in the image frame as a second chrominance component;
[0019] Determining an average chrominance of the image frame according to the first chrominance component and the second chrominance component;
[0020] Determine a first chromaticity center distance component and a second chromaticity center distance component according to the first color opposition dimension and the second color opposition dimension of each pixel point;
[0021] The chromaticity center distance of the image frame is determined according to the first chromaticity center distance component and the second chromaticity center distance component.
[0022] In the above solution, determining the average chrominance of the image frame according to the first chrominance component and the second chrominance component includes:
[0023] Performing a square process on the first chrominance component to obtain a first square result;
[0024] Performing a square process on the second chrominance component to obtain a second square result;
[0025] The first square result and the second square result are added together, and the sum is squared to obtain the average chromaticity of the image frame.
[0026] In the above solution, determining the first chromaticity center distance component and the second chromaticity center distance component according to the first color opposition dimension and the second color opposition dimension of each pixel point includes:
[0027] For each pixel, the following processing is performed: subtracting the first color-opposite dimension of the pixel from the first chromaticity component, and squaring the subtraction result to obtain a first chromaticity distance, subtracting the second color-opposite dimension of the pixel from the second chromaticity component, and squaring the subtraction result to obtain a second chromaticity distance;
[0028] Performing a summing process on the first chromaticity distance of each pixel point, and determining a ratio between the summing result and the number of pixels in the image frame as the first chromaticity center distance component;
[0029] The second chromaticity distance of each pixel is summed up, and the ratio between the summed up result and the number of pixels in the image frame is determined as the second chromaticity center distance component.
[0030] In the above solution, determining the chromaticity center distance of the image frame according to the first chromaticity center distance component and the second chromaticity center distance component includes:
[0031] Performing a square process on the first chromaticity center distance component to obtain a third square result;
[0032] Performing a square process on the second chromaticity center distance component to obtain a fourth square result;
[0033] The third power result and the fourth power result are added together to obtain the chromaticity center distance of the image frame.
[0034] In the above solution, the color cast correction processing on the video includes:
[0035] The following processing is performed for each image frame in the video:
[0036] Performing a first color cast correction process on the image frame according to the color value of each pixel in the image frame;
[0037] The screen color cast information of the terminal is obtained, and according to the screen color cast information, a second color cast correction process is performed on the image frame after the first color cast correction process.
[0038] In the above solution, before obtaining the screen color cast information of the terminal, the method further includes:
[0039] When at least one of the following conditions is met, it is determined that the operation of acquiring the screen color cast information of the terminal will be performed:
[0040] Receiving a color cast correction operation submitted by a login account, wherein the login account is an account that logs into the live broadcast room;
[0041] The terminal does not have a privacy protection function enabled, wherein the privacy protection function is used to shield the device information of the reading terminal.
[0042] In the above solution, performing a first color cast correction process on the image frame according to the color value of each pixel in the image frame includes:
[0043] The following processing is performed for each pixel point in the image frame: a plurality of color values corresponding to a plurality of color channels in the pixel point are determined, and the plurality of color values are equalized to obtain a plurality of equalization data corresponding to the plurality of color values in a one-to-one manner;
[0044] Determine a plurality of reference white pixel points in the image frame according to a plurality of equalization data corresponding to each pixel point in the image frame;
[0045] Determining a first scale factor according to the brightness values and color values of the plurality of reference white pixels;
[0046] Determining a second scale factor according to a color value of each pixel in the image frame;
[0047] A first color cast correction process is performed on the image frame according to the first scale factor and the second scale factor.
[0048] In the above solution, determining a plurality of reference white pixels in the image frame according to a plurality of equalization data corresponding to each pixel in the image frame includes:
[0049] For each pixel in the image frame, the following processing is performed: among the multiple equalization data corresponding to the pixel, first equalization data corresponding to the first color channel, second equalization data corresponding to the second color channel, and third equalization data corresponding to the third color channel are determined;
[0050] Selecting pixels that simultaneously meet the following conditions in the image frame as white pixels: first equalization data of the pixel is greater than or equal to a first preset value, second equalization data of the pixel is greater than or equal to a second preset value, and third equalization data of the pixel is less than or equal to a third preset value;
[0051] Selecting a pixel with the largest brightness value from the plurality of white pixel points as a brightness white pixel point;
[0052] A plurality of reference white pixel points are determined in the image frame according to the first equalization data, the second equalization data and the third equalization data corresponding to the brightness white pixel point.
[0053] In the above solution, the step of determining a plurality of reference white pixel points in the image frame according to the first equalization data, the second equalization data, and the third equalization data corresponding to the brightness white pixel point includes:
[0054] Determine the first equalization data corresponding to the brightness white pixel as the first brightness equalization data, determine the second equalization data corresponding to the brightness white pixel as the second brightness equalization data, and determine the third equalization data corresponding to the brightness white pixel as the third brightness equalization data;
[0055] Performing sum processing on the first equalization data corresponding to each of the white pixels, and determining the ratio between the sum result and the number of the white pixels as the first equalization average data;
[0056] Performing sum processing on the second equalization data corresponding to each of the white pixels, and determining the ratio between the sum result and the number of the white pixels as the second equalization average data;
[0057] Performing sum processing on the third equalization data corresponding to each of the white pixels, and determining the ratio between the sum result and the number of the white pixels as the third equalization average data;
[0058] A pixel point that satisfies the following conditions at the same time is selected in the image frame as the reference white pixel point: the first equalization data of the pixel point is between the first brightness equalization data and the first equalization average data, the second equalization data of the pixel point is between the second brightness equalization data and the second equalization average data, and the third equalization data of the pixel point is between the third brightness equalization data and the third equalization average data.
[0059] In the above solution, determining the first scale factor according to the brightness values and color values of the plurality of reference white pixels includes:
[0060] Adding up the brightness value of each of the reference white pixels, and determining the ratio between the sum and the number of the reference white pixels as the average brightness value;
[0061] Determine a first color value corresponding to a first color channel, a second color value corresponding to a second color channel, and a third color value corresponding to a third color channel for each of the reference white pixels;
[0062] Adding the first color value corresponding to each of the reference white pixel points, and determining the ratio between the summed result and the number of the reference white pixel points as the first color average value;
[0063] Adding up the second color values corresponding to each of the reference white pixel points, and determining the ratio between the summed result and the number of the reference white pixel points as the second color average value;
[0064] Adding up the third color values corresponding to each of the reference white pixel points, and determining the ratio between the summed result and the number of the reference white pixel points as the third color average value;
[0065] A first component, a second component and a third component are determined according to the brightness average, the first color average, the second color average and the third color average, and the first component, the second component and the third component are combined into the first scale factor.
[0066] In the above solution, determining the first component, the second component and the third component according to the brightness average value, the first color average value, the second color average value and the third color average value includes:
[0067] determining a ratio between the brightness average value and the first color average value as the first component;
[0068] determining a ratio between the brightness average value and the second color average value as the second component;
[0069] A ratio between the brightness average value and the third color average value is determined as the third component.
[0070] In the above solution, determining the second scale factor according to the color value of each pixel in the image frame includes:
[0071] Adding up the first color value of the first color channel corresponding to each pixel in the image frame, and determining the ratio between the summed result and the number of pixels in the image frame as a fourth color average value;
[0072] Adding up the second color value of the second color channel corresponding to each pixel in the image frame, and determining the ratio between the sum and the number of pixels in the image frame as a fifth color average value;
[0073] Adding up the third color value of the third color channel corresponding to each pixel in the image frame, and determining the ratio between the sum and the number of pixels in the image frame as a sixth color average value;
[0074] Determine an average value among the fourth color average value, the fifth color average value and the sixth color average value as a total color average value;
[0075] A fourth component, a fifth component, and a sixth component are determined according to the total color average, the fourth color average, the fifth color average, and the sixth color average, and the fourth component, the fifth component, and the sixth component are combined into the second scale factor.
[0076] In the above solution, determining the fourth component, the fifth component and the sixth component according to the total color average value, the fourth color average value, the fifth color average value and the sixth color average value includes:
[0077] determining a ratio between the total color average value and the fourth color average value as the fourth component;
[0078] determining a ratio between the total color average value and the fifth color average value as the fifth component;
[0079] A ratio between the total color average value and the sixth color average value is determined as the sixth component.
[0080] In the above solution, performing a first color cast correction process on the image frame according to the first scale factor and the second scale factor includes:
[0081] Determining a color that the image frame is biased toward based on a first chrominance component and a second chrominance component of the image frame;
[0082] When the image frame is biased toward red, using the fourth component of the second scale factor, the second component of the first scale factor, and the third component of the first scale factor as gains, performing gain processing on the color value of each pixel in the image frame;
[0083] When the image frame is biased toward blue, using the first component of the first scale factor, the second component of the first scale factor, and the sixth component of the second scale factor as gains, performing gain processing on the color value of each pixel in the image frame;
[0084] When the image frame is biased toward green, using the first component of the first scale factor, the fifth component of the second scale factor, and the third component of the first scale factor as gains, performing gain processing on the color value of each pixel in the image frame;
[0085] When the image frame is biased toward yellow, the fourth component of the second scale factor, the fifth component of the second scale factor, and the third component of the first scale factor are used as gains to perform gain processing on the color value of each pixel in the image frame.
[0086] In the above solution, determining the color that the image frame is biased towards according to the first chromaticity component and the second chromaticity component of the image frame includes:
[0087] When the first chromaticity component is greater than a fourth preset value, determining that the image frame is biased toward red;
[0088] When the first chrominance component is not greater than a fourth preset value, determining that the image frame is biased toward green;
[0089] When the second chromaticity component is greater than a fifth preset value, determining that the image frame is biased toward yellow;
[0090] When the second chromaticity component is not greater than a fifth preset value, it is determined that the image frame is biased toward blue.
[0091] In the above solution, performing a second color cast correction process on the image frame after the first color cast correction process according to the screen color cast information includes:
[0092] Querying a third scale factor corresponding to the screen color cast information;
[0093] The third scale factor is used as a gain to perform gain processing on the color value of each pixel in the image frame after the first color cast correction processing.
[0094] In the above solution, the color cast correction processing on the video includes:
[0095] Acquire screen color cast information of the terminal, and query a fourth scale factor corresponding to the screen color cast information;
[0096] The following processing is performed for each image frame in the video: using the fourth scale factor as a gain, performing gain processing on the color value of each pixel in the image frame.
[0097] The present application provides a live broadcast processing device, including:
[0098] A receiving module, used for receiving the video from the live broadcast room;
[0099] A display module, used to play the video of the live broadcast room in the human-computer interaction interface, and to display a color cast correction entrance in the human-computer interaction interface;
[0100] The correction module is used to perform color cast correction processing on the video in response to a trigger operation on the color cast correction entry, and play the video after the color cast correction processing.
[0101] In the above scheme, the correction module is also used to play the video after color cast correction processing in the first area of the human-computer interaction interface; play the video before color cast correction processing in the second area of the human-computer interaction interface; and exchange the videos played in the first area and the second area in response to the area switching operation.
[0102] In the above scheme, the correction module is also used to display a closing entrance of the second area in the human-computer interaction interface; in response to a triggering operation on the closing entrance, automatically stop the video playing in the second area and hide the second area.
[0103] In the above solution, the correction module is also used to automatically stop the video played in the second area and hide the second area when the area switching operation is not received within a preset waiting time.
[0104] In the above scheme, the correction module is also used to automatically replace the video of the live broadcast room before the color cast correction processing with the video after the color cast correction processing.
[0105] In the above scheme, the correction module is also used to display a color cast correction parameter setting page; in response to a color cast correction parameter configuration operation received on the color cast correction parameter setting page, obtain the color cast correction parameters configured by the login account, wherein the login account is the account for logging into the live broadcast room; and perform color cast correction processing on the video according to the color cast correction parameters configured by the login account.
[0106] In the above scheme, the display module is also used to obtain the color cast tolerance of the login account, wherein the login account is the account for logging into the live broadcast room; when the color cast degree of the video exceeds the color cast tolerance degree, the color cast correction entrance is automatically triggered.
[0107] In the above scheme, the correction module is also used to perform the following processing on each image frame in the video: performing a first color cast correction processing on the image frame according to the color value of each pixel in the image frame; obtaining the screen color cast information of the terminal, and performing a second color cast correction processing on the image frame after the first color cast correction processing according to the screen color cast information.
[0108] In the above scheme, the correction module is also used to determine that the operation of obtaining the screen color cast information of the terminal will be executed when at least one of the following conditions is met: receiving a color cast correction operation submitted by a login account, wherein the login account is an account for logging into the live broadcast room; the terminal does not have a privacy protection function turned on, wherein the privacy protection function is used to shield the device information of the reading terminal.
[0109] In the above scheme, the correction module is further used to perform the following processing on each pixel point in the image frame: determine multiple color values corresponding to multiple color channels in the pixel point, perform equalization processing on the multiple color values, and obtain multiple equalization data corresponding to the multiple color values; determine multiple reference white pixel points in the image frame according to the multiple equalization data corresponding to each pixel point in the image frame; determine a first scale factor according to the brightness value and color value of the multiple reference white pixel points; determine a second scale factor according to the color value of each pixel point in the image frame; and perform a first color cast correction processing on the image frame according to the first scale factor and the second scale factor.
[0110] In the above scheme, the correction module is also used to perform the following processing on each pixel point in the image frame: determine the first equalization data corresponding to the first color channel, the second equalization data corresponding to the second color channel, and the third equalization data corresponding to the third color channel among the multiple equalization data corresponding to the pixel point; select the pixel point that satisfies the following conditions at the same time as the white pixel point in the image frame: the first equalization data of the pixel point is greater than or equal to the first preset value, the second equalization data of the pixel point is greater than or equal to the second preset value, and the third equalization data of the pixel point is less than or equal to the third preset value; select the pixel point with the largest brightness value among the multiple white pixel points as the brightness white pixel point; and determine multiple reference white pixel points in the image frame according to the first equalization data, the second equalization data and the third equalization data corresponding to the brightness white pixel point.
[0111] In the above scheme, the correction module is further used to determine the first equalization data corresponding to the brightness white pixel as the first brightness equalization data, determine the second equalization data corresponding to the brightness white pixel as the second brightness equalization data, and determine the third equalization data corresponding to the brightness white pixel as the third brightness equalization data; sum the first equalization data corresponding to each of the white pixels, and determine the ratio between the summation result and the number of the white pixels as the first equalization average data; sum the second equalization data corresponding to each of the white pixels, and determine the ratio between the summation result and the number of the white pixels as second equalized average data; summing up the third equalized data corresponding to each of the white pixels, and determining the ratio between the summed result and the number of the white pixels as the third equalized average data; selecting pixels that simultaneously meet the following conditions in the image frame as the reference white pixels: the first equalized data of the pixel is between the first brightness equalized data and the first equalized average data, the second equalized data of the pixel is between the second brightness equalized data and the second equalized average data, and the third equalized data of the pixel is between the third brightness equalized data and the third equalized average data.
[0112] In the above scheme, the correction module is also used to sum the brightness value of each of the reference white pixels, and determine the ratio between the summation result and the number of the reference white pixels as the brightness average value; determine the first color value of the first color channel corresponding to each of the reference white pixels, the second color value of the second color channel corresponding to the second color channel, and the third color value of the third color channel corresponding to each of the reference white pixels; sum the first color value corresponding to each of the reference white pixels, and determine the ratio between the summation result and the number of the reference white pixels as the first color average value; sum the second color value corresponding to each of the reference white pixels, and determine the ratio between the summation result and the number of the reference white pixels as the second color average value; sum the third color value corresponding to each of the reference white pixels, and determine the ratio between the summation result and the number of the reference white pixels as the third color average value; determine the first component, the second component and the third component according to the brightness average value, the first color average value, the second color average value and the third color average value, and combine the first component, the second component and the third component into the first scale factor.
[0113] In the above scheme, the correction module is also used to determine the ratio between the brightness average value and the first color average value as the first component; determine the ratio between the brightness average value and the second color average value as the second component; and determine the ratio between the brightness average value and the third color average value as the third component.
[0114] In the above scheme, the correction module is further used to sum the first color values of the first color channel corresponding to each pixel in the image frame, and determine the ratio between the sum result and the number of pixels in the image frame as the fourth color average value; sum the second color values of the second color channel corresponding to each pixel in the image frame, and determine the ratio between the sum result and the number of pixels in the image frame as the fifth color average value; sum the third color values of the third color channel corresponding to each pixel in the image frame, and determine the ratio between the sum result and the number of pixels in the image frame as the sixth color average value; determine the average value between the fourth color average value, the fifth color average value and the sixth color average value as the total color average value; determine the fourth component, the fifth component and the sixth component according to the total color average value, the fourth color average value, the fifth color average value and the sixth color average value, and combine the fourth component, the fifth component and the sixth component into the second scale factor.
[0115] In the above scheme, the correction module is also used to determine the ratio between the total color average value and the fourth color average value as the fourth component; determine the ratio between the total color average value and the fifth color average value as the fifth component; and determine the ratio between the total color average value and the sixth color average value as the sixth component.
[0116] In the above scheme, the correction module is further used to determine the color that the image frame tends to be based on the first chromaticity component and the second chromaticity component of the image frame; when the image frame tends to be red, the fourth component of the second scale factor, the second component of the first scale factor and the third component of the first scale factor are used as gains to perform gain processing on the color value of each pixel in the image frame; when the image frame tends to be blue, the first component of the first scale factor, the second component of the first scale factor and the sixth component of the second scale factor are used as gains to perform gain processing on the color value of each pixel in the image frame; when the image frame tends to be green, the first component of the first scale factor, the fifth component of the second scale factor and the third component of the first scale factor are used as gains to perform gain processing on the color value of each pixel in the image frame; when the image frame tends to be yellow, the fourth component of the second scale factor, the fifth component of the second scale factor and the third component of the first scale factor are used as gains to perform gain processing on the color value of each pixel in the image frame.
[0117] In the above scheme, the correction module is also used to determine that the image frame is biased towards red when the first chromaticity component is greater than a fourth preset value; to determine that the image frame is biased towards green when the first chromaticity component is not greater than the fourth preset value; to determine that the image frame is biased towards yellow when the second chromaticity component is greater than a fifth preset value; and to determine that the image frame is biased towards blue when the second chromaticity component is not greater than the fifth preset value.
[0118] In the above scheme, the correction module is further used to query a third scale factor corresponding to the screen color cast information; and use the third scale factor as a gain to perform gain processing on the color value of each pixel in the image frame after the first color cast correction processing.
[0119] In the above scheme, the correction module is also used to obtain the screen color cast information of the terminal and query the fourth scale factor corresponding to the screen color cast information; perform the following processing for each image frame in the video: use the fourth scale factor as gain to perform gain processing on the color value of each pixel in the image frame.
[0120] In the above scheme, the display module is also used to perform color cast detection processing on the video of the live broadcast room to obtain a color cast detection result; when the color cast detection result indicates that the video has color cast, information used to prompt that the video has color cast is displayed in the human-computer interaction interface, and it is determined to execute the operation of displaying the color cast correction entrance in the human-computer interaction interface.
[0121] In the above scheme, the display module is also used to extract multiple image frames from the video; perform the following processing for each of the image frames: determine the average chromaticity and chromaticity center distance of the image frame, and determine the ratio between the average chromaticity and the chromaticity center distance as the color cast factor of the image frame; and determine the color cast detection result of the video based on the color cast factor of each of the image frames.
[0122] In the above scheme, the display module is also used to determine, among the multiple image frames, the image frames whose color cast factors are greater than the color cast factor threshold as color cast image frames; when the ratio between the number of the color cast image frames and the number of the multiple image frames is greater than the color cast number threshold, determine that the video has color cast; when the ratio between the number of the color cast image frames and the number of the multiple image frames is not greater than the color cast number threshold, determine that the video has no color cast.
[0123] In the above scheme, the display module is further used to determine the color value of each pixel in the image frame in the red, green and blue color space; convert the color value of each pixel in the red, green and blue color space into a first color opposition dimension and a second color opposition dimension in a color opposition space; perform summation processing on the first color opposition dimension of each pixel, and determine the ratio between the summation result and the number of pixels in the image frame as a first chromaticity component; perform summation processing on the second color opposition dimension of each pixel, and determine the ratio between the summation result and the number of pixels in the image frame as a second chromaticity component; determine the average chromaticity of the image frame according to the first chromaticity component and the second chromaticity component; determine the first chromaticity center distance component and the second chromaticity center distance component according to the first color opposition dimension and the second color opposition dimension of each pixel; determine the chromaticity center distance of the image frame according to the first chromaticity center distance component and the second chromaticity center distance component.
[0124] In the above scheme, the display module is also used to perform a square process on the first chromaticity component to obtain a first square result; perform a square process on the second chromaticity component to obtain a second square result; perform a sum process on the first square result and the second square result, and perform a square root process on the sum result to obtain the average chromaticity of the image frame.
[0125] In the above scheme, the display module is also used to perform the following processing on each pixel: subtract the first color opposite dimension of the pixel from the first chromaticity component, and square the subtraction result to obtain a first chromaticity distance, subtract the second color opposite dimension of the pixel from the second chromaticity component, and square the subtraction result to obtain a second chromaticity distance; sum the first chromaticity distance of each pixel, and determine the ratio between the sum result and the number of pixels in the image frame as the first chromaticity center distance component; sum the second chromaticity distance of each pixel, and determine the ratio between the sum result and the number of pixels in the image frame as the second chromaticity center distance component.
[0126] In the above scheme, the display module is also used to square the first chromaticity center distance component to obtain a third square result; square the second chromaticity center distance component to obtain a fourth square result; and add the third square result and the fourth square result to obtain the chromaticity center distance of the image frame.
[0127] In the above scheme, the display module is also used to perform scene detection processing on the video of the live broadcast room. When a color display sensitive scene appears in the video of the live broadcast room, it is determined to perform an operation of color cast detection processing on the video of the live broadcast room; wherein the types of color display sensitive scenes include: recommended scenes for multiple objects of different colors, recommended scenes for at least one object of a specific color, and recommended scenes for objects that meet the preferences of the login account, and the login account is the account that logs in to the live broadcast room.
[0128] In the above scheme, the display module is also used to display a color cast detection entrance in the human-computer interaction interface; in response to a trigger operation on the color cast detection entrance, it is determined to perform an operation of performing color cast detection processing on the video in the live broadcast room.
[0129] In the above scheme, the display module is also used to perform scene detection processing on the video of the live broadcast room played in the human-computer interaction interface; when a color display sensitive scene appears in the video of the live broadcast room, it is determined to automatically enter the operation of displaying the color cast correction entrance in the human-computer interaction interface; wherein the types of color display sensitive scenes include: recommended scenes for multiple objects of different colors, recommended scenes for at least one specific color object, and recommended scenes for objects that meet the preferences of the login account; the login account is the account that logs in to the live broadcast room.
[0130] An embodiment of the present application provides an electronic device, including:
[0131] A memory for storing computer executable instructions;
[0132] The processor is used to implement the live broadcast processing method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.
[0133] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for implementing the live broadcast processing method provided in the embodiment of the present application when executed by a processor.
[0134] An embodiment of the present application provides a computer program product, which includes computer executable instructions for implementing the live broadcast processing method provided in the embodiment of the present application when executed by a processor.
[0135] The embodiments of the present application have the following beneficial effects:
[0136] After the audience triggers the color cast correction entrance, the video in the live broadcast room is corrected for color cast, and the video after color cast correction is played. This can ensure the accuracy of the video display color during the live broadcast, improve the visual perception effect of the video, thereby improving the audience's live viewing experience, and then save computing resources and communication resources used for live broadcast. BRIEF DESCRIPTION OF THE DRAWINGS
[0137] Figure 1 1 is a schematic diagram of the architecture of a live broadcast processing system 100 provided in an embodiment of the present application;
[0138] Figure 2 is a schematic diagram of the structure of the audience terminal 400 provided in an embodiment of the present application;
[0139] Figure 3 It is a flowchart of a live broadcast processing method provided in an embodiment of the present application;
[0140] Figure 4 It is a flowchart of a live broadcast processing method provided in an embodiment of the present application;
[0141] Figure 5 It is a flowchart of a live broadcast processing method provided in an embodiment of the present application;
[0142] Figure 6 It is a flowchart of a live broadcast processing method provided in an embodiment of the present application;
[0143] Figure 7 It is a flowchart of a live broadcast processing method provided in an embodiment of the present application;
[0144] Figure 8 It is a flowchart of a live broadcast processing method provided in an embodiment of the present application;
[0145] Fig. 9It is a schematic diagram of an application scenario of the live broadcast processing method provided in an embodiment of the present application;
[0146] Fig.10 It is a schematic diagram of the principle of the live broadcast processing method provided in an embodiment of the present application;
[0147] Fig.11 It is a schematic diagram of an application scenario of the live broadcast processing method provided in an embodiment of the present application;
[0148] Fig.12 It is a schematic diagram of an application scenario of the live broadcast processing method provided in an embodiment of the present application;
[0149] Fig.13 It is a schematic diagram of an application scenario of the live broadcast processing method provided in an embodiment of the present application;
[0150] Fig.14 It is a schematic diagram of an application scenario of the live broadcast processing method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0151] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0152] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0153] In the following description, the terms "first / second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first / second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0154] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0155] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0156] 1) In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed are executed.
[0157] 2) Live broadcast, which is a way of publishing information on the Internet with a two-way flow process, with information being produced and released synchronously as the event occurs and develops. Specifically, the broadcaster's data can be collected through the device, and after a series of processing, such as video encoding and compression, it can be output to the viewing user end.
[0158] 3) Color space, also known as color space or color coordinate system, is a method of abstractly representing and describing color. The Red Green Blue (RGB) color space is one of the most commonly used color models, and the images and videos output by digital imaging devices are often in RGB format. However, the biggest limitation of the RGB color space is that when the Euclidean distance is used to characterize the difference between two colors, the calculated distance between the two colors cannot correctly represent the real difference between the two colors that people actually perceive. The distance between colors calculated using the Lab color space (also known as the color opposition space or Lab space) is basically consistent with the difference in people's actual perception.
[0159] 4) Color cast: The human visual system has color constancy, which can eliminate the influence of lighting conditions and other factors on color to a certain extent and correctly perceive the color of objects. However, imaging devices do not have this "adjustment" function, so there is a certain degree of error between the color of the image captured by the imaging device and the real color of the object surface, which is called color cast.
[0160] 5) Color cast correction, or color restoration, is to eliminate color cast. Specifically, it refers to removing the influence of factors such as the color temperature of the light source in the shooting environment, so as to reproduce the true color of the object.
[0161] The embodiment of the present application provides a live broadcast processing method, which can ensure the accuracy of the video display color during the live broadcast process, thereby improving the visual perception effect of the video. The following describes an exemplary application of the live broadcast processing method provided by the embodiment of the present application. The live broadcast processing method provided by the embodiment of the present application can be implemented by various electronic devices, for example, it can be applied to various types of user terminals (hereinafter referred to as terminals) such as smart phones, tablet computers, vehicle-mounted terminals, and smart wearable devices.
[0162] Next, taking an electronic device as a terminal as an example, an exemplary application system architecture of a terminal implementing the live broadcast processing method provided in an embodiment of the present application is described. Figure 1 , Figure 11 is a schematic diagram of the architecture of the live broadcast processing system 100 provided in the embodiment of the present application. The live broadcast processing system 100 includes: a server 200, a network 300, and a viewer terminal 400, which will be described separately.
[0163] Server 200 is the background server of client 410 and is used to send the video of the live broadcast room to client 410 .
[0164] The network 300 is used as a medium for communication between the server 200 and the viewer terminal 400, and can be a wide area network or a local area network, or a combination of the two.
[0165] The audience terminal 400 belongs to the audience and is used to run the client 410, which is a client with a live broadcast function. The client 410 is used to receive the video of the live broadcast room sent by the server 200, and play the video of the live broadcast room in the human-computer interaction interface 411; it is also used to display the color cast correction entrance in the human-computer interaction interface 411, and in response to the audience's trigger operation on the color cast correction entrance, perform color cast correction processing on the video, and play the video after color cast correction processing in the human-computer interaction interface 411.
[0166] In some embodiments, the audience terminal 400 implements the live broadcast processing method provided in the embodiments of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP, Application), that is, a program that needs to be installed in the operating system to run, such as a live broadcast APP; it can also be a small program, that is, a program that can be run only by downloading it to a browser environment, such as a live broadcast small program; it can also be a live broadcast small program that can be embedded in any APP. In short, the above-mentioned computer program can be an application, module or plug-in in any form.
[0167] The embodiments of the present application can be implemented with the help of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to achieve data calculation, storage, processing, and sharing.
[0168] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model. It can form a resource pool that can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources.
[0169] As an example, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The audience terminal 400 and the server 200 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0170] Next, explain Figure 1 The structure of the viewer terminal 400 in FIG. Figure 2 , Figure 2 is a schematic diagram of the structure of the audience terminal 400 provided in an embodiment of the present application, Figure 2 The viewer terminal 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the viewer terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 2 Various buses are labeled as bus system 440 .
[0171] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0172] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0173] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0174] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0175] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0176] The operating system 451 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic businesses and process hardware-based tasks.
[0177] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420. Exemplary network interfaces 420 include: Bluetooth, Wireless LAN (WiFi), and Universal Serial Bus (USB).
[0178] The presentation module 453 is used to enable presentation of information (eg, a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (eg, a display screen, a speaker, etc.) associated with the user interface 430 .
[0179] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.
[0180] In some embodiments, the live broadcast processing device provided in the embodiments of the present application can be implemented in software. Figure 2 The live broadcast processing device 455 stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: a receiving module 4551, a display module 4552 and a correction module 4553. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0181] Below, by Figure 1 The live broadcast processing method provided in the embodiment of the present application is described as an example in which the audience terminal 400 alone executes the live broadcast processing method provided in the embodiment of the present application. Figure 3 , Figure 3is a flowchart of the live broadcast processing method provided in the embodiment of the present application, which will be combined with Figure 3 The steps shown are explained.
[0182] It should be noted that Figure 3 The method shown can be executed by various forms of computer programs running on the audience terminal 400, and is not limited to the above-mentioned client 410, such as the above-mentioned operating system 451, software modules, scripts and applets, so the example of the client below should not be regarded as a limitation on the embodiments of the present application.
[0183] It should also be noted that the audience account in the following description belongs to the audience, and for the convenience of description, no specific distinction is made between the audience account and the audience. For example, the operation of the audience account is specifically the operation of the audience holding the audience account.
[0184] In step S101, a video of a live broadcast room is received.
[0185] In some embodiments, the anchor terminal collects the video and audio of the anchor's performance in the live broadcast room, and sends the video and audio to the server in the form of a live stream, and the server pushes the live stream of the live broadcast room to the viewer terminal.
[0186] In step S102, the video of the live broadcast room is played in the human-computer interaction interface.
[0187] In some embodiments, the video images (i.e., image frames) of the live broadcast room are played in the human-computer interaction interface according to the video in the live broadcast stream, and when playing the video images of the live broadcast room, the corresponding audio is played synchronously according to the audio in the live broadcast stream.
[0188] In step S103, a color cast correction entrance is displayed in the human-computer interaction interface.
[0189] As an example, Fig. 9 In the embodiment of the present invention, a color cast correction entry 902 is displayed in the live broadcast screen. When the audience triggers the color cast correction entry 902, the color cast correction function can be turned on. The color cast correction entry 902 can be displayed all the time during the live broadcast, or only when color cast appears in the live broadcast screen, or only when the color cast of the video exceeds a color cast threshold (which can be a default value or a value set by the anchor, the audience, the client or the server), thereby saving display resources of the terminal.
[0190] In some embodiments, executing step S103 may include: obtaining the color cast tolerance of the login account, wherein the login account is the account for logging into the live broadcast room; when the color cast of the video exceeds the color cast tolerance, automatically triggering the color cast correction entrance.
[0191] As an example, the color cast tolerance level can be a value set by the login account, or it can be determined based on the login account's historical viewing record, that is, it is determined based on the color cast degree of videos that have been watched by the login account without undergoing color cast correction. For example, the average, maximum or minimum value of the color cast degree of all videos that have been watched by the login account without undergoing color cast correction is used as the color cast tolerance level.
[0192] As an example, before the color cast correction entrance is automatically triggered, a countdown control and a color cast correction close button can also be displayed. When no trigger operation for the color cast correction close button is received before the countdown in the countdown control ends, it is determined that the operation of automatically triggering the color cast correction entrance will be executed.
[0193] For example, Fig.11 In the example, when the color cast of the video exceeds the color cast tolerance, a countdown control 112 and a color cast correction close button 111 are displayed. When the viewer does not trigger the color cast correction close button 111 before the countdown in the countdown control 112 ends, the video is automatically subjected to color cast correction. In this way, the color cast correction entry is automatically triggered according to the color cast tolerance of the login account, which can reduce the number of operations of the viewer and save the operation resources of the terminal.
[0194] In some embodiments, before step S103, it may also include: performing scene detection processing on the video of the live broadcast room played in the human-computer interaction interface; when a color display sensitive scene appears in the video of the live broadcast room, determining to automatically enter the operation of displaying the color cast correction entrance in the human-computer interaction interface; wherein the types of color display sensitive scenes include: recommended scenes for multiple objects of different colors, recommended scenes for at least one specific color object, and recommended scenes for objects that meet the preferences of the login account.
[0195] As an example, when a color display sensitive scene appears in the video of the live broadcast room, a prompt message indicating that the scene has been entered that is sensitive to color display can be displayed in the human-computer interaction interface.
[0196] The embodiment of the present application can automatically display a color cast correction entrance according to the scene appearing in the video, that is, directly display the color cast correction entrance without performing color cast detection processing, so that when a viewer who is sensitive to color finds that the video has color cast, or when the viewer knows that he or she has entered a color display sensitive scene according to the prompt information, the color cast correction processing can be directly triggered according to the color cast correction entrance, thereby avoiding unnecessary color cast detection and saving color cast detection resources.
[0197] In step S104, in response to a trigger operation on a color cast correction entry, a color cast correction process is performed on the video.
[0198] In some embodiments, as an alternative to step S104, when the color cast of the video exceeds the color cast threshold, the video is automatically subjected to color cast correction processing. In this way, the viewer does not need to trigger the color cast correction entry, thereby reducing the number of operations of the viewer and saving the operation resources of the terminal.
[0199] In some embodiments, in response to a trigger operation for a color cast correction entrance, it can include: displaying a color cast correction parameter setting page; in response to a color cast correction parameter configuration operation received on the color cast correction parameter setting page, obtaining the color cast correction parameters configured by the login account; in this way, performing color cast correction processing on the video can include: performing color cast correction processing on the video according to the color cast correction parameters configured by the login account.
[0200] For example, Fig.12 When the viewer triggers the color cast correction entry, a color cast correction parameter setting page 121 is displayed, wherein the color cast correction parameter setting page 121 includes a color cast correction parameter setting entry 122, and the viewer can configure the color cast correction parameters in the color cast correction parameter setting entry 122.
[0201] As an example, the color cast correction parameter setting page may include default color cast correction parameters, where the types of default color cast correction parameters include: color cast correction parameters determined by the server or the viewer terminal according to the color cast degree of the video; historical color cast correction parameters; color cast correction parameters used by the same live broadcast room of the anchor. Because the same anchor uses the same video acquisition device, the degree of color cast caused may be the same, so the color cast correction parameters used by the same live broadcast room of the anchor can be used, thereby saving computing resources. In this way, the color cast correction parameter configuration operation can be a selection operation for the default color cast correction parameters, and the selected default color cast correction parameters are the color cast correction parameters configured for the login account.
[0202] As an example, the color cast correction parameters configured by the login account can be subsequently reused to perform color cast correction processing on videos in other live broadcast rooms. For example, they can be reused to perform color cast correction processing on videos in the same live broadcast room as the anchor, thereby saving resources for calculating color cast correction parameters.
[0203] In some embodiments, the client can call the corresponding service (e.g., color cast correction service) of the viewer terminal to perform color cast correction on the video through the viewer terminal. The client can also call the corresponding service (e.g., color cast correction service) of the server to perform color cast correction on the video through the server.
[0204] As an example, when the client calls the corresponding service of the server (for example, the color cast correction service) to perform color cast correction on the video, the replacement step of step S104 is: the viewer terminal responds to the trigger operation for the color cast correction entry, sends a color cast correction instruction to the server, the server performs color cast correction on the video according to the color cast correction instruction, and sends the video after the color cast correction to the viewer terminal.
[0205] In the following, the client calls the corresponding service (e.g., color cast correction service) of the viewer terminal to perform color cast correction on the video through the viewer terminal as an example. It should be noted that the process of the client calling the corresponding service (e.g., color cast correction service) of the server to perform color cast correction on the video is similar to the following and will not be described in detail.
[0206] In some embodiments, performing color cast correction processing on a video may be performing color cast correction processing on each image frame in the video. Figure 4 , Figure 4 is a flowchart of the live broadcast processing method provided in the embodiment of the present application, which will be combined with Figure 4 The specific implementation method of performing color cast correction processing on each image frame in the video is described.
[0207] In step S401, a first color cast correction process is performed on the image frame according to the color value of each pixel in the image frame.
[0208] In some embodiments, see Figure 5 , Figure 5 is a flowchart of a live broadcast processing method provided in an embodiment of the present application, based on Figure 4 , step S401 may include steps S4011 to S4015.
[0209] In step S4011, the following processing is performed for each pixel in the image frame: multiple color values corresponding to multiple color channels are determined in the pixel, and the multiple color values are equalized to obtain multiple equalization data corresponding to the multiple color values.
[0210] In some embodiments, the multiple color values (R) of each pixel in the image frame org , G org , B or g ) corresponds to multiple color channels, for example, the color value R org Corresponding to the red channel (or the first color channel), the color value G org Corresponding to the green channel (or the second color channel), color value B org Corresponding to the blue channel (or the third color channel); for the color value R of each pixel org , color value Gorg and color value B org Perform histogram equalization to obtain the corresponding color value R org The balanced data Y Hist , corresponding color value G o rg The equalization data Cr Hist , and the corresponding color value B org Equalization data Cb Hist .
[0211] As an example, histogram equalization refers to adjusting the contrast of each pixel in an image frame using a histogram, which can be used to increase the global contrast of the image frame. Through histogram equalization, the brightness of the image frame can be better distributed on the histogram, so that the local contrast can be enhanced without affecting the overall contrast.
[0212] In step S4012, a plurality of reference white pixel points are determined in the image frame according to a plurality of equalization data corresponding to each pixel point in the image frame.
[0213] In some embodiments, the following processing is performed for each pixel in the image frame: among the multiple equalization data corresponding to the pixel, the first equalization data (Y Hist ), corresponding to the second equalization data of the second color channel (Cr Hist ), and the third equalization data corresponding to the third color channel (Cb Hist ); selecting a pixel point that satisfies the following conditions at the same time in the image frame as a white pixel point: the first equalization data of the pixel point is greater than or equal to the first preset value, the second equalization data of the pixel point is greater than or equal to the second preset value, and the third equalization data of the pixel point is less than or equal to the third preset value; selecting a pixel point with the largest brightness value from multiple white pixel points as a brightness white pixel point; determining multiple reference white pixel points in the image frame according to the first equalization data, the second equalization data and the third equalization data corresponding to the brightness white pixel point.
[0214] Taking the first preset value as 210, the second preset value as -3, and the third preset value as 3 as an example, pixels that simultaneously satisfy formula (1) are selected in the image frame as white pixels:
[0215]
[0216] Among the white pixels that satisfy formula (1), the one with the largest Y Hist The value and Cr closest to zero Hist , Cb Hist Find the pixel with the largest brightness value (Y Hist bright,Cr Hist bright , Cb Hist bright ) as the brightness white pixel.
[0217] As an example, according to the first equalization data, the second equalization data, and the third equalization data corresponding to the brightness white pixel point, determining a plurality of reference white pixel points in the image frame may include: determining the first equalization data corresponding to the brightness white pixel point as the first brightness equalization data (Y Hist bright ), the second equalization data corresponding to the brightness white pixel is determined as the second brightness equalization data (Cr Hist bright ), and determining the third equalization data corresponding to the brightness white pixel as the third brightness equalization data (Cb Hist bright ); summing up the first equalized data corresponding to each white pixel, and determining the ratio between the summed result and the number of white pixels as the first equalized average data (Y Hist avg ); summing up the second equalization data corresponding to each white pixel, and determining the ratio between the summation result and the number of white pixels as the second equalization average data (Cr Hist avg ); summing up the third equalized data corresponding to each white pixel, and determining the ratio between the summed result and the number of white pixels as the third equalized average data (Cb Hist avg ); selecting pixels that simultaneously meet the following conditions in the image frame as reference white pixels: the first equalization data of the pixel is between the first brightness equalization data and the first equalization average data, the second equalization data of the pixel is between the second brightness equalization data and the second equalization average data, and the third equalization data of the pixel is between the third brightness equalization data and the third equalization average data.
[0218] For example, all pixels satisfying formula (2) are selected in the image frame as reference white pixels.
[0219]
[0220] Among them, Y L and Y H are respectively selected from the first brightness equalization data Y Hist bright and the first equalized average data Y Hist avg The minimum and maximum values between Cr L Cr Hare respectively selected from the second brightness equalization data Cr Hist bright and the second equalized average data Cr Hist avg The minimum and maximum values between Cb L and Cb H are respectively selected from the third brightness equalization data Cb Hist bright and the third equalized average data Cb Hist avg The minimum and maximum values between .
[0221] In step S4013, a first scale factor is determined according to the brightness values and color values of a plurality of reference white pixels.
[0222] In some embodiments, the brightness value of each reference white pixel is summed, and the ratio between the summed value and the number of reference white pixels is determined as the average brightness value (Y w ); determine the first color value of the first color channel corresponding to each reference white pixel, the second color value of the second color channel corresponding to each reference white pixel, and the third color value of the third color channel corresponding to each reference white pixel; sum the first color values corresponding to each reference white pixel, and determine the ratio between the sum and the number of reference white pixels as the first color average value (R w ); summing up the second color values corresponding to each reference white pixel, and determining the ratio between the summation result and the number of reference white pixels as the second color average value (G w ); summing up the third color values corresponding to each reference white pixel, and determining the ratio between the summed result and the number of reference white pixels as the third color average value (B w ); Determine the first component (R according to the brightness average, the first color average, the second color average and the third color average scale ), the second component (G scale ) and the third component (B scale ), and combining the first component, the second component, and the third component into a first scale factor.
[0223] As an example, determining the first component, the second component, and the third component based on the brightness average value, the first color average value, the second color average value, and the third color average value may include: determining the ratio between the brightness average value and the first color average value as the first component; determining the ratio between the brightness average value and the second color average value as the second component; and determining the ratio between the brightness average value and the third color average value as the third component.
[0224] For example, the average color value of all reference white pixels (R w, G w , B w ). Calculate the first scale factor (R) according to formula (3) scale , G scale , B scale ).
[0225]
[0226] Among them, Y w is the average brightness value of the reference white pixels, that is, the value obtained by averaging the brightness values of all reference white pixels.
[0227] In step S4014, a second scale factor is determined according to the color value of each pixel in the image frame.
[0228] In some embodiments, the first color value of the first color channel corresponding to each pixel in the image frame is summed, and the ratio between the summed result and the number of pixels in the image frame is determined as the fourth color average value (R aver ); summing up the second color value of the second color channel corresponding to each pixel in the image frame, and determining the ratio between the summation result and the number of pixels in the image frame as the fifth color average value (G aver ); summing up the third color value of the third color channel corresponding to each pixel in the image frame, and determining the ratio between the summation result and the number of pixels in the image frame as the sixth color average value (B aver ); determine the average value of the fourth color average, the fifth color average and the sixth color average as the total color average (Gray); determine the fourth component (R GWA ), the fifth component (G GWA ) and the sixth component (B GWA ), and combining the fourth component, the fifth component, and the sixth component into a second scale factor.
[0229] As an example, determining the fourth component, the fifth component and the sixth component based on the total color average value, the fourth color average value, the fifth color average value and the sixth color average value may include: determining the ratio between the total color average value and the fourth color average value as the fourth component; determining the ratio between the total color average value and the fifth color average value as the fifth component; and determining the ratio between the total color average value and the sixth color average value as the sixth component.
[0230] For example, the second scale factor (R GWA , G GWA , B GWA ).
[0231]
[0232] Gray = (R aver +G aver +B aver ) / 3, and (R aver , G aver , B aver ) is the original data of each pixel in the image in the RGB color space (R org , G org , B org ), namely the fourth color average, the fifth color average and the sixth color average mentioned above.
[0233] In step S4015, a first color cast correction process is performed on the image frame according to the first scale factor and the second scale factor.
[0234] In some embodiments, according to the first chrominance component (d a ) and the second chrominance component (d b ), determine the color to which the image frame tends; when the image frame tends to be red, the fourth component of the second scale factor, the second component of the first scale factor and the third component of the first scale factor are used as gains to perform gain processing on the color value of each pixel in the image frame; when the image frame tends to be blue, the first component of the first scale factor, the second component of the first scale factor and the sixth component of the second scale factor are used as gains to perform gain processing on the color value of each pixel in the image frame; when the image frame tends to be green, the first component of the first scale factor, the fifth component of the second scale factor and the third component of the first scale factor are used as gains to perform gain processing on the color value of each pixel in the image frame; when the image frame tends to be yellow, the fourth component of the second scale factor, the fifth component of the second scale factor and the third component of the first scale factor are used as gains to perform gain processing on the color value of each pixel in the image frame.
[0235] For example, when the image is reddish, (R GWA , G scale , B scale ) is used as the gain for gain calculation. When the image is blue, (R scale , G scale , B GWA ) is used as the gain for gain calculation. When the image is greenish, (R scale , G GWA , B scale ) is used as the gain for gain calculation. When the image is yellowish, (R GWA , G GWA , B scale ) is used as the gain for gain calculation.
[0236] For example, when the image is reddish, the color value (R org , G org , B o rg ), with (R GWA , G scale , B scale ) is used as the gain for gain calculation. After calculation, the color value of each pixel is (R GWA ×R org , G scale ×G org , B scale ×B org ), and so on.
[0237] As an example, determining the color toward which the image frame tends to be based on the first chromaticity component and the second chromaticity component of the image frame can include: when the first chromaticity component is greater than a fourth preset value, determining that the image frame tends to be red; when the first chromaticity component is not greater than the fourth preset value, determining that the image frame tends to be green; when the second chromaticity component is greater than the fifth preset value, determining that the image frame tends to be yellow; when the second chromaticity component is not greater than the fifth preset value, determining that the image frame tends to be blue.
[0238] Taking the fourth preset value of 0 and the fifth preset value of 0 as an example, when the first chromaticity component is greater than 0, the image frame is determined to be biased towards red; when the first chromaticity component is not greater than 0, the image frame is determined to be biased towards green; when the second chromaticity component is greater than 0, the image frame is determined to be biased towards yellow; when the second chromaticity component is not greater than 0, the image frame is determined to be biased towards blue.
[0239] The embodiment of the present application takes into account that the models of video acquisition devices used by the anchor side are different and the color cast of the acquired videos are also different. Therefore, the video is subjected to a first color cast correction process according to the color value of each pixel in the video. The original video sent by the anchor side can be corrected to a video with a uniform color cast standard. This can not only reduce the amount of calculation for the subsequent second color cast correction process, but also improve the accuracy of the color cast correction.
[0240] In step S402, screen color cast information of the viewer terminal is obtained, and according to the screen color cast information, a second color cast correction process is performed on the image frame that has undergone the first color cast correction process.
[0241] In some embodiments, a third scale factor corresponding to the screen color cast information is queried; and the third scale factor is used as a gain to perform gain processing on the color value of each pixel in the image frame after the first color cast correction processing.
[0242] As an example, multiple candidate screen color cast information and corresponding candidate third scale factors are collected, and a first mapping table is created according to the multiple candidate screen color cast information and the corresponding candidate third scale factors; the third scale factor corresponding to the screen color cast information is queried in the first mapping table; and the third scale factor is used as a gain to perform gain processing on the color value of each pixel in the image frame after the first color cast correction processing.
[0243] For example, when the third scale factor corresponding to the screen color cast information is (R a , G a , B a ), for the color value (R org , G org , B org ), with (R a , G a , B a ) is used as the gain for gain calculation. After calculation, the color value of each pixel is (R a ×R org , G a ×G org , B a ×B org ).
[0244] The embodiment of the present application takes into account that the models of terminals used on the audience side are different and the color cast of the videos played are also different. Therefore, according to the screen color cast information of the audience terminal, the video with a unified color cast standard after the first color cast correction processing is subjected to a second color cast correction processing, which can improve the accuracy of the color cast correction.
[0245] In some embodiments, before step S402, it may also include: when at least one of the following conditions is met, determining that an operation of obtaining screen color cast information of the viewer's terminal will be executed: receiving a color cast correction operation submitted by a login account; the terminal does not have a privacy protection function turned on, wherein the privacy protection function is used to shield the device information of the reading terminal.
[0246] As an example, the color cast correction operation submitted by the login account can be a trigger operation of the login account for the second color cast correction entry. In this way, the second color cast correction processing can be performed on the video according to the viewer's instructions, which can reduce unnecessary calculations. When the viewer terminal turns on the privacy protection function, the client is prohibited from reading the device information of the viewer terminal, so that the screen color cast information of the viewer terminal cannot be obtained, thereby achieving the effect of privacy protection.
[0247] In some embodiments, as an alternative to step S401 and step S402, it may also include: obtaining screen color cast information of the viewer terminal, and querying a fourth scale factor corresponding to the screen color cast information; performing the following processing on each image frame in the video: using the fourth scale factor as a gain, performing gain processing on the color value of each pixel in the image frame.
[0248] As an example, multiple candidate screen color cast information and corresponding candidate fourth scale factors are collected, and a second mapping table is created according to the multiple candidate screen color cast information and the corresponding candidate fourth scale factors; the fourth scale factor corresponding to the screen color cast information is queried in the second mapping table; and the following processing is performed for each image frame in the video: the fourth scale factor is used as a gain, and a gain processing is performed on the color value of each pixel in the image frame.
[0249] For example, when the fourth scale factor corresponding to the screen color cast information is (R b , G b , B b ), for the color value (R org , G org , B org ), with (R b , G b , B b ) is used as the gain for gain calculation. After calculation, the color value of each pixel is (R b ×R org , G b ×G org , B b ×B org ).
[0250] In step S105, the video after the color cast correction is played.
[0251] In some embodiments, step S105 may include: playing a video after color cast correction processing in a first area of the human-computer interaction interface; when executing step S105, it may include: playing a video before color cast correction processing in a second area of the human-computer interaction interface; in response to an area switching operation, swapping the videos played in the first area and the second area, that is, switching the video played after color cast correction processing in the first area to the video before color cast correction processing, and switching the video played before color cast correction processing in the second area to the video played after color cast correction processing.
[0252] For example, the first area and the second area can be in a side-by-side mode or in a picture-in-picture mode. For example, the second area is located in the first area, and the area of the first area is larger than the area of the second area. Fig. 9In the live broadcast page, the picture 905 after the color cast correction processing and the picture 904 before the color cast correction processing are simultaneously displayed, wherein the picture 904 before the color cast correction processing is located within the picture 905 after the color cast correction processing. The area switching operation may be an operation of triggering the second area, that is, when the viewer triggers the picture 904 before the color cast correction processing, the videos played in the first area and the second area may be exchanged.
[0253] As an example, when playing a video before color cast correction processing in the second area of the human-computer interaction interface, it can include: displaying a closing entrance of the second area in the human-computer interaction interface; in response to a trigger operation for the closing entrance, automatically stopping the video playing in the second area, and hiding (e.g., closing or minimizing) the second area.
[0254] For example, Fig.13 When the viewer triggers the closing entrance 131, the video played in the second area 132 is automatically stopped and the second area 132 is closed, thereby saving display resources of the terminal.
[0255] As another example, when playing a video before color cast correction processing in the second area of the human-computer interaction interface, it can include: when no area switching operation is received within a preset waiting time, automatically stopping the video playing in the second area and hiding (for example, closing or minimizing) the second area.
[0256] For example, the preset waiting time may be a default value, or a value set by a viewer, a client, or a server.
[0257] The embodiment of the present application simultaneously displays the video before and after color cast correction in the live broadcast page, and supports the audience to switch the display, which can meet the diverse needs of the audience, reduce the audience's operation path, and thus save the terminal's operating resources.
[0258] In some embodiments, step S105 may include: automatically replacing the video of the live broadcast room before the color cast correction processing with the video after the color cast correction processing. In this way, when the video after the color cast correction processing is played, the video before the color cast correction processing can be automatically turned off, thereby saving the display resources of the terminal and the communication resources between the server and the terminal.
[0259] In some embodiments, see Figure 6 , Figure 6 is a flowchart of a live broadcast processing method provided in an embodiment of the present application, based on Figure 3 , before step S103, step S106 and step S107 may also be included.
[0260] In step S106, color cast detection is performed on the video in the live broadcast room to obtain a color cast detection result.
[0261] In some embodiments, the client can call the corresponding service (e.g., color cast detection service) of the viewer terminal to perform color cast detection on the video through the viewer terminal. The client can also call the corresponding service (e.g., color cast detection service) of the server to perform color cast detection on the video through the server.
[0262] As an example, when the client calls the corresponding service of the server (for example, color cast detection service) to perform color cast detection on the video, the replacement step of step S106 is: the server performs color cast detection on the video in the live broadcast room, obtains the color cast detection result, and sends the color cast detection result to the viewer terminal.
[0263] In the following, the client calls the corresponding service (e.g., color cast detection service) of the viewer terminal to perform color cast detection on the video through the viewer terminal as an example. It should be noted that the process of the client calling the corresponding service (e.g., color cast detection service) of the server to perform color cast detection on the video is similar to the following and will not be described in detail.
[0264] In some embodiments, see Figure 7 , Figure 7 is a flowchart of a live broadcast processing method provided in an embodiment of the present application, based on Figure 6 , step S106 may include steps S1061 to S1063.
[0265] In step S1061, multiple image frames are extracted from the video.
[0266] In some embodiments, each image frame may be extracted from the video, or a plurality of video frames may be extracted at intervals of a fixed number of frames in the video.
[0267] In step S1062, the following processing is performed for each image frame: the average chromaticity (D) and the chromaticity center distance (H) of the image frame are determined, and the ratio between the average chromaticity and the chromaticity center distance is determined as the color cast factor (K) of the image frame.
[0268] In some embodiments, determining the average chromaticity and chromaticity center distance of the image frame may include: determining the color value of each pixel in the image frame in a red, green, and blue color space (e.g., an RGB color space); converting the color value of each pixel in the red, green, and blue color space into a first color opposition dimension (a) and a second color opposition dimension (b) in a color opposition space (e.g., a Lab space); summing the first color opposition dimension of each pixel, and determining the ratio between the summed result and the number of pixels in the image frame as a first chromaticity component (d a); performing sum processing on the second color opposite dimension of each pixel, and determining the ratio between the sum result and the number of pixels in the image frame as the second chromaticity component (d b ); determining the average chroma of the image frame according to the first chroma component and the second chroma component; determining the first chroma center distance component (M) according to the first color opposition dimension and the second color opposition dimension of each pixel point a ) and the second chromaticity center distance component (M b ); Determine the chromaticity center distance of the image frame according to the first chromaticity center distance component and the second chromaticity center distance component.
[0269] As an example, determining the average chromaticity of an image frame based on a first chromaticity component and a second chromaticity component may include: squaring the first chromaticity component to obtain a first chromaticity result; squaring the second chromaticity component to obtain a second chromaticity result; adding the first chromaticity result and the second chromaticity result, and taking the square root of the sum to obtain the average chromaticity of the image frame.
[0270] Taking the quadratic power as an example, the first chromaticity component d is determined according to formula (5) and formula (6): a and the second chrominance component d b :
[0271]
[0272]
[0273] Wherein, M and N are the width and height of the image frame, in pixels. a and b are the two color channels of the pixel points of the image frame in the Lab space, namely, the first color opposition dimension and the second color opposition dimension mentioned above. The average chromaticity D of the image frame is determined according to formula (7):
[0274]
[0275] As an example, determining the first chromaticity center distance component and the second chromaticity center distance component according to the first color opposition dimension and the second color opposition dimension of each pixel point may include: performing the following processing for each pixel point: converting the first color opposition dimension (a) and the first chromaticity component (d a ) is subtracted, and the subtraction result is squared to obtain the first chromaticity distance, and the second color opposition dimension (b) and the second chromaticity component (d b ) are subtracted, and the subtraction result is squared to obtain a second chromaticity distance; the first chromaticity distance of each pixel is summed, and the ratio between the summed result and the number of pixels in the image frame is determined as the first chromaticity center distance component (M a); summing up the second chromaticity distance of each pixel, and determining the ratio between the summation result and the number of pixels in the image frame as the second chromaticity center distance component (M b ).
[0276] As an example, determining the chromaticity center distance of an image frame based on the first chromaticity center distance component and the second chromaticity center distance component may include: squaring the first chromaticity center distance component to obtain a third chromaticity center distance component; squaring the first chromaticity center distance component to obtain a fourth chromaticity center distance component; and adding the third chromaticity center distance component and the fourth chromaticity center distance component to obtain the chromaticity center distance of the image frame.
[0277] Taking the quadratic power as an example, the first chromaticity center distance component M is determined according to formula (8) and formula (9): a and the second chromaticity center distance component M b :
[0278]
[0279]
[0280] The chromaticity center distance H of the image frame is determined according to formula (10):
[0281]
[0282] The color cast factor K of the image frame is determined according to formula (11):
[0283]
[0284] In step S1063, a color cast detection result is determined according to the color cast factor of each image frame.
[0285] In some embodiments, among multiple image frames, image frames whose color cast factors are greater than a color cast factor threshold are determined as color cast image frames; when the ratio between the number of color cast image frames and the number of multiple image frames is greater than a color cast number threshold, it is determined that the video has color cast; when the ratio between the number of color cast image frames and the number of multiple image frames is not greater than the color cast number threshold, it is determined that the video has no color cast.
[0286] As an example, the color cast factor threshold and the color cast amount threshold can be default values or values set by the viewer, client, or server. The larger the value of the color cast factor, the greater the degree of color cast of the image frame. When the color cast factor is greater than the color cast factor threshold, it can be determined that the image frame has color cast. In this way, it can be determined that the number of image frames with color cast among the E image frames extracted from the video is e, and when e / E is greater than the color cast amount threshold, it is determined that the original video captured by the anchor side has color cast.
[0287] In some embodiments, before step S106, the following may also be included: performing scene detection processing on the video of the live broadcast room, and when a color display sensitive scene appears in the video of the live broadcast room, determining to perform a color cast detection processing operation on the video of the live broadcast room.
[0288] As an alternative to this embodiment, color cast detection processing may be performed continuously on the video in the live broadcast room during the live broadcast, or color cast detection processing may be performed on the video in the live broadcast room only after the viewer turns on the color cast detection function. For example, when the viewer triggers the color cast detection entrance in the human-computer interaction interface, color cast detection processing is performed on the video in the live broadcast room.
[0289] As an example, the types of color display sensitive scenarios include: recommendation scenarios for multiple items of different colors, recommendation scenarios for at least one item of a specific color, and recommendation scenarios for items that meet the preferences of the login account.
[0290] For example, the live broadcast schedule can be used to determine whether color display sensitive scenes appear in the video. For example, the live broadcast schedule will announce the recommended items and the recommended time of the corresponding items, so as to determine the appearance time of color display sensitive scenes; the audio content of the live broadcast room can also be recognized and processed to determine whether color display sensitive scenes appear in the video of the live broadcast room. Items that meet the preferences of the logged-in account can be items whose similarity with the items purchased, followed or collected by the logged-in account in the past is higher than the similarity threshold (which can be a default value or a value set by the viewer, client or server).
[0291] Taking live streaming of goods as an example, when the host recommends a dress, the dress has high requirements for the displayed color, because the color of the dress directly determines whether the audience buys it. At this time, the live broadcast screen can be processed for color cast detection; however, when the host recommends a mobile hard drive, the color of the mobile hard drive does not affect the audience's purchasing experience. At this time, there is no need to perform color cast detection on the live broadcast screen, thereby saving computing resources.
[0292] In some embodiments, before step S106, the method may also include: displaying a color cast detection entrance in the human-computer interaction interface; and in response to a trigger operation on the color cast detection entrance, determining to perform a color cast detection operation on the video in the live broadcast room.
[0293] As an example, Fig.14 In the live broadcast page, a color cast detection entry 141 is displayed. When the viewer triggers the color cast detection entry 141, the video in the live broadcast room is subjected to color cast detection, and when the video is detected to have color cast, a prompt message is displayed. In this way, the video in the live broadcast room is subjected to color cast detection only when the viewer turns on the color cast detection function, which can save color cast detection resources.
[0294] In step S107, when the color cast detection result indicates that the video has color cast, information indicating that the video has color cast is displayed in the human-computer interaction interface, and it is determined that an operation of displaying a color cast correction entry in the human-computer interaction interface will be executed.
[0295] In some embodiments, before displaying information in the human-computer interaction interface to prompt that the video has color cast, it may include: when the color cast detection result indicates that the color cast degree of the video exceeds a color cast degree threshold (which may be a default value or a value set by the viewer, anchor, client or server), determining to execute an operation of displaying information in the human-computer interaction interface to prompt that the video has color cast.
[0296] As an example, the color cast degree of the video can be determined according to the color cast factor of the image frame in the above embodiment. Specifically, the color cast factor of each image frame extracted from the video is determined, the color cast factor of each image frame is summed, and the ratio between the summed result and the number of extracted image frames is determined as the color cast degree of the video. In this way, the information for prompting the color cast of the video is displayed only when the color cast degree of the video is high, which can save the display resources of the terminal.
[0297] Below, the live broadcast processing method provided by the embodiment of the present application is described by taking the collaborative execution of the viewer terminal, the anchor terminal and the server as an example. Figure 8 , Figure 8 is a flowchart of the live broadcast processing method provided in the embodiment of the present application, which will be combined with Figure 8 The steps shown are explained.
[0298] In step S801, the anchor terminal sends the video of the live broadcast room to the server.
[0299] In step S802, the viewer terminal receives the video of the live broadcast room sent by the server, and plays the video of the live broadcast room in the human-computer interaction interface.
[0300] In step S803, the server performs color cast detection processing on the video stream of the live broadcast room to obtain a color cast detection result.
[0301] In step S804, when the color cast detection result indicates that the video has color cast, information for prompting that the video has color cast is sent to the viewer terminal, and a color cast correction entry is displayed on the viewer terminal.
[0302] In step S805, the viewer terminal sends a color cast correction instruction to the server in response to the trigger operation on the color cast correction entry.
[0303] In step S806, the server performs a first color cast correction process on the video according to the color cast correction instruction.
[0304] In step S807, the viewer terminal sends the screen color cast information to the server.
[0305] In step S808, the server performs a second color cast correction on the video after the first color cast correction according to the screen color cast information, and sends the video after the second color cast correction to the viewer terminal.
[0306] In step S809, the viewer terminal plays the video after the second color cast correction processing.
[0307] It should be noted that the specific implementation method of step S801 to step S809 is similar to the above embodiment and will not be described in detail here.
[0308] In the embodiment of the present application, after the viewer triggers the color cast correction entrance, the video in the live broadcast room is subjected to color cast correction processing, and the video after the color cast correction processing is played. This can ensure the accuracy of the video display color during the live broadcast process, improve the visual perception effect of the video, thereby improving the viewer's live broadcast viewing experience, and further saving computing resources and communication resources used for the live broadcast.
[0309] Below, a specific application scenario is taken as an example to illustrate the live broadcast processing method provided by an embodiment of the present application.
[0310] In the embodiment of the present application, when the live broadcast system detects that the live broadcast source video of the anchor has color cast, it actively reminds the audience of the color cast and provides an automatic color correction and restoration function. When the audience turns on the color correction (i.e. the above-mentioned color cast correction) function, the live broadcast platform performs the first color correction processing (i.e. the above-mentioned first color cast correction processing) on the live broadcast source video of the anchor, and at the same time, the audience reports the device information used to play the live broadcast (i.e. the above-mentioned terminal screen color cast information). The live broadcast platform performs the second color correction processing (i.e. the above-mentioned second color cast correction processing) on the live broadcast video according to the device information, and transmits the video screen after the second color correction processing to the audience.
[0311] The following describes the expression form of the live broadcast processing method provided in the embodiment of the present application in the terminal.
[0312] The embodiment of the present application provides a button for the color correction and restoration function (i.e., the color cast correction entrance mentioned above). At the same time, when the live broadcast platform detects that the live broadcast source video of the anchor has color cast, it will actively prompt the audience end that the anchor video has color cast, and support the audience to choose to turn on the color correction and restoration function. When the audience clicks the button of the color correction and restoration function, the color correction and restoration function is turned on, and the background server will perform the first color cast correction processing on the live broadcast source video of the anchor. At the same time, the background server obtains the device information uploaded by the audience end, and performs a second color correction processing on the live broadcast video after the first color correction processing according to the device information. The background server pushes the picture after the second color correction processing and the original picture with color cast to the audience end at the same time, and compares and displays them on the audience end. The audience can manually switch between the "original picture" and the "picture after color restoration".
[0313] As an example, see Fig. 9 , Fig. 9 It is a schematic diagram of an application scenario of the live broadcast processing method provided in an embodiment of the present application. Fig. 9 In the process of watching the live broadcast, when the live broadcast system detects that the live broadcast source video screen of the anchor has color cast, the first prompt information 901 and the color cast correction entrance 902 are displayed to prompt the audience to turn on the color correction and restoration function; when the audience triggers the color cast correction entrance 902, the color correction and restoration function can be turned on, the second prompt information 903 is displayed, and the color cast correction processing is performed on the background server; when the color cast correction processing is completed, the screen 905 after the color cast correction processing and the screen 904 before the color cast correction processing can be displayed on the live broadcast page, and the screen 904 before the color cast correction processing can be displayed in the small window in the upper left corner of the live broadcast page, and the audience can manually switch between the screen 905 after the color cast correction processing and the screen 904 before the color cast correction processing.
[0314] The following will be combined Fig.10 The specific implementation of the live broadcast processing method provided in the embodiment of the present application is described. Fig.10 It is a schematic diagram of the principle of the live broadcast processing method provided in an embodiment of the present application.
[0315] In step S110, the anchor terminal collects live video and sends the live video to the backend server.
[0316] In step S120, the background server performs color cast detection on the live video, and sends a prompt message to the viewer terminal when the video has color cast.
[0317] In some embodiments, the backend server performs frame extraction detection (the number of extracted frames is E) on the video captured by the camera on the anchor side at regular intervals (the duration can be set, because the background and light of live broadcasts generally do not change frequently, so under the condition of limited computing power, the duration can be set), and uses the equivalent circle method to perform color cast detection on each image (or image frame) obtained by the frame extraction. Specifically, the image is first converted from RGB space to Lab space, for example, the image is first converted from RGB space to XYZ space, and then converted from XYZ space to Lab space; then the ratio between the average chromaticity D of the image and the chromaticity center distance H, that is, the color cast factor K is used to measure the degree of color cast of the image.
[0318] As an example, the calculation method of the color cast factor K is shown in formulas (12)-(18).
[0319]
[0320]
[0321]
[0322]
[0323]
[0324]
[0325]
[0326] Where M and N are the width and height of the image, in pixels. a and b are the two color channels of the image pixel in Lab space. On the ab chromaticity plane, the center coordinates of the equivalent circle are (d a , d b ), radius H = M a 2 +M b 2 , the distance from the center of the equivalent circle to the origin of the neutral axis of the ab chromaticity plane (a=0, b=0) The color cast of the entire image is determined by the specific position ab of the equivalent circle on the ab chromaticity plane. a >0, the image is reddish, otherwise the image is greenish. b>0, the image is yellowish, otherwise the image is blue. The larger the value of the color cast factor K, the greater the degree of color cast of the image. The color cast factor threshold is preset (usually set to 1). When the calculated K is greater than the color cast factor threshold, the image is judged to have color cast. In this way, it can be determined that the number of images with color cast in the E image frames extracted from the video is e. When e / E is greater than the set value, it is determined that the original video collected by the anchor has color cast.
[0327] In step S130, when the viewer terminal turns on the color correction and restoration function, the background server performs a first color correction process on the video with color cast.
[0328] In some embodiments, when the viewer clicks the button of the color correction and restoration function, the color correction and restoration function can be turned on, and the background server will perform color cast correction on the original video of the anchor. Specifically, each frame image in the video is processed as follows:
[0329] In the RGB color space, the raw data (R org , G org , B org ), perform histogram equalization on the data of the three channels R, G, and B respectively, and then convert the image from the RGB color space to the YCrCb color space to obtain the histogram equalization data of each pixel in the image (Y Hist ,Cr Hist , Cb Hist ), and finally find all white pixels that satisfy formula (19) from all pixels of the image:
[0330]
[0331] Among the white pixels that satisfy formula (19), the one with the largest Y Hist The value and the C r closest to zero Hist , Cb Hist Find the pixel with the highest brightness (Y Hist bright ,Cr Hist bright , Cb Hist bright ). At the same time, calculate the average value (Y Hist avg ,Cr Hist avg , Cb Hist avg ). Find all pixels that satisfy formula (20) from all pixels of the image:
[0332]
[0333] Among them, Y L and Y H Selected from Y Hist bright and Y Hist avg The minimum and maximum values between Cr L Cr H Selected from Cr Hist bright and Cr Hist avg The minimum and maximum values between Cb L and Cb H Selected from Cb Hist bright and Cb Hist avg Select the pixels that satisfy formula (20) from the image as reference white pixels, and calculate the average value of all reference white pixels (R w , G w , B w ).
[0334] According to formula (21), the first scale factor (R scale , G scale , B scale ).
[0335]
[0336] Among them, Y w is the average brightness value of the reference white pixels, that is, the value obtained by averaging the brightness values of all reference white pixels.
[0337] According to formula (22), the second scale factor (R GWA , G GWA , B GWA ).
[0338]
[0339] Gray = (R aver +G aver +B aver ) / 3, and (R aver , G aver , B aver ) is the original data of each pixel in the image in the RGB color space (R org , G org , B org )’s average value.
[0340] When the image is reddish, (RGWA , G scale , B scale ) is used as the scale factor to calculate the gain. When the image is blue, (R scale , G scale , B GWA ) is used as the scale factor to calculate the gain. When the image is green, (R scale , G GWA , B scale ) is used as the scale factor to calculate the gain. When the image is yellowish, (R GWA , G GWA , B scale ) is the scale factor for gain calculation.
[0341] In step S140, the background server obtains the device information of the viewer terminal, and performs a second color correction process on the video after the first color correction process according to the device information of the viewer terminal.
[0342] In some embodiments, the screen color cast and adjustment values of mainstream audience-end mobile devices on the market can be collected in advance, and a second color correction process can be performed when the video is pushed to the audience terminal, thereby eliminating the impact of different mobile devices. For example, when the viewer's mobile phone model is obtained as a device with a reddish screen color, the proportion of the R channel in the video stream can be reduced when pushing the stream.
[0343] In step S150, the video after the second color correction processing is pushed to the viewer terminal.
[0344] Live streaming is the mainstream form of displaying items in online e-commerce. The embodiments of the present application restore the colors of items in the live streaming room, so that viewers can quickly identify the true colors of the items, and can achieve "seeing is believing" in the live streaming room, thereby reducing the loss costs caused by returns due to color differences.
[0345] Combine the following Figure 2 The exemplary structure of the live broadcast processing device provided in the embodiment of the present application is described as a software module.
[0346] In some embodiments, Figure 2 As shown, the software modules stored in the live broadcast processing device 455 of the memory 450 may include: a receiving module 4551, used to receive the video of the live broadcast room; a display module 4552, used to play the video of the live broadcast room in the human-computer interaction interface, and display the color cast correction entrance in the human-computer interaction interface; a correction module 4553, used to respond to the trigger operation of the color cast correction entrance, perform color cast correction processing on the video, and play the video after the color cast correction processing.
[0347] In the above scheme, the correction module 4553 is also used to play the video after the color cast correction processing in the first area of the human-computer interaction interface; play the video before the color cast correction processing in the second area of the human-computer interaction interface; and exchange the videos played in the first area and the second area in response to the area switching operation.
[0348] In the above solution, the correction module 4553 is also used to display a closing entrance of the second area in the human-computer interaction interface; in response to a trigger operation for the closing entrance, the video played in the second area is automatically stopped, and the second area is hidden.
[0349] In the above solution, the correction module 4553 is also used to automatically stop the video played in the second area and hide the second area when no area switching operation is received within a preset waiting time.
[0350] In the above scheme, the correction module 4553 is also used to automatically replace the video in the live broadcast room before the color cast correction processing with the video after the color cast correction processing.
[0351] In the above scheme, the correction module 4553 is also used to display the color cast correction parameter setting page; in response to the color cast correction parameter configuration operation received on the color cast correction parameter setting page, the color cast correction parameters configured by the login account are obtained, wherein the login account is the account for logging into the live broadcast room; and according to the color cast correction parameters configured by the login account, the video is subjected to color cast correction processing.
[0352] In the above scheme, the display module 4552 is also used to obtain the color cast tolerance of the login account, where the login account is the account for logging into the live broadcast room; when the color cast of the video exceeds the color cast tolerance, the color cast correction entrance is automatically triggered.
[0353] In the above scheme, the correction module 4553 is also used to perform the following processing on each image frame in the video: performing a first color cast correction processing on the image frame according to the color value of each pixel in the image frame; obtaining the screen color cast information of the terminal, and performing a second color cast correction processing on the image frame after the first color cast correction processing according to the screen color cast information.
[0354] In the above scheme, the correction module 4553 is also used to determine that an operation of obtaining the screen color cast information of the terminal will be executed when at least one of the following conditions is met: a color cast correction operation submitted by a login account is received, wherein the login account is an account that logs in to the live broadcast room; the terminal does not have a privacy protection function turned on, wherein the privacy protection function is used to shield the device information of the reading terminal.
[0355] In the above scheme, the correction module 4553 is also used to perform the following processing on each pixel in the image frame: determine multiple color values corresponding to multiple color channels in the pixel, perform equalization processing on the multiple color values, and obtain multiple equalization data corresponding to the multiple color values; determine multiple reference white pixel points in the image frame according to the multiple equalization data corresponding to each pixel in the image frame; determine a first scale factor according to the brightness value and color value of the multiple reference white pixel points; determine a second scale factor according to the color value of each pixel in the image frame; and perform a first color cast correction processing on the image frame according to the first scale factor and the second scale factor.
[0356] In the above scheme, the correction module 4553 is also used to perform the following processing for each pixel in the image frame: determine the first equalization data corresponding to the first color channel, the second equalization data corresponding to the second color channel, and the third equalization data corresponding to the third color channel among the multiple equalization data corresponding to the pixel; select the pixel points that simultaneously meet the following conditions in the image frame as white pixels: the first equalization data of the pixel point is greater than or equal to the first preset value, the second equalization data of the pixel point is greater than or equal to the second preset value, and the third equalization data of the pixel point is less than or equal to the third preset value; select the pixel point with the largest brightness value among the multiple white pixels as the brightness white pixel point; and determine multiple reference white pixels in the image frame according to the first equalization data, the second equalization data and the third equalization data corresponding to the brightness white pixel point.
[0357] In the above scheme, the correction module 4553 is further used to determine the first equalization data corresponding to the brightness white pixel as the first brightness equalization data, determine the second equalization data corresponding to the brightness white pixel as the second brightness equalization data, and determine the third equalization data corresponding to the brightness white pixel as the third brightness equalization data; sum the first equalization data corresponding to each white pixel, and determine the ratio between the summation result and the number of white pixels as the first equalization average data; sum the second equalization data corresponding to each white pixel, and determine the ratio between the summation result and the number of white pixels as the first equalization average data. The ratio between the first and second equalized average data is determined as the second equalized average data; the third equalized data corresponding to each white pixel is summed, and the ratio between the summed result and the number of white pixels is determined as the third equalized average data; pixels that simultaneously meet the following conditions are selected in the image frame as reference white pixels: the first equalized data of the pixel is between the first brightness equalized data and the first equalized average data, the second equalized data of the pixel is between the second brightness equalized data and the second equalized average data, and the third equalized data of the pixel is between the third brightness equalized data and the third equalized average data.
[0358] In the above scheme, the correction module 4553 is also used to sum the brightness value of each reference white pixel, and determine the ratio between the sum result and the number of reference white pixels as the brightness average value; determine the first color value of the first color channel corresponding to each reference white pixel, the second color value of the second color channel corresponding to the second color channel, and the third color value of the third color channel corresponding to each reference white pixel; sum the first color value corresponding to each reference white pixel, and determine the ratio between the sum result and the number of reference white pixels as the first color average value; sum the second color value corresponding to each reference white pixel, and determine the ratio between the sum result and the number of reference white pixels as the second color average value; sum the third color value corresponding to each reference white pixel, and determine the ratio between the sum result and the number of reference white pixels as the third color average value; determine the first component, the second component and the third component according to the brightness average value, the first color average value, the second color average value and the third color average value, and combine the first component, the second component and the third component into a first scale factor.
[0359] In the above scheme, the correction module 4553 is also used to determine the ratio between the brightness average value and the first color average value as the first component; determine the ratio between the brightness average value and the second color average value as the second component; and determine the ratio between the brightness average value and the third color average value as the third component.
[0360] In the above scheme, the correction module 4553 is also used to sum the first color value of the first color channel corresponding to each pixel in the image frame, and determine the ratio between the sum result and the number of pixels in the image frame as the fourth color average value; sum the second color value of the second color channel corresponding to each pixel in the image frame, and determine the ratio between the sum result and the number of pixels in the image frame as the fifth color average value; sum the third color value of the third color channel corresponding to each pixel in the image frame, and determine the ratio between the sum result and the number of pixels in the image frame as the sixth color average value; determine the average value between the fourth color average value, the fifth color average value and the sixth color average value as the total color average value; determine the fourth component, the fifth component and the sixth component according to the total color average value, the fourth color average value, the fifth color average value and the sixth color average value, and combine the fourth component, the fifth component and the sixth component into a second scale factor.
[0361] In the above scheme, the correction module 4553 is also used to determine the ratio between the total color average value and the fourth color average value as the fourth component; determine the ratio between the total color average value and the fifth color average value as the fifth component; and determine the ratio between the total color average value and the sixth color average value as the sixth component.
[0362] In the above scheme, the correction module 4553 is further used to determine the color that the image frame tends to be based on the first chromaticity component and the second chromaticity component of the image frame; when the image frame tends to be red, the fourth component of the second scale factor, the second component of the first scale factor and the third component of the first scale factor are used as gains to perform gain processing on the color value of each pixel in the image frame; when the image frame tends to be blue, the first component of the first scale factor, the second component of the first scale factor and the sixth component of the second scale factor are used as gains to perform gain processing on the color value of each pixel in the image frame; when the image frame tends to be green, the first component of the first scale factor, the fifth component of the second scale factor and the third component of the first scale factor are used as gains to perform gain processing on the color value of each pixel in the image frame; when the image frame tends to be yellow, the fourth component of the second scale factor, the fifth component of the second scale factor and the third component of the first scale factor are used as gains to perform gain processing on the color value of each pixel in the image frame.
[0363] In the above scheme, the correction module 4553 is also used to determine that the image frame is biased towards red when the first chromaticity component is greater than the fourth preset value; when the first chromaticity component is not greater than the fourth preset value, determine that the image frame is biased towards green; when the second chromaticity component is greater than the fifth preset value, determine that the image frame is biased towards yellow; when the second chromaticity component is not greater than the fifth preset value, determine that the image frame is biased towards blue.
[0364] In the above solution, the correction module 4553 is further used to query the third scale factor corresponding to the screen color cast information; and use the third scale factor as gain to perform gain processing on the color value of each pixel in the image frame after the first color cast correction processing.
[0365] In the above scheme, the correction module 4553 is also used to obtain the screen color cast information of the terminal and query the fourth scale factor corresponding to the screen color cast information; perform the following processing on each image frame in the video: use the fourth scale factor as the gain, and perform gain processing on the color value of each pixel in the image frame.
[0366] In the above scheme, the display module 4552 is also used to perform color cast detection on the video in the live broadcast room to obtain a color cast detection result; when the color cast detection result indicates that the video has color cast, information used to prompt that the video has color cast is displayed in the human-computer interaction interface, and it is determined to execute the operation of displaying the color cast correction entrance in the human-computer interaction interface.
[0367] In the above scheme, the display module 4552 is also used to extract multiple image frames from the video; perform the following processing for each image frame: determine the average chromaticity and chromaticity center distance of the image frame, and determine the ratio between the average chromaticity and the chromaticity center distance as the color cast factor of the image frame; determine the color cast detection result of the video based on the color cast factor of each image frame.
[0368] In the above scheme, the display module 4552 is also used to determine, among multiple image frames, an image frame whose color cast factor is greater than a color cast factor threshold as a color cast image frame; when the ratio between the number of color cast image frames and the number of multiple image frames is greater than the color cast number threshold, it is determined that the video has color cast; when the ratio between the number of color cast image frames and the number of multiple image frames is not greater than the color cast number threshold, it is determined that the video has no color cast.
[0369] In the above scheme, the display module 4552 is also used to determine the color value of each pixel in the image frame in the red, green and blue color space; convert the color value of each pixel in the red, green and blue color space into a first color opposition dimension and a second color opposition dimension in the color opposition space; perform summation processing on the first color opposition dimension of each pixel, and determine the ratio between the summation result and the number of pixels in the image frame as the first chromaticity component; perform summation processing on the second color opposition dimension of each pixel, and determine the ratio between the summation result and the number of pixels in the image frame as the second chromaticity component; determine the average chromaticity of the image frame according to the first chromaticity component and the second chromaticity component; determine the first chromaticity center distance component and the second chromaticity center distance component according to the first color opposition dimension and the second color opposition dimension of each pixel; determine the chromaticity center distance of the image frame according to the first chromaticity center distance component and the second chromaticity center distance component.
[0370] In the above scheme, the display module 4552 is also used to perform a square process on the first chromaticity component to obtain a first square result; perform a square process on the second chromaticity component to obtain a second square result; perform a sum process on the first square result and the second square result, and perform a square root process on the sum result to obtain the average chromaticity of the image frame.
[0371] In the above scheme, the display module 4552 is also used to perform the following processing for each pixel: subtract the first color opposite dimension and the first chromaticity component of the pixel, and square the subtraction result to obtain a first chromaticity distance, subtract the second color opposite dimension and the second chromaticity component of the pixel, and square the subtraction result to obtain a second chromaticity distance; add the first chromaticity distance of each pixel, and determine the ratio between the addition result and the number of pixels in the image frame as the first chromaticity center distance component; add the second chromaticity distance of each pixel, and determine the ratio between the addition result and the number of pixels in the image frame as the second chromaticity center distance component.
[0372] In the above scheme, the display module 4552 is also used to square the first chromaticity center distance component to obtain a third square result; square the first chromaticity center distance component to obtain a fourth square result; and add the third square result and the fourth square result to obtain the chromaticity center distance of the image frame.
[0373] In the above scheme, the display module 4552 is also used to perform scene detection processing on the video of the live broadcast room. When a color display sensitive scene appears in the video of the live broadcast room, it is determined to perform an operation of color cast detection processing on the video of the live broadcast room; wherein, the types of color display sensitive scenes include: recommended scenes for multiple objects of different colors, recommended scenes for at least one object of a specific color, and recommended scenes for objects that meet the preferences of the login account, and the login account is the account that logs in to the live broadcast room.
[0374] In the above scheme, the display module 4552 is also used to display the color cast detection entrance in the human-computer interaction interface; in response to the trigger operation on the color cast detection entrance, it is determined to perform the operation of color cast detection processing on the video in the live broadcast room.
[0375] In the above scheme, the display module 4552 is also used to perform scene detection processing on the video of the live broadcast room played in the human-computer interaction interface; when a color display sensitive scene appears in the video of the live broadcast room, it is determined to automatically enter the operation of displaying the color cast correction entrance in the human-computer interaction interface; wherein, the types of color display sensitive scenes include: recommended scenes for multiple objects of different colors, recommended scenes for at least one object of a specific color, and recommended scenes for objects that meet the preferences of the login account; the login account is the account that logs in to the live broadcast room.
[0376] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the live broadcast processing method described in the embodiment of the present application.
[0377] The embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will execute the live broadcast processing method provided in the embodiment of the present application, for example, Figures 3 to 8 The live broadcast processing method shown is a computer including various electronic devices including smart terminals and servers.
[0378] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0379] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0380] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a hypertext markup language document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0381] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0382] To sum up, after the viewer triggers the color cast correction entrance, the embodiment of the present application performs color cast correction on the video in the live broadcast room and plays the video after the color cast correction. This can ensure the accuracy of the video display color during the live broadcast and improve the visual perception effect of the video, thereby improving the audience's live viewing experience and saving computing resources and communication resources used for the live broadcast.
[0383] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A live broadcast processing method, characterized in that: The method comprises: Receive live broadcast video; Playing a video of a live broadcast room in a human-computer interaction interface, and when a color display sensitive scene appears in the video of the live broadcast room or a color cast detection result indicates that the video has color cast, obtaining the color cast tolerance of the login account; wherein the login account is the account that logs in to the live broadcast room; When the color cast degree of the video exceeds the color cast tolerance degree, a color cast correction entrance, a countdown control, and a color cast correction close button are displayed in the human-computer interaction interface; In response to a trigger operation on the color cast correction entry, or when no trigger operation on the color cast correction close button is received before the countdown in the countdown control ends, displaying a color cast correction parameter setting page; In response to a color cast correction parameter configuration operation received on the color cast correction parameter setting page, the color cast correction parameters configured by the login account are obtained, the video is subjected to color cast correction processing according to the color cast correction parameters, and the video after the color cast correction processing is played; wherein the color cast correction processing is used to reproduce the true color of the object in the video.
2. The method according to claim 1, characterized in that The playing of the video after the color cast correction process includes: Play the video after color cast correction in the first area of the human-computer interaction interface; When playing the video after the color cast correction process, the method further includes: Playing the video before the color cast correction process in the second area of the human-computer interaction interface; In response to the zone switching operation, the videos played in the first zone and the second zone are swapped.
3. The method according to claim 2, characterized in that When playing the video before the color cast correction process in the second area of the human-computer interaction interface, the method further includes: Displaying a closed entrance of the second area in the human-computer interaction interface; In response to a trigger operation on the closing entrance, the video played in the second area is automatically stopped, and the second area is hidden.
4. The method according to claim 2, characterized in that: When playing the video before the color cast correction process in the second area of the human-computer interaction interface, the method further includes: When the area switching operation is not received within a preset waiting time, the video played in the second area is automatically stopped and the second area is hidden.
5. The method according to claim 1, characterized in that: The playing of the video after the color cast correction process includes: The video being played before the color cast correction process is automatically replaced by the video after the color cast correction process.
6. The method according to claim 1, characterized in that Before displaying the color cast correction entrance in the human-computer interaction interface, the method further includes: Performing scene detection processing on the video of the live broadcast room played in the human-computer interaction interface; When a color display sensitive scene appears in the video of the live broadcast room, determining to automatically switch to an operation of displaying a color cast correction entrance in the human-computer interaction interface; Among them, the types of color display sensitive scenes include: recommended scenes for multiple objects of different colors, recommended scenes for at least one object of a specific color, and recommended scenes for objects that meet the preferences of the login account; the login account is the account that logs in to the live broadcast room.
7. The method according to claim 1, characterized in that Before displaying the color cast correction entrance in the human-computer interaction interface, the method further includes: Performing color cast detection processing on the video of the live broadcast room to obtain a color cast detection result; When the color cast detection result indicates that the video has color cast, information for prompting that the video has color cast is displayed in the human-computer interaction interface, and It is determined that an operation of displaying a color cast correction entrance in the human-computer interaction interface will be performed.
8. The method according to claim 7, characterized in that Before performing color cast detection processing on the video in the live broadcast room, the method further includes: Performing scene detection processing on the video of the live broadcast room, and when a color display sensitive scene appears in the video of the live broadcast room, determining to perform a color cast detection processing operation on the video of the live broadcast room; Among them, the types of color display sensitive scenes include: recommended scenes for multiple objects of different colors, recommended scenes for at least one object of a specific color, and recommended scenes for objects that meet the preferences of the login account; the login account is the account that logs in to the live broadcast room.
9. The method according to claim 7, characterized in that: Before performing color cast detection processing on the video in the live broadcast room, the method further includes: Displaying a color cast detection entrance in the human-computer interaction interface; In response to a trigger operation on the color cast detection entry, it is determined that an operation of performing color cast detection processing on the video in the live broadcast room will be performed.
10. The method according to claim 7, characterized in that The performing color cast detection processing on the video of the live broadcast room to obtain a color cast detection result includes: Extracting a plurality of image frames from the video; For each of the image frames, the following processing is performed: determining the average chromaticity and the chromaticity center distance of the image frame, and determining the ratio between the average chromaticity and the chromaticity center distance as the color cast factor of the image frame; The color cast detection result of the video is determined according to the color cast factor of each of the image frames.
11. A live broadcast processing device, characterized in that: include: A receiving module, used for receiving the video from the live broadcast room; A display module is used to play the video of the live broadcast room in the human-computer interaction interface, and when a color display sensitive scene appears in the video of the live broadcast room or the color cast detection result indicates that the video has color cast, obtain the color cast tolerance of the login account; wherein the login account is the account that logs in to the live broadcast room; when the color cast degree of the video exceeds the color cast tolerance degree, display a color cast correction entrance, a countdown control and a color cast correction close button in the human-computer interaction interface; A correction module, configured to display a color cast correction parameter setting page in response to a trigger operation on the color cast correction entry, or when no trigger operation on the color cast correction close button is received before the countdown in the countdown control ends; In response to a color cast correction parameter configuration operation received on the color cast correction parameter setting page, the color cast correction parameters configured by the login account are obtained, the video is subjected to color cast correction processing according to the color cast correction parameters, and the video after the color cast correction processing is played; wherein the color cast correction processing is used to reproduce the true color of the object in the video.
12. An electronic device, characterized in that: include: A memory for storing computer executable instructions; The processor is used to implement the live broadcast processing method described in any one of claims 1 to 10 when executing the computer executable instructions stored in the memory.
13. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and when the computer executable instructions are executed, they are used to implement the live broadcast processing method described in any one of claims 1 to 10.
14. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by the processor, the live broadcast processing method described in any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Video playing method and device, computing device and storage medium
CN107948627A
Image data processing method and device and storage medium
CN110996173A
Image color cast correction method, model training method, device and equipment
CN112508812A
Method for using enhanced function of electronic device and related apparatus
WO2020211735A1