Video coding control method and device based on skin color detection
By performing skin color detection and determination of significance value of multiple detection units on video images, the problem of low detection accuracy in the area of interest is solved, flexible video encoding block size and code rate allocation is realized, and video encoding effect is improved.
Patent Information
- Application Number
- CN202210645886.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-08
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-06-08
AI Technical Summary
In the prior art, in the video encoding method based on skin color detection, the detection accuracy of the region of interest is low and the flexibility is poor, resulting in poor video encoding effect.
By dividing multiple detection units in the video image for skin color detection, the skin color remarkability value of the encoded block is determined, and video encoding is performed according to the remarkability value, and the size and code rate allocation of the encoded block are flexibly adjusted.
It improves the detection accuracy and flexibility of the areas of interest, improves the effect of video encoding, and optimizes the skin color detection mechanism.
Smart Images

Figure CN114845103B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of video coding technology, and in particular to a video coding control method and device based on skin color detection. Background Art
[0002] With the rapid development of smart devices such as computers and mobile phones, and their related technologies, the internet has gradually permeated every aspect of human life, profoundly changing our lifestyles. This has enabled users to access live broadcasts, short videos, and other video content on a variety of mobile devices. To improve transmission efficiency, video encoding and compression algorithms are used during network transmission. Without compression, the data volume would be too large to meet the bandwidth requirements of civilian networks.
[0003] During video encoding, since the human eye perceives different areas of a video differently, bitrate resources are tilted towards areas of interest to the human eye, that is, encoding at a higher bitrate than other areas of no interest to the human eye. Using a relatively low bitrate for areas of no interest to the human eye can provide users with a better viewing experience while ensuring the overall bitrate remains unchanged. Related technologies typically use skin color detection to determine the area of interest of a video image. When performing differential encoding of different areas of a video image, the fixed size of the detection unit, such as a 16*16 detection unit, leads to inaccurate detection of the video area of interest when the detection unit is large, thereby reducing the video encoding effect. Summary of the Invention
[0004] The embodiments of the present application provide a video encoding control method and device based on skin color detection, which solves the problems of low accuracy and poor flexibility in region of interest detection in related technologies and improves the video encoding effect.
[0005] In a first aspect, an embodiment of the present application provides a video encoding control method based on skin color detection, the method comprising:
[0006] Detecting a plurality of detection units divided in the video image to obtain a skin color detection result of each detection unit;
[0007] determining a skin color saliency value of a corresponding coding block according to the skin color detection result, wherein the coding block includes a plurality of the detection units, and the video image includes a plurality of coding blocks;
[0008] Video encoding is performed on the coding block according to the skin color saliency value of the coding block.
[0009] In a second aspect, an embodiment of the present application further provides a video encoding control device based on skin color detection, comprising:
[0010] a skin color detection module configured to detect a plurality of detection units divided in the video image and obtain a skin color detection result of each detection unit;
[0011] a coding block skin color determination module configured to determine a skin color saliency value of a corresponding coding block according to the skin color detection result, wherein the coding block includes a plurality of the detection units, and the video image includes a plurality of coding blocks;
[0012] The video encoding module is configured to perform video encoding on the encoding block according to the skin color saliency value of the encoding block.
[0013] In a third aspect, an embodiment of the present application further provides a video encoding control device based on skin color detection, the device comprising:
[0014] one or more processors;
[0015] a storage device for storing one or more programs,
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the video encoding control method based on skin color detection described in the embodiment of the present application.
[0017] In a fourth aspect, an embodiment of the present application further provides a storage medium storing computer-executable instructions, which, when executed by a computer processor, are used to execute the video encoding control method based on skin color detection described in an embodiment of the present application.
[0018] In a fifth aspect, an embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor of the device reads and executes the computer program from the computer-readable storage medium, so that the device executes the video encoding control method based on skin color detection described in the embodiment of the present application.
[0019] In an embodiment of the present application, by detecting multiple detection units divided in a video image, a skin color detection result of each detection unit is obtained, and the skin color saliency value of the corresponding coding block is determined based on the skin color detection result, wherein a coding block includes multiple detection units, and the video image includes multiple coding blocks. Video encoding is performed on the coding block based on the skin color saliency value of the coding block, which solves the problems of low accuracy and poor flexibility in region of interest detection in related technologies, optimizes the skin color detection mechanism, improves the flexibility of skin color detection, and enhances the video encoding effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A flowchart of a video encoding control method based on skin color detection provided in an embodiment of the present application;
[0021] Figure 2 A flowchart of a specific method for dividing a video image and performing detection unit identification provided in an embodiment of the present application;
[0022] Figure 3 A flowchart of a method for determining a skin color saliency value of a coding block based on a skin color detection result of each detection unit in a plurality of detection units provided in an embodiment of the present application;
[0023] Figure 4 A flowchart of a method for performing video encoding on a coding block according to a skin color saliency value of the coding block provided in an embodiment of the present application;
[0024] Figure 5 A flowchart of another video encoding control method based on skin color detection provided in an embodiment of the present application;
[0025] Figure 6 This is a structural block diagram of a video encoding control device based on skin color detection provided in an embodiment of the present application;
[0026] Figure 7 A schematic structural diagram of a video encoding control device based on skin color detection provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The following is a further detailed description of the embodiments of the present application in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the embodiments of the present application, and are not intended to limit the embodiments of the present application. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions of the embodiments of the present application, rather than all structures.
[0028] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0029] Figure 1 The flowchart of a video encoding control method based on skin color detection provided in an embodiment of the present application can be used in a video encoding process. The method can be executed by a computing device such as a server, smart terminal, notebook, tablet computer, etc., and specifically includes the following steps:
[0030] Step S101: Detect multiple detection units divided in a video image to obtain a skin color detection result of each detection unit.
[0031] In one embodiment, when encoding a video image, different encoding qualities are used for different regions of the video image. Regions of interest are encoded with relatively high quality for a display effect, while regions of no interest are encoded with relatively low quality. The region of interest refers to the pixel region within a video image frame where a block or blocks are located, which is the area of interest to the user.
[0032] In one embodiment, skin color detection is used to identify areas of user interest in live broadcasts or videos containing human figures. For example, areas with skin color typically correspond to faces or human bodies, which are areas of user interest. Thus, skin color recognition is used to determine areas of interest and areas of non-interest in the video image.
[0033] In one embodiment, multiple detection units divided in a video image are detected to obtain a skin color detection result for each detection unit. A detection unit is a fixed-size unit block, exemplarily an 8*8 detection unit. A frame of video image may contain multiple 8*8 detection units. For example, a 1024*1024 image may be divided into 16,384 8*8 detection units. Each detection unit is identified to obtain a detection result indicating whether it is a skin color block. Alternatively, a trained skin color detection model may be used to identify each detection unit to obtain a skin color block detection result.
[0034] Step S102: determining a skin color saliency value of a corresponding coding block according to the skin color detection result, wherein the coding block includes a plurality of the detection units, and the video image includes a plurality of coding blocks.
[0035] In one embodiment, when controlling video encoding, the control is performed for a coding block of a set fixed size. The size of the coding block is larger than the size of the detection unit, that is, one coding block contains multiple detection units. The size of the specific coding block can be flexibly set, is not a fixed size, and is not limited to various video coding compression standards, such as the HEVC video coding standard. Because in the HEVC video coding standard, the coding block size is fixed in one encoding process, and the detection unit size and coding block size in this solution can be flexibly adjusted and set, it is only necessary to ensure that the size of the coding block is not less than the size of the detection unit.
[0036] In one embodiment, after obtaining the skin color detection result, the skin color saliency value of the corresponding coding block is determined based on the skin color detection result. For example, taking the detection unit size of 8*8 as an example, the coding block size is 64*64, i.e., one coding block contains 64 detection units. The skin color saliency value of the coding block can be determined based on the skin color detection results corresponding to these 64 detection units. In this case, for a video frame with a size of 1024*1024, it contains 256 coding blocks. The skin color saliency value of each coding block is determined based on the skin color detection results of the corresponding 64 detection units. In another embodiment, to meet different scene requirements, the coding block size is set to 32*32, for example. In this case, one coding block contains 16 detection units. For a video frame with a size of 256*256, it contains 64 coding blocks. In this case, the region of interest and the region of non-interest of the video image are determined based on the skin color saliency values of these 64 coding blocks.
[0037] The skin color saliency value range is an interval range, and different values within the interval range are subsequently encoded using different coding methods for the corresponding coding block. Optionally, the skin color saliency value calculation process can be based on the proportion of detection units included in the corresponding coding block that are skin color units.
[0038] Step S103: Perform video encoding on the coding block according to the skin color saliency value of the coding block.
[0039] In one embodiment, after determining the skin color saliency value of a coding block, video encoding is performed on the coding block based on the skin color saliency value. Specifically, during the video image encoding process, each coding block is encoded with different video quality levels based on the determined skin color saliency value. A coding scheme requiring more bits is employed for video encoding, as a higher skin color saliency value indicates a more interesting region. A coding scheme requiring a relatively lower bit rate is employed for video encoding, as a lower skin color saliency value indicates a more interesting region.
[0040] It can be seen from the above scheme that by detecting multiple detection units divided in the video image, the skin color detection result of each detection unit is obtained, and the skin color saliency value of the corresponding coding block is determined according to the skin color detection result, wherein a coding block contains multiple detection units, and the video image contains multiple coding blocks. Video encoding is performed on the coding block according to the skin color saliency value of the coding block. During the video encoding process, the skin color detection result of each coding block is determined by setting the coding block and utilizing the included detection units, and then encoding of different video areas is achieved based on the coding block, which solves the problems of low accuracy and poor flexibility in detecting the area of interest in related technologies, optimizes the skin color detection mechanism, improves the flexibility of skin color detection, and enhances the video encoding effect.
[0041] Figure 2 A flowchart of a specific method for dividing a video image and performing detection unit identification is provided in an embodiment of the present application, such as Figure 2 As shown, specifically including:
[0042] Step S201: Determine whether the input video image is an image in a preset format, and in response to the determination result that the video image is an image in a preset format, obtain size parameters of the video image.
[0043] In one embodiment, the preset format image may be a YUV format video image. If a non-YUV format video image, such as an RGB format video image, is identified, it is converted to a YUV format video image. If the video image is a YUV format video image, in response to the determination that the video image is a preset format image, a size parameter of the video image is obtained. The size parameter may be the height and width of the video image, such as H and W, respectively.
[0044] Step S202: Divide the video image into multiple detection units according to the size parameter and the preset detection unit size, detect each of the detection units using a skin color detection model, and obtain a skin color detection result for each of the detection units.
[0045] The preset detection unit size can be a 4*4 or 8*8 image size. Specifically, a single video frame is divided into multiple small detection units. When skin color recognition is performed on the detection units, a skin color detection model is used to detect each detection unit and output a corresponding detection result. The specific skin color detection model used is not limited; examples include a modeled Gaussian model, an elliptical model, and the like.
[0046] Step S203: determining a skin color saliency value of a corresponding coding block according to the skin color detection result, wherein the coding block includes a plurality of the detection units, and the video image includes a plurality of coding blocks.
[0047] Step S204: Perform video encoding on the coding block according to the skin color saliency value of the coding block.
[0048] From the above, it can be seen that whether the input video image is a preset format image is determined, and in response to the judgment result that the video image is a preset format image, the size parameters of the video image are obtained, and the video image is divided according to the size parameters and the preset detection unit size to obtain multiple detection units. Each detection unit is detected by the skin color detection model, which can realize the division and identification of detection units for video images in the set mode. The use of the skin color detection model is more efficient. At the same time, for images that are not in the preset format, the image format is converted, thereby improving the applicability of the solution.
[0049] In one possible embodiment, different granularity coding schemes can be implemented by setting different coding sizes of coding blocks, which is more flexible. Specifically, the skin color saliency value of the corresponding coding block is determined according to the skin color detection result, including: obtaining the coding size of the coding block, determining the corresponding multiple detection units according to the coding size, and determining the skin color saliency value of the coding block according to the skin color detection result of each detection unit in the multiple detection units. Exemplarily, the coding size and the size of the detection unit can be a square size with a fixed length and width. The specific size parameter of the coding block can be the side length of the square (denoted as L). The exemplary size of the detection unit is 8*8. The multiple detection units corresponding to each coding block can be obtained by dividing the area of the square (L2) by the area of the detection unit (8*8). Further, the skin color saliency value of the coding block is subsequently determined according to the skin color detection result of each detection unit in the multiple detection units.
[0050] Figure 3 A flowchart of a method for determining a skin color saliency value of a coding block according to a skin color detection result of each detection unit in a plurality of detection units is provided in an embodiment of the present application. Figure 3 As shown, specifically including:
[0051] Step S301: Detect multiple detection units divided in a video image to obtain a skin color detection result of each detection unit.
[0052] Step S302: Obtain the coding size of the coding block, determine the corresponding multiple detection units according to the coding size, and count the detection units whose skin color detection results are skin color identifications among the multiple detection units corresponding to the coding block to obtain a skin color unit ratio.
[0053] In one embodiment, the skin color detection result includes a skin color identifier. That is, for each detection unit, whether it is skin color is recorded. Detection units identified as skin color blocks are marked with a skin color identifier, and detection units identified as non-skin color blocks are marked with a non-skin color identifier, or are not marked.
[0054] Optionally, the specific recording form can be a matrix corresponding to the generation and detection units. For example, if the size of a frame of video image is H*W and the size of the detection unit is 8*8, it is divided into The detection unit stores the skin color detection results through the two-dimensional matrix XY, and the coordinates are divided by the XY axis. The X-axis subscript range Y-axis subscript range The values of the X-axis and Y-axis locate a detection unit, and the skin color detection results of the detection unit are stored accordingly. For example, 0 represents a skin color mark, which is identified as a skin color block; 1 represents a non-skin color mark, which is identified as a non-skin color block.
[0055] Step S303: Calculate the skin color saliency value of the coding block according to the skin color unit ratio and the set skin color block threshold and non-skin color block threshold.
[0056] In one embodiment, when calculating the skin color saliency value of the coding block, a further optimization is to calculate the skin color saliency value of the coding block according to the skin color unit ratio and the set skin color block threshold and non-skin color block threshold. For example, the skin color block threshold is denoted as T skin , the non-skin block threshold is recorded as T non-skin Among them, the skin color block threshold T skin The value of is 18, and the non-skin block threshold T non-skin The value is 1.
[0057] Specifically, the process of determining the skin color saliency value of the coding block may be: selecting the maximum value of the product of the skin color unit ratio and the skin color block threshold and the non-skin color block threshold as the skin color saliency value of the coding block. For example, in a coding block containing M detection units, the skin color unit in the recognition result is recorded as N, and the skin color unit ratio is recorded as N / M. The skin color saliency value calculation result of the coding block is max(T skin *N / M,T non-skin ).
[0058] Step S304: Perform video encoding on the coding block according to the skin color saliency value of the coding block.
[0059] From the above, it can be seen that code control is achieved by performing video encoding of the video image by determining the skin color saliency value of the coding block. When calculating the skin color saliency value, the maximum value of the product of the skin color unit ratio and the skin color block threshold and the non-skin color block threshold is selected as the skin color saliency value of the coding block. For each coding block, dynamic adjustment of the video image coding scheme is achieved by counting the ratio of skin color units, rather than using the same video image coding method for code control as long as there are skin color units, thereby further improving the subjective image quality of the video.
[0060] Figure 4 A flowchart of a method for performing video encoding on a coding block according to the skin color saliency value of the coding block is provided in an embodiment of the present application. Figure 4 As shown, specifically including:
[0061] Step S401: Detect multiple detection units divided in a video image to obtain a skin color detection result of each detection unit.
[0062] Step S402: Determine a skin color saliency value of a corresponding coding block according to the skin color detection result, wherein the coding block includes a plurality of detection units, and the video image includes a plurality of coding blocks.
[0063] Step S403: Determine a quantization parameter of the coding block according to the skin color saliency value of the coding block, and perform video encoding on the coding block according to the quantization parameter.
[0064] In one embodiment, when different encoding methods are implemented based on different skin color saliency values, different quantization parameters are determined based on the skin color saliency values of the coding block. Exemplarily, this quantization parameter is the QP value in video coding, which is used in image and video compression and is an important parameter for controlling video compression quality. The specific calculation relationship is not limited in this solution. The relationship between the two is defined as follows: higher skin color saliency values correspond to lower quantization parameters, and the number of bits required for video encoding increases. Alternatively, different skin color saliency values can be directly defined to correspond to specific QP values. Typically, QP values range from a set interval depending on the video coding compression algorithm. A mapping can be performed between these QP intervals and skin color saliency intervals. For example, assuming the skin color saliency range is 1 to 18 and the QP range is 1 to 18, a skin color saliency value of 1 corresponds to a QP value of 18, a skin color saliency value of 2 corresponds to a QP value of 17, a skin color saliency value of 3 corresponds to a QP value of 16, and so on. Of course, the above is only an exemplary way of representing that the higher the skin color saliency value, the lower the value of the quantitative parameter, and is not limited to other calculation methods.
[0065] In another embodiment, when the skin color saliency value is less than a certain threshold, the QP value is not increased. That is, when the skin color saliency value is less than a certain threshold, the QP value is kept at a relatively large fixed value to avoid excessive differences in video quality.
[0066] As can be seen from the above, the quantization parameter of the coding block is determined according to the skin color saliency value of the coding block, wherein the higher the skin color saliency value, the lower the value of the quantization parameter. The coding block is then video encoded according to the quantization parameter, wherein the lower the value of the quantization parameter, the higher the number of bits used for video encoding. This achieves dynamic coding adjustment of the coding block for each coding block to rationally utilize resources and avoid bit rate waste.
[0067] Figure 5 This is a flowchart of another video encoding control method based on skin color detection provided in an embodiment of the present application. Figure 5 As shown, specifically including:
[0068] Step S501: Detect multiple detection units divided in a video image to obtain a skin color detection result of each detection unit.
[0069] Step S502: Determine a skin color saliency value of a corresponding coding block according to the skin color detection result, wherein the coding block includes a plurality of detection units, and the video image includes a plurality of coding blocks.
[0070] Step S503: Generate a skin color saliency map corresponding to the video image according to the skin color saliency value of each coding block in the video image, and perform video encoding on each coding block in the skin color saliency map in sequence.
[0071] In one embodiment, when encoding a video image, a skin color saliency map corresponding to the video image is generated based on the determined skin color saliency values for each coding block in the video image. Optionally, the skin color saliency map is represented as a two-dimensional matrix. Video encoding is then performed sequentially based on each coding block in the skin color saliency map. Specifically, when encoding each video frame with a constant overall bitrate, the skin color saliency map is used to calculate the overall percentage of skin color in the frame. Based on this percentage, the overall bitrate resource occupied by skin color is determined, and the corresponding tilted resource amount is set accordingly. For example, assuming the total size of a frame of video after encoding and compression is denoted as A, if the overall percentage of skin color is 20%, a tilted ratio can be set, such that 50% of the overall bitrate resource is used to encode the skin color area (i.e., the region of interest) that accounts for this 20%, while the remaining 80% of the non-skin color area occupies the remaining 50% of the overall bitrate resource for encoding. Thus, by generating the skin color saliency map, the overall bitrate tilt is determined. Based on the specific skin color saliency values of each coding block, each coding block is sequentially encoded to obtain a compressed image of the final video image for transmission or storage.
[0072] Figure 6This is a structural block diagram of a video encoding control device based on skin color detection provided by an embodiment of the present application. The device is used to execute the video encoding control method based on skin color detection provided by the above embodiment, and has the corresponding functional modules and beneficial effects of the execution method. Figure 6 As shown, the device specifically includes: a skin color detection module 101, a coding block skin color determination module 102 and a video coding module 103, wherein,
[0073] The skin color detection module 101 is configured to detect a plurality of detection units divided in the video image and obtain a skin color detection result of each detection unit;
[0074] a coding block skin color determination module 102 configured to determine a skin color saliency value of a corresponding coding block according to the skin color detection result, wherein the coding block includes a plurality of detection units and the video image includes a plurality of coding blocks;
[0075] The video encoding module 103 is configured to perform video encoding on the encoding block according to the skin color saliency value of the encoding block.
[0076] It can be seen from the above scheme that by detecting multiple detection units divided in the video image, the skin color detection result of each detection unit is obtained, and the skin color saliency value of the corresponding coding block is determined according to the skin color detection result, wherein a coding block contains multiple detection units, and the video image contains multiple coding blocks. The coding block is video-encoded according to the skin color saliency value of the coding block, which solves the problems of low accuracy and poor flexibility in region of interest detection in related technologies, optimizes the skin color detection mechanism, improves the flexibility of skin color detection, and enhances the video encoding effect.
[0077] In a possible embodiment, detecting the multiple detection units divided in the video image includes:
[0078] Determine whether the input video image is an image in a preset format;
[0079] In response to a determination that the video image is an image of a preset format, obtaining a size parameter of the video image, and dividing the video image into a plurality of detection units according to the size parameter and a preset detection unit size;
[0080] Each of the detection units is detected using a skin color detection model.
[0081] In a possible embodiment, determining the skin color saliency value of the corresponding coding block according to the skin color detection result includes:
[0082] Obtaining a coding size of the coding block, and determining a corresponding plurality of detection units according to the coding size;
[0083] The skin color saliency value of the coding block is determined according to the skin color detection result of each detection unit in the multiple detection units.
[0084] In a possible embodiment, the skin color detection result includes a skin color identifier, and the coding block skin color determination module 102 is configured to:
[0085] Counting the detection units whose skin color detection results are skin color marks among the multiple detection units corresponding to the coding block to obtain a proportion of skin color units;
[0086] The skin color saliency value of the coding block is calculated according to the skin color unit ratio and the set skin color block threshold and non-skin color block threshold.
[0087] In a possible embodiment, the coding block skin color determination module 102 is configured to:
[0088] The maximum value of the product of the skin color unit ratio and the skin color block threshold and the non-skin color block threshold is selected as the skin color saliency value of the coding block.
[0089] In a possible embodiment, the video encoding module 103 is configured as follows:
[0090] determining a quantization parameter of the coding block according to a skin color saliency value of the coding block, wherein the higher the skin color saliency value, the lower the value of the quantization parameter;
[0091] Video encoding is performed on the coding block according to the quantization parameter, wherein the lower the value of the quantization parameter is, the higher the number of bits used for video encoding.
[0092] In a possible embodiment, the video encoding module 103 is configured to: generate a skin color saliency map corresponding to the video image according to the skin color saliency value of each encoding block in the video image;
[0093] Video encoding is performed on each coding block in the skin color saliency map in sequence.
[0094] Figure 7 A schematic diagram of the structure of a video encoding control device based on skin color detection provided in an embodiment of the present application is shown as follows: Figure 7 As shown, the device includes a processor 201, a memory 202, an input device 203 and an output device 204; the number of processors 201 in the device can be one or more. Figure 7 In the embodiment, a processor 201 is used as an example; the processor 201, the memory 202, the input device 203 and the output device 204 in the device can be connected by a bus or other means. Figure 7The example of the connection via a bus is taken. The memory 202, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as the program instructions / modules corresponding to the video encoding control method based on skin color detection in the embodiment of the present application. The processor 201 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 202, that is, realizes the above-mentioned video encoding control method based on skin color detection. The input device 203 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the device. The output device 204 may include a display device such as a display screen.
[0095] An embodiment of the present application further provides a storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to perform a video encoding control method based on skin color detection described in the above embodiment, which includes:
[0096] Detecting a plurality of detection units divided in the video image to obtain a skin color detection result of each detection unit;
[0097] determining a skin color saliency value of a corresponding coding block according to the skin color detection result, wherein the coding block includes a plurality of the detection units, and the video image includes a plurality of coding blocks;
[0098] Video encoding is performed on the coding block according to the skin color saliency value of the coding block.
[0099] It is worth noting that in the above-mentioned embodiment of the video encoding control device based on skin color detection, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.
[0100] In some possible implementations, various aspects of the methods provided herein may also be implemented in the form of a program product, which includes program code. When the program product is executed on a computer device, the program code is used to cause the computer device to perform the steps of the methods according to the various exemplary embodiments of the present application described above. For example, the computer device may perform the video encoding control method based on skin color detection described in the embodiments of the present application. The program product may be implemented using any combination of one or more readable media.
Claims
1. A video encoding control method based on skin color detection, characterized in that: include: Detecting a plurality of detection units divided in the video image to obtain a skin color detection result of each detection unit; Determining a skin color saliency value of a corresponding coding block based on the skin color detection result, including: counting detection units whose skin color detection results are skin color identifications among a plurality of detection units corresponding to the coding block to obtain a skin color unit ratio, and selecting a maximum value of the product of the skin color unit ratio and a set skin color block threshold and a set non-skin color block threshold as the skin color saliency value of the coding block, wherein the coding block includes a plurality of the detection units, the video image includes a plurality of coding blocks for video encoding, the skin color saliency value is used to represent a user's interest in the coding block area, and the skin color saliency value has a value range of a set interval range; Video encoding is performed on the coding block according to the skin color saliency value of the coding block, which includes: generating a skin color saliency map corresponding to the video image according to the skin color saliency value of each coding block in the video image, when video encoding is performed for each frame of the video image with a constant total bit rate, calculating the overall proportion of skin color in a frame of the video image through the skin color saliency map, determining the overall bit rate resources occupied by the skin color based on the overall skin color proportion to set a corresponding bit rate tilt ratio, and encoding the skin color area and non-skin color area of the coding block based on the bit rate tilt ratio.
2. The video encoding control method based on skin color detection according to claim 1, characterized in that: The detecting of the plurality of detection units divided in the video image includes: Determine whether the input video image is an image in a preset format; In response to a determination that the video image is an image of a preset format, obtaining a size parameter of the video image, and dividing the video image into a plurality of detection units according to the size parameter and a preset detection unit size; Each of the detection units is detected using a skin color detection model.
3. The video encoding control method based on skin color detection according to claim 1, characterized in that: The determining of the skin color saliency value of the corresponding coding block according to the skin color detection result includes: Obtaining a coding size of the coding block, and determining a corresponding plurality of detection units according to the coding size; The skin color saliency value of the coding block is determined according to the skin color detection result of each detection unit in the multiple detection units.
4. The video encoding control method based on skin color detection according to any one of claims 1 to 3, characterized in that: The performing video encoding on the coding block according to the skin color saliency value of the coding block includes: determining a quantization parameter of the coding block according to a skin color saliency value of the coding block, wherein the higher the skin color saliency value, the lower the value of the quantization parameter; Video encoding is performed on the coding block according to the quantization parameter, wherein the lower the value of the quantization parameter is, the higher the number of bits used for video encoding.
5. A video encoding control device based on skin color detection, characterized in that: include: a skin color detection module configured to detect a plurality of detection units divided in the video image and obtain a skin color detection result of each detection unit; a coding block skin color determination module configured to determine a skin color saliency value of a corresponding coding block based on the skin color detection result, the coding block including a plurality of detection units, the video image including a plurality of coding blocks for video encoding, the skin color saliency value being used to characterize a user's interest in an area of the coding block, the skin color saliency value being within a set interval range, the coding block skin color determination module being specifically configured to count detection units whose skin color detection results are skin color identifications among the plurality of detection units corresponding to the coding block to obtain a percentage of skin color units, and select the maximum of the product of the skin color unit percentage and a set skin color block threshold and a set non-skin color block threshold as the skin color saliency value of the coding block; A video encoding module is configured to perform video encoding on the coding block according to the skin color saliency value of the coding block. The video encoding module is specifically configured to: generate a skin color saliency map corresponding to the video image according to the skin color saliency value of each coding block in the video image; when video encoding is performed for each frame of the video image with a constant total bit rate, calculate the overall proportion of skin color in a frame of the video image through the skin color saliency map; determine the overall bit rate resources occupied by the skin color based on the overall skin color proportion to set a corresponding bit rate tilt ratio; and encode the skin color area and non-skin color area of the coding block based on the bit rate tilt ratio.
6. A video encoding control device based on skin color detection, the device comprising: one or more processors; A storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the video encoding control method based on skin color detection according to any one of claims 1 to 4.
7. A storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, are used to perform the video encoding control method based on skin color detection according to any one of claims 1 to 4.
8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the video encoding control method based on skin color detection according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Video encoding method of vision attention region under low bit rate
CN103079063A
Human skin tone detection in YCbCr space
US20050207643A1