Coding and decoding method, device, equipment, storage medium and computer program
By processing and encoding the area of interest of the screen sharing image, the problem of chroma information loss caused by image format conversion is solved, the clarity and coding efficiency of the image are improved, and a better screen sharing effect is achieved.
Patent Information
- Application Number
- CN202310228694.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2024-09-06
AI Technical Summary
In the prior art, chromaticity information is lost due to image format conversion during screen sharing, resulting in blurred images, blurred text, and loss of details.
By processing the area of interest in the target screen image to improve its contrast and resolution, and encoding the processed area into the code stream, it ensures that the contrast and color saturation of the reconstructed image are improved, thereby solving the image blur problem.
Under the conditions of existing software and hardware equipment, it improves the coding efficiency and clarity of screen images, avoids the increase in additional hardware costs, and ensures the improvement of image quality.
Smart Images

Figure CN118612446A
Abstract
Description
Technical Field
[0001] The present application relates to the field of image compression, and in particular to a coding and decoding method, apparatus, device, storage medium and computer program. Background Art
[0002] Screen sharing is a core function in video conferencing. Screen sharing is usually used to share and display screen contents such as browser windows, applications, presentations (PowerPoint, PPT), documents (Word), tables (Excel), etc., so that members in the video conference can see the same content.
[0003] In the related art, screen sharing is usually achieved by taking screenshots, that is, taking a screenshot of the screen content to be shared to obtain a screen image, encoding the screen image to obtain a code stream, and then transmitting the code stream to a destination end, which receives and decodes the code stream to obtain a reconstructed screen image, and then displays the reconstructed screen image.
[0004] However, the screen image displayed by screen sharing through the above method is prone to poor image quality problems, such as blurred images or blurred text in images containing text content, loss of details, etc. Summary of the invention
[0005] The present application provides a coding and decoding method, apparatus, device, storage medium and computer program, which can solve the problem of poor image quality of screen images displayed by screen sharing in the related art. The technical solution is as follows:
[0006] In a first aspect, a coding method is provided, the method comprising: acquiring a target screen image, the target screen image being obtained by taking a screenshot of screen content during a screen sharing process, determining a region of interest in the target screen image, processing the region of interest so that a contrast of the region of interest after processing is higher than a contrast of the region of interest before processing, and / or a resolution of the region of interest after processing is higher than a resolution of the region of interest before processing, and encoding the processed region of interest into a bitstream.
[0007] By processing the region of interest in the target screen image, the contrast of the processed region of interest is higher than the contrast of the region of interest before processing, and / or the resolution of the processed region of interest is higher than the resolution of the region of interest before processing, and then the processed region of interest is encoded into the bitstream, so that after decoding the bitstream to obtain the reconstructed target screen image, the contrast of the region of interest in the reconstructed target screen image is higher than the contrast of the region of interest before processing, and / or the color saturation of the region of interest after downsampling is higher than the color saturation of the region of interest before downsampling, so that the reconstructed screen image is clearer. In addition, the present application can effectively solve the problem of image blurring caused by the loss of chromaticity information under the conditions of existing software and hardware equipment, that is, without increasing additional hardware costs, the efficiency of encoding screen images is improved.
[0008] Optionally, the target screen image may include text content and / or a natural picture. The text content may be a text picture obtained by taking a screenshot of text, or may be a text block originally existing in the screen content.
[0009] Optionally, the target screen image is in YUV444 format. In practical applications, the screen image obtained by capturing the screen content during screen sharing may also be in RGB format. In this case, the screen image needs to be converted into YUV444 format according to a relevant algorithm to obtain the target screen image.
[0010] Furthermore, the region of interest in the target screen image may be determined through the following steps (1)-(3).
[0011] (1) Determine a candidate region of interest in the target screen image, where the candidate region of interest is a region in the target screen image whose contrast is less than a reference contrast.
[0012] There are multiple implementation methods for determining the candidate regions of interest in the target screen image, two of which are described below.
[0013] In a first implementation, the target screen image is divided into a plurality of image areas, the contrast of each of the plurality of image areas is determined to obtain a plurality of contrasts, and an image area of the plurality of image areas having a contrast less than a reference contrast is determined as a candidate area of interest.
[0014] The second implementation method is to divide the target screen image into multiple image areas, determine the contrast of each of the multiple image areas to obtain multiple contrasts, determine the image areas with contrast less than the reference contrast among the multiple image areas as candidate image areas, and determine the areas containing text in the candidate image areas as candidate interest areas.
[0015] (2) Determine a user interest region in the target screen image, where the user interest region is a region selected by a user participating in the screen sharing process.
[0016] Optionally, an area selected by a user participating in the screen sharing process is received, and the area selected by the user is determined as the user interest area.
[0017] There are many ways for users to select areas to participate in the screen sharing process. Five of these ways are described in detail below.
[0018] The first method: the entire screen. The user can use the entire screen in the screen sharing interface as the user's area of interest. In this case, the user's area of interest is determined to be the entire target screen image.
[0019] The second method: manual selection. The user can manually select an area on the screen sharing interface, and then determine the manually selected area as the user's area of interest. The manually selected area can be smaller than the target screen image or equal to the target screen image.
[0020] The third method: gesture tracking. The user's area of interest can also be determined based on the user's gestures.
[0021] In this case, it is also necessary to use a camera to shoot the user's gesture to obtain a user gesture image, and use the user gesture image as the input of the gesture recognition network model. The gesture recognition network model outputs the direction indicated by the user's gesture, and moves the first position along the direction indicated by the gesture by a reference distance to obtain the first position after the movement. The first position after the movement is used as the center of the circle, and the circular area with the radius as the reference radius is used as the user's interest area. Alternatively, the reference rectangular area with the first position after the movement as the center point is used as the user's interest area.
[0022] The fourth method: following the mouse or laser pen: Based on the position of the mouse or laser pen, the user's area of interest is determined, and the mouse position is the position of the mouse of the user participating in the screen sharing process in the screen sharing interface.
[0023] Furthermore, the circular area with the mouse or laser pen position as the center and the radius as the reference radius can be used as the user interest area. Alternatively, the reference rectangular area with the mouse or laser pen position as the center point can be used as the user interest area.
[0024] It should be noted that if the user's area of interest is determined based on the position of the laser pen, it is necessary to use a camera to shoot the display screen to obtain an image of the laser pen's position on the display screen, and then determine the laser pen's position based on the image of the laser pen's position on the display screen according to relevant algorithms.
[0025] The fifth method: eye tracking. You can also determine the user's area of interest based on the user's eyes.
[0026] In this case, it is necessary to use a camera to capture the user's eyes to obtain a user's eye image, and use the user's eye image as the input of the eye recognition network model. The eye recognition network model outputs the position where the user's eyes are looking, and the position where the user's eyes are looking is determined as the second position, and the second position is used as the center of the circle, and the circular area with the radius as the reference radius is used as the user's interest area. Alternatively, a reference rectangular area with the second position point as the center point is used as the user's interest area.
[0027] (3) Based on the candidate regions of interest and / or the user regions of interest, determine the region of interest in the target screen image.
[0028] Optionally, based on the candidate regions of interest and the user regions of interest in the target screen image, the implementation process of determining the region of interest includes: determining the area of an overlapping area between the user region of interest and the candidate region of interest, and determining the region of interest from the candidate regions of interest based on the area of the overlapping area and the area of the candidate region of interest.
[0029] Optionally, if there is at least one candidate region of interest, for any one of the at least one candidate region of interest, the area of the overlapping region between the user region of interest and the candidate region of interest is determined. In this way, for each candidate region of interest in the at least one candidate region of interest, the area of the overlapping region between the user region of interest and the corresponding candidate region of interest can be determined.
[0030] Further, based on the area of the overlapping area and the area of the candidate area of interest, the implementation process of determining the area of interest from the candidate areas of interest includes: for any one of the at least one candidate area of interest, if the value of the area of the overlapping area divided by the area of the candidate area of interest is greater than or equal to the overlap ratio threshold, then determining the candidate area of interest as the area of interest. Each candidate area of interest in the at least one candidate area of interest is processed in the same manner, and finally all the areas of interest can be determined.
[0031] Of course, in practical applications, the candidate region of interest may also be directly determined as the region of interest in the target screen image. In this case, the overlap ratio threshold may be directly set to 0.
[0032] Optionally, if there is no candidate region of interest, the user region of interest may be determined as the region of interest in the target screen image, or the entire target screen image may be used as the region of interest. Of course, the user region of interest may also be directly determined as the region of interest in the target screen image, or the entire target screen image may be used as the region of interest. In other words, in the absence of a candidate region of interest, the user region of interest or the entire target screen image may be used as the region of interest, or the candidate region of interest may not be determined, and the user region of interest or the entire target screen image may be directly used as the region of interest.
[0033] The region of interest in the target screen image is upsampled so that the resolution of the region of interest after the upsampling is higher than the resolution of the region of interest before the upsampling, and / or the region of interest is color converted so that the contrast of the region of interest after the color conversion is higher than the contrast of the region of interest before the color conversion.
[0034] Furthermore, the process of implementing the color conversion on the region of interest includes: determining a text area in the region of interest, and performing the color conversion on the text area in the region of interest.
[0035] Optionally, the text region in the region of interest may be determined by a text detection network model, that is, the region of interest is used as an input of the text detection network model, and the text detection network model can output the text region in the region of interest based on the region of interest.
[0036] Furthermore, at least one color to be converted in the text area in the region of interest is determined, and based on the at least one color to be converted, a target color corresponding to each of the at least one color to be converted is determined, and at least one color to be converted in the region of interest is replaced with the corresponding target color to achieve color conversion of the text area in the region of interest.
[0037] Optionally, the transmitting end stores a color conversion table, which contains a correspondence between the to-be-converted color and the target color. For any one of the at least one to-be-converted color, the target color corresponding to the to-be-converted color is determined from the color conversion table. Each of the at least one to-be-converted color is processed in the same manner, thereby obtaining the target color corresponding to each of the at least one to-be-converted color.
[0038] If there is no text area, the color conversion can be performed on the entire region of interest. Of course, the text area in the region of interest can also be determined, and the color conversion can be performed directly on the entire region of interest. In other words, the color conversion can be performed on the entire region of interest when there is no text in the region of interest.
[0039] It should be noted that there are four ways to upsample the region of interest and / or perform color conversion on the region of interest. In the first way, only the region of interest is upsampled. In the second way, only the region of interest is color converted. In the third way, the region of interest is first color converted, and then the region of interest after color conversion is upsampled. In the fourth way, the region of interest is first upsampled, and then the region of interest after upsampling is color converted.
[0040] If upsampling is performed during the processing of the region of interest in the target screen image, since the number of pixels in the region of interest after upsampling becomes at least twice as much as before, even if the format of the region of interest after upsampling is converted to YUV420 format, all the chromaticity information in the region of interest is still retained in the processed region of interest, that is, the U and V components of the region of interest after processing are the same as those of the region of interest before processing, thereby solving the above-mentioned problem of loss of image chromaticity information due to the conversion of the image format to YUV420.
[0041] If both the non-interest area and the interest area need to be encoded into the bitstream, in this case, in order to distinguish between two different areas in the target screen image while being compatible with existing software and hardware devices and codec transmission protocols, the encoding of the interest area can optionally be written into a custom field of the bitstream.
[0042] If the processed ROI is upsampled, the number of pixels in the processed ROI is at least four times that of the original one. Accordingly, the encoding bit rate of the processed ROI will also be at least four times higher than that of the original one, which will lead to a decrease in encoding efficiency. Therefore, in order to ensure that the encoding bit rate remains unchanged, when encoding the processed ROI, the QP value can be increased, that is, the quantization accuracy can be reduced, so that the encoding bit rate of the processed ROI is basically consistent with the original one. In this way, the clarity of the target screen image can be effectively improved while ensuring that the encoding bit rate remains unchanged.
[0043] In a second aspect, a decoding method is provided, the method comprising: parsing a region of interest from a bitstream, downsampling the region of interest so that a resolution of the region of interest after downsampling is lower than a resolution of the region of interest before downsampling, and a color saturation of the region of interest after downsampling is higher than a color saturation of the region of interest before downsampling, and reconstructing a target screen image based on the region of interest after downsampling.
[0044] Since the contrast of the processed region of interest is higher than the contrast of the region of interest before processing, and / or the resolution of the processed region of interest is higher than the resolution of the region of interest before processing, the processed region of interest is encoded into the bitstream, so that after decoding the bitstream to obtain the reconstructed target screen image, the contrast of the region of interest in the reconstructed target screen image can be made higher than the contrast of the region of interest before processing, and / or the color saturation of the region of interest after downsampling is higher than the color saturation of the region of interest before downsampling, thereby ensuring that the reconstructed screen image is clearer. In addition, the present application can effectively solve the problem of image blurring caused by the loss of chromaticity information under the conditions of existing software and hardware equipment, that is, without increasing additional hardware costs, improve the efficiency of encoding screen images.
[0045] The encoding side may or may not upsample the region of interest. In the case where the encoding side upsamples the region of interest, the number of pixels of the decoded region of interest is at least four times the number of pixels of the region of interest in the target screen image.
[0046] Optionally, the format of the region of interest is a YUV format. In this case, the implementation process of downsampling the region of interest includes: downsampling the Y component in the region of interest, keeping the U component and the V component in the region of interest unchanged, so as to obtain the downsampled region of interest.
[0047] Optionally, based on the downsampling parameters and according to a relevant algorithm, the Y component in the region of interest may be downsampled, while the U component and the V component in the region of interest remain unchanged.
[0048] It should be noted that the algorithm for downsampling the region of interest corresponds to the algorithm for upsampling used in the encoding process, and the downsampling parameters are consistent with the above-mentioned upsampling parameters.
[0049] The target screen image may be reconstructed based on the non-interest region, the position of the interest region in the target screen image, and the down-sampled interest region.
[0050] Optionally, a region in the non-region of interest that is consistent with the position of the region of interest may be replaced with the region of interest to obtain a reconstructed target screen image.
[0051] It should be noted that the above decoding process can be implemented by the receiving end. However, in actual applications, if the decoding capability of the receiving end is insufficient, the MCU can transcode the code stream into a resolution and format that the receiving end can decode based on the decoding capability of the receiving end. If the resolution that the receiving end can decode is consistent with the resolution of the target screen image, there is no need to downsample the decoded region of interest.
[0052] In a third aspect, a coding device is provided, wherein the coding device has the function of implementing the coding method in the first aspect. The coding device includes at least one module, and the at least one module is used to implement the coding method provided in the first aspect.
[0053] In a fourth aspect, a decoding device is provided, wherein the decoding device has the function of implementing the decoding method in the second aspect. The decoding device comprises at least one module, wherein the at least one module is used to implement the decoding method provided in the second aspect.
[0054] In a fifth aspect, a coding device is provided, the coding device comprising a processor and a memory, the memory being used to store a program for executing the coding method provided in the first aspect. The processor is configured to execute the program stored in the memory to implement the coding method provided in the first aspect.
[0055] Optionally, the encoding device may further include a communication bus, which is used to establish a connection between the processor and the memory.
[0056] In a sixth aspect, a decoding device is provided, the decoding device comprising a processor and a memory, the memory being used to store a program for executing the decoding method provided in the second aspect. The processor is configured to execute the program stored in the memory to implement the decoding method provided in the second aspect.
[0057] Optionally, the decoding device may further include a communication bus, and the communication bus is used to establish a connection between the processor and the memory.
[0058] In the seventh aspect, a computer-readable storage medium is provided, wherein the storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the steps of the encoding method described in the first aspect above, or executes the steps of the decoding method described in the second aspect above.
[0059] In an eighth aspect, a computer program product comprising instructions is provided, and when the instructions are executed on a computer, the computer executes the steps of the encoding method described in the first aspect, or executes the steps of the decoding method described in the second aspect. In other words, a computer program is provided, and when the computer program is executed on a computer, the computer executes the steps of the encoding method described in the first aspect, or executes the steps of the decoding method described in the second aspect.
[0060] In a ninth aspect, a coding and decoding system is provided, the coding and decoding system comprising a coding device and a decoding device, the coding device is used to implement the steps of the coding method described in the first aspect above, and the decoding device is used to implement the steps of the decoding method described in the second aspect above.
[0061] The technical effects obtained in the above-mentioned third to ninth aspects are similar to the technical effects obtained by the corresponding technical means in the first or second aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 This is a flow chart of screen sharing provided by an embodiment of the present application;
[0063] Figure 2 It is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0064] Figure 3 is a schematic diagram of another implementation environment provided by an embodiment of the present application;
[0065] Figure 4 is a structural diagram of a first video module provided in an embodiment of the present application;
[0066] Figure 5 is a structural diagram of a second video module provided in an embodiment of the present application;
[0067] Figure 6 is a flowchart of an encoding method provided in an embodiment of the present application;
[0068] Figure 7 is a schematic diagram of a target screen image provided by an embodiment of the present application;
[0069] Figure 8 is a schematic diagram of a user interest area provided in an embodiment of the present application;
[0070] Fig. 9 This is a flow chart of upsampling provided in an embodiment of the present application;
[0071] Fig.10 This is a flow chart of color conversion provided by an embodiment of the present application;
[0072] Fig.11 is a flowchart of a decoding method provided in an embodiment of the present application;
[0073] Fig.12 is a flowchart of another decoding method provided in an embodiment of the present application;
[0074] Fig.13 is a flowchart of a coding and decoding method provided in an embodiment of the present application;
[0075] Fig.14 is a schematic diagram of the structure of an encoding device provided in an embodiment of the present application;
[0076] Fig.15 It is a structural diagram of a decoding device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0077] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0078] For ease of understanding, before explaining in detail the encoding and decoding method provided in the embodiment of the present application, the nouns, application scenarios and implementation environment involved in the embodiment of the present application are first introduced.
[0079] H.26x encoding: Commonly used video encoding formats, such as H.264 / H.265, are block-oriented, motion compensation-based video encoding standards.
[0080] QP value: quantization parameter, which reflects the compression of spatial details of the image. The smaller the QP value, the higher the quantization accuracy. When the resolution and frame rate remain unchanged, the image quality is higher and the bit rate is higher.
[0081] Multipoint control unit (MCU): also known as multipoint controller, is the key equipment of multipoint video conferencing system. The function of MCU is equivalent to the "switch" of video conferencing system. It can extract audio, video, data and other information and signaling from the information flow of each conference site after synchronous separation, and then send the information and signaling of each conference site to the same processing module to complete the corresponding audio mixing or switching, video mixing or switching, data broadcasting and routing selection, timing and conference control, and finally reassemble the various information required by each conference site and send it to the corresponding terminal system equipment. That is, MCU can be responsible for the access of all video conferencing terminals and the exchange, forwarding and processing of conference audio and video code streams.
[0082] RGB format: RGB is a commonly used image format. R stands for red, G stands for green, and B stands for blue. These three colors can be superimposed in different amounts to display rich colors. For example, in the 8-bit RGB format, (0, 0, 0) represents black, and (255, 255, 255) represents white.
[0083] YUV format: YUV is a commonly used image format. The "Y" in YUV stands for luminance (Luminance or Luma), that is, the grayscale value; "U" and "V" stand for chrominance (Chrominance or Chroma), which are used to specify the color of a pixel and describe the color and saturation. The higher the UV value, the more saturated the color of the pixel. YUV usually refers to YCbCr. In YCbCr, Y refers to the brightness component, Cb refers to the blue chroma component, and Cr refers to the red chroma component. For example, the YUV in the H.264 encoding standard refers to YCbCr, that is, the U in YUV is equivalent to Cb, and the term V is equivalent to Cr.
[0084] Since the human eye is more sensitive to Y than U and V, in order to reduce bandwidth, more brightness information can be saved in image encoding and less chrominance information can be saved. That is, by reducing the sampling rate of U and V, the chrominance information that the human eye is relatively insensitive to can be compressed and sampled, so that a relatively small image file can be obtained for transmission and display without significantly reducing the image quality. Common YUV formats include YUV444, YUV422, and YUV420. Among them, YUV444 represents full sampling, that is, 4 Y, 4 U, and 4 V values are sampled for every 4 points. YUV422 represents 2:1 horizontal sampling and vertical full sampling, that is, 4 Y, 2 U, and 2 V values are sampled for every 4 points. YUV420 represents 2:1 horizontal sampling and 2:1 vertical sampling, and every 4 Ys share a pair of UVs, that is, 4 Y, 1 U, and 1 V values are sampled for every 4 points.
[0085] It should be noted that in the embodiment of the present application, the YUV format is referred to as a brightness color saturation format, wherein the Y component is referred to as a brightness component, UV is collectively referred to as color saturation, and the U component and the V component are collectively referred to as chroma components.
[0086] 1080P: 1080P can also be called 1080P resolution. 1080P means two million pixels, and the commonly used resolution format is 1920*1080.
[0087] 4K: 4K can also be called 4K resolution. 4K resolution exceeds 8 million pixels, which is 4 times that of 1080P. The commonly used resolution format is 3840*2160.
[0088] Image upsampling: Image enlargement, changing the image from low resolution to high resolution. For an image with a resolution of A*B, the image is upsampled by X times, that is, an image with a resolution of (XA)*(XB) is obtained.
[0089] Image downsampling: Image reduction, changing the image from high resolution to low resolution. For an image with a resolution of A*B, the image is downsampled by x times, that is, an image with a resolution of (A / x)*(B / x) is obtained.
[0090] Screen sharing is a core function in video conferencing. Screen sharing is usually used to share screen content such as browser windows, applications, PPTs, documents, and tables, so that members of the video conference can see the same content.
[0091] In related technologies, screen sharing is usually achieved by taking screenshots. Figure 1 , take a screenshot of the screen content to be shared to obtain a screen image, encode the screen image to obtain a code stream, and then transmit the code stream to the destination end, the destination end receives and decodes the code stream to obtain a reconstructed screen image, and then displays the reconstructed screen image.
[0092] However, since the screen image format is usually RGB format or YUV444 format, but most of the existing hardware devices only support YUV420 format encoding, decoding and transmission, therefore, before encoding the screen image, the screen image format needs to be converted to YUV420 format. After converting the YUV444 / RGB format to YUV420, the sampling of the U and V components becomes one-fourth of the original, resulting in the loss of chromaticity information. In this case, if the contrast corresponding to the Y component is low, the boundaries of different colors will be blurred and difficult to distinguish, thereby reducing the image quality. For example, in a screen image containing text content, if the contrast corresponding to the Y component is low, and the sampling of the U and V components becomes one-fourth of the original, this will make it difficult to distinguish between text pixels and background pixels, making the text blurred and details lost.
[0093] In recent years, screen content videos including computer-generated text, graphics, and animations have become popular. The screen content video exhibits colors and other signal characteristics that are different from natural videos. In order to meet the needs of efficient encoding of screen content videos, many screen content coding (SCC) tools have been specially developed, and great progress has been made in coding efficiency. Among them, high efficiency video coding (HEVC) SCC is a coding standard that includes SCC functions. HEVC SCC includes coding tools such as IntraBlock Copy (IBC) and palette, which can improve the compression efficiency of screen content by 30% to 40%.
[0094] However, the current mainstream video conferencing terminals all use the YUV420 format to encode, decode and transmit images. Most of them support H.264 or H.265 encoding in hardware, but do not support SCC encoding. Moreover, before SCC encoding, the screen image still needs to be converted to the YUV420 format, which cannot solve the problem of image blur caused by the loss of chromaticity information after converting the YUV444 / RGB format to YUV420. In addition, for screen images that contain both text content and natural images, if the text content and natural images in the screen image are encoded in the same way, it cannot be guaranteed that both the text content and the natural image can achieve good encoding effects. Based on this, the embodiment of the present application provides a coding method, which can process the region of interest in the target screen image, so that the contrast of the region of interest after processing is higher than the contrast of the region of interest before processing, and / or the resolution of the region of interest after processing is higher than the resolution of the region of interest before processing, and then the processed region of interest is encoded into the bitstream, so that after decoding the bitstream to obtain the reconstructed target screen image, the contrast of the region of interest in the reconstructed target screen image is higher than the contrast of the region of interest before processing, and / or the color saturation of the region of interest after downsampling is higher than the color saturation of the region of interest before downsampling, so that the reconstructed screen image is clearer. In addition, the coding method provided by the embodiment of the present application can effectively solve the problem of image blurring caused by the loss of chromaticity information under the conditions of existing software and hardware equipment, that is, without increasing additional hardware costs, improve the efficiency of encoding screen images.
[0095] Next, the implementation environment involved in the embodiments of the present application is introduced.
[0096] Please refer to Figure 2 , Figure 2is a schematic diagram of an implementation environment provided by an embodiment of the present application. The implementation environment includes a source device 10, a destination device 20, a link 30, and a storage device 40. Among them, the source device 10 can generate an encoded video, that is, a code stream. Therefore, the source device 10 can also be called an encoding device. The destination device 20 can decode the code stream generated by the source device 10. Therefore, the destination device 20 can also be called a decoding device. The link 30 can receive the encoded video generated by the source device 10, and can transmit the encoded video to the destination device 20. The storage device 40 can receive the encoded video generated by the source device 10, and can store the encoded video. Under such conditions, the destination device 20 can directly obtain the encoded video from the storage device 40. Alternatively, the storage device 40 can correspond to a file server or another intermediate storage device that can store the encoded video generated by the source device 10. Under such conditions, the destination device 20 can stream or download the encoded video stored in the storage device 40.
[0097] The source device 10 and the destination device 20 may each include one or more processors and a memory coupled to the one or more processors, the memory may include random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, any other medium that can be used to store desired program code in the form of instructions or data structures that can be accessed by a computer, etc. For example, the source device 10 and the destination device 20 may each include a mobile phone, a smart phone, a personal digital assistant (PDA), a wearable device, a pocket PC (PPC), a tablet computer, a smart car, a smart TV, a smart speaker, a desktop computer, a mobile computing device, a notebook (e.g., laptop) computer, a tablet computer, a set-top box, a telephone handset such as a so-called "smart" phone, a television, a camera, a display device, a digital media player, a video game console, a car computer, or the like.
[0098] The link 30 may include one or more media or devices capable of transmitting the encoded video from the source device 10 to the destination device 20. In one possible implementation, the link 30 may include one or more communication media that enable the source device 10 to send the encoded video directly to the destination device 20 in real time. In an embodiment of the present application, the source device 10 may modulate the encoded video based on a communication standard, which may be a wireless communication protocol, etc., and may send the modulated video to the destination device 20. The one or more communication media may include wireless and / or wired communication media, for example, the one or more communication media may include a radio frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, which may be a local area network, a wide area network, or a global network (e.g., the Internet), etc. The one or more communication media may include routers, switches, base stations, or other devices that facilitate communication from the source device 10 to the destination device 20, etc., and the embodiment of the present application does not specifically limit this.
[0099] In a possible implementation, the storage device 40 may store the received encoded video sent by the source device 10, and the destination device 20 may directly obtain the encoded video from the storage device 40. Under such conditions, the storage device 40 may include any of a variety of distributed or locally accessible data storage media, for example, any of the multiple distributed or locally accessible data storage media may be a hard disk drive, a Blu-ray disc, a digital versatile disc (DVD), a compact disc read-only memory (CD-ROM), a flash memory, a volatile or non-volatile memory, or any other suitable digital storage medium for storing code streams.
[0100] In one possible implementation, the storage device 40 may correspond to a file server or another intermediate storage device that can store the code stream generated by the source device 10, and the destination device 20 may stream or download the image stored in the storage device 40. The file server may be any type of server that can store the encoded video and send the encoded video to the destination device 20. In one possible implementation, the file server may include a network server, a file transfer protocol (FTP) server, a network attached storage (NAS) device, or a local disk drive, etc. The destination device 20 may obtain the encoded image through any standard data connection (including an Internet connection). Any standard data connection may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a digital subscriber line (DSL), a cable modem, etc.), or a combination of the two suitable for obtaining the encoded video stored on the file server. The transmission of the encoded video from the storage device 40 may be streaming transmission, download transmission, or a combination of the two.
[0101] Figure 2 The implementation environment shown is only one possible implementation method, and the technology of the embodiment of the present application can be applied not only to Figure 2 The source device 10 that can encode images and the destination device 20 that can decode encoded videos can also be applied to other devices that can encode videos and decode bitstreams, and the embodiments of the present application do not specifically limit this.
[0102] exist Figure 2 In the illustrated implementation, source device 10 includes data source 120, encoder 100, and output interface 140. In some embodiments, output interface 140 may include a modulator / demodulator (modem) and / or a transmitter, where the transmitter may also be referred to as a transmitter. Data source 120 may include a video capture device (e.g., a camera, etc.), an archive containing previously captured video, a feed interface for receiving video from a video content provider, and / or a computer graphics system for generating video, or a combination of these sources of video.
[0103] The data source 120 may send a video to the encoder 100, and the encoder 100 may encode the video received from the data source 120 to obtain an encoded video. The encoder may send the encoded video to the output interface. In some embodiments, the source device 10 directly sends the encoded video to the destination device 20 via the output interface 140. In other embodiments, the encoded video may also be stored on the storage device 40 for the destination device 20 to obtain and use for decoding and / or display later.
[0104] exist Figure 2 In the illustrated implementation environment, the destination device 20 includes an input interface 240, a decoder 200, and a display device 220. In some embodiments, the input interface 240 includes a receiver and / or a modem. The input interface 240 may receive the encoded video via the link 30 and / or from the storage device 40, and then send it to the decoder 200. The decoder 200 may decode the received encoded video to obtain a decoded video. The decoder may send the decoded video to the display device 220. The display device 220 may be integrated with the destination device 20 or may be external to the destination device 20. In general, the display device 220 displays the decoded video. The display device 220 may be any of a variety of types of display devices, for example, the display device 220 may be a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or other types of display devices.
[0105] although Figure 2 1 and 2. Although not shown in the drawings, in some aspects, encoder 100 and decoder 200 may be integrated with an encoder and decoder, respectively, and may include appropriate multiplexer-demultiplexer (MUX-DEMUX) units or other hardware and software for encoding both audio and video in a common data stream or in separate data streams. In some embodiments, if applicable, the MUX-DEMUX units may conform to the ITU H.223 multiplexer protocol, or other protocols such as the user datagram protocol (UDP).
[0106] The encoder 100 and the decoder 200 may each be any of the following circuits: one or more microprocessors, digital signal processors (digital signal processing, DSP), application specific integrated circuits (application specific integrated circuits, ASIC), field programmable gate arrays (field-programmable gate array, FPGA), discrete logic, hardware or any combination thereof. If the technology of the embodiment of the present application is partially implemented in software, the device may store instructions for the software in a suitable non-volatile computer-readable storage medium, and may use one or more processors to execute the instructions in hardware to implement the technology of the embodiment of the present application. Any of the foregoing contents (including hardware, software, a combination of hardware and software, etc.) may be regarded as one or more processors. Each of the encoder 100 and the decoder 200 may be included in one or more encoders or decoders, and any of the encoders or decoders may be integrated as part of a combined encoder / decoder (encoder-decoder) in a corresponding device.
[0107] The embodiments of the present application may generally refer to encoder 100 as "signaling" or "sending" certain information to another device, such as decoder 200. The term "signaling" or "sending" may generally refer to the transmission of syntax elements and / or other data used to decode the compressed video. This transmission may occur in real time or near real time. Alternatively, this communication may occur over a period of time, such as when the syntax elements are stored in the encoded bitstream to a computer-readable storage medium at the time of encoding, and the decoding device may then retrieve the syntax elements at any time after the syntax elements are stored to this medium.
[0108] Figure 3 : is a schematic diagram of another implementation environment provided by an embodiment of the present application, the implementation environment includes a sending end, a receiving end and an MCU, the sending end includes a first control module, a first video module, a first display module and a first network module, and the receiving end includes a second control module, a second video module, a second display module and a second network module. Among them, the first control module is connected to the first display module, and the second control module is connected to the second display module.
[0109] The local conference terminal (i.e., the transmitting end) can take a screenshot of the screen content to be shared through the first video module to obtain the target screen image, and then encode the target screen image to obtain the first code stream. The first video module sends the first code stream to the MCU through the first network module. The MCU sends the first code stream to the receiving end. After the second network module of the receiving end receives the first code stream, it sends the first code stream to the second video module. The second video module can parse the first code stream to obtain a reconstructed screen image, and send the reconstructed screen image to the second control module. The second control module controls the second display module to display the reconstructed screen image.
[0110] The MCU is mainly used for real-time synchronous interactive communication between the sending end and the receiving end. In some embodiments, if the decoding capability of the receiving end is insufficient, the MCU can also transcode the code stream into a format that the receiving end can decode based on the decoding capability of the receiving end.
[0111] Optionally, the transmitting end further includes a first audio module, which can be connected to a microphone, and the receiving end further includes a second audio module, which can be connected to a speaker. In this case, the microphone of the transmitting end can process the collected sound through the first audio module to obtain an audio file, and then send the audio file to the MCU through the first network module, the MCU receives the audio file, and sends the audio file to the second network module of the receiving end, the second network module sends the audio file to the second audio module, the second audio module receives the audio file, and controls the speaker to play the audio file.
[0112] Optionally, the first control module of the transmitting end can also be connected to a camera, which is used to shoot the users participating in screen sharing at the transmitting end. In this case, the camera of the transmitting end can send the captured picture to the first control module, which receives the captured picture and sends the captured picture to the first video module, which receives the captured picture and encodes the captured picture to obtain a second code stream, which is sent to the MCU through the first network module. The MCU sends the second code stream to the receiving end, and the second network module of the receiving end receives the second code stream and sends the second code stream to the second video module, which parses the second code stream to obtain the reconstructed captured picture, and then sends the reconstructed captured picture to the second control module, and the second control module controls the second display module to display the reconstructed captured picture. That is to say, when the first control module can also be connected to the camera, when screen sharing is performed, not only the screen content can be shared, but also the user's real-time video can be realized.
[0113] Please refer to Figure 4The first video module includes an image acquisition submodule, an area of interest generation submodule, a first format conversion submodule and an encoding submodule. The screen content to be shared is captured by the image acquisition submodule to obtain a target screen image. The area of interest generation submodule can determine the area of interest in the target screen image, and then the first format conversion submodule can process the area of interest so that the contrast of the area of interest after processing is higher than the contrast of the area of interest before processing, and / or the resolution of the area of interest after processing is higher than the resolution of the area of interest before processing. The encoding submodule can encode the processed area of interest into the first bitstream.
[0114] Optionally, the first video module further includes a first user interest region generation submodule. The first user interest region generation submodule can determine the area selected by the user participating in the screen sharing process, and determine the area as the user interest region. In this case, the interest region generation submodule can determine the interest region based on the user interest region.
[0115] Please refer to Figure 5 The second video module includes a decoding submodule and a second format conversion submodule. The first code stream is parsed by the decoding submodule to obtain a region of interest. The region of interest is downsampled by the second format conversion submodule, so that the resolution of the region of interest after downsampling is lower than the resolution of the region of interest before downsampling, and the color saturation of the region of interest after downsampling is higher than the color saturation of the region of interest before downsampling, and then the target screen image is reconstructed based on the region of interest after downsampling.
[0116] Optionally, the second video module also includes a second user interest region generation submodule. The second user interest region generation submodule can obtain the area selected by the user at the receiving end. In this case, the second user interest region generation submodule can send the area selected by the user to the second network module. The second network module receives the area selected by the user and sends the area selected by the user to the MCU, the MCU sends the area selected by the user to the first network module, the first network module sends the area selected by the user to the first user interest region generation submodule in the first video module, the first user interest region generation submodule receives the area selected by the user and determines the area as the user interest region.
[0117] The above-mentioned sending end and receiving end can be any electronic device with screen sharing function, for example, the electronic device can be a PC (Personal Computer), a mobile phone, a PPC (Pocket PC), a tablet computer, a TV, etc.
[0118] It should be noted that Figure 3 , Figure 4 and Figure 5 The structure of the receiving end and the transmitting end in the embodiment is only an example. In practical applications, the transmitting end can also be used as the receiving end, and the receiving end can also be used as the transmitting end. The embodiments of the present application do not limit this. If the transmitting end can also be used as the receiving end, and the receiving end can also be used as the transmitting end, in this case, the structure of the transmitting end and the receiving end is the same, that is, the transmitting end and the receiving end both include a first control module, a first video module, a first display module, a first network module, a second control module, a second video module, a second display module, and a second network module.
[0119] Figure 6 This is a flowchart of an encoding method provided in an embodiment of the present application. Please refer to Figure 6 , the method comprises the following steps.
[0120] Step 601: Acquire a target screen image, where the target screen image is obtained by taking a screenshot of the screen content during the screen sharing process.
[0121] Optionally, the target screen image may include text content and / or a natural image. The text content may be a text image obtained by taking a screenshot of the text, or may be a text block originally existing in the screen content. For example, please refer to Figure 7 , the target screen image has a text block at the top, a natural picture at the bottom left, and a text picture at the bottom right.
[0122] In some embodiments, the target screen image is in YUV444 format. In practical applications, the screen image obtained by capturing the screen content during screen sharing may also be in RGB format. In this case, the screen image needs to be converted into YUV444 format according to a relevant algorithm to obtain the target screen image.
[0123] It should be noted that the embodiment of the present application does not limit the resolution of the target screen image. For example, the resolution of the target screen image can be 180 progressive scanning (P), 360P, 540P, 720P, and 1080P (i.e., 1920*1080), etc.
[0124] Step 602: Determine a region of interest in the target screen image.
[0125] In some embodiments, the region of interest in the target screen image may be determined through the following steps (1)-(3).
[0126] (1) Determine a candidate region of interest in the target screen image, where the candidate region of interest is a region in the target screen image whose contrast is less than a reference contrast.
[0127] There are multiple implementation methods for determining the candidate regions of interest in the target screen image, two of which are described below.
[0128] In a first implementation, the target screen image is divided into a plurality of image areas, the contrast of each of the plurality of image areas is determined to obtain a plurality of contrasts, and an image area of the plurality of image areas having a contrast less than a reference contrast is determined as a candidate area of interest.
[0129] Optionally, the target screen image is divided into a plurality of image areas according to a division size, and a size of each image area in the plurality of image areas is the division size.
[0130] In some embodiments, the division size includes a horizontal division size and a vertical division size. The target screen image is divided into multiple image areas according to the horizontal division size and the vertical division size. The horizontal size of each image area in the multiple image areas is the horizontal division size, and the vertical size is the vertical division size.
[0131] The division size is set in advance, and the horizontal division size and the vertical division size can be equal or unequal. For example, the horizontal division size and the vertical division size can both be 16, and in this case, it can be understood that the target screen image is divided into multiple 16*16 image areas. In different situations, the division size can also be adjusted according to different needs.
[0132] In some embodiments, the format of the multiple image areas is a YUV format, and the multiple contrasts include the contrast of the Y component. In this case, based on the Y component in the multiple image areas, there are multiple ways to determine the contrast of the Y component of each image area in the multiple image areas. In some embodiments, for any one of the multiple image areas, the maximum value of the Y component and the minimum value of the Y component in the image area are determined, and the difference between the maximum value of the Y component and the minimum value of the Y component is used as the contrast of the Y component of the image area. After each of the multiple image areas is processed in the above manner, the contrast of the Y component of each image area can be determined. Of course, the contrast of the Y component of each image area can also be determined by methods such as the four-neighboring pixel method and the eight-neighboring pixel method, which is not limited in the embodiments of the present application.
[0133] In the case where the multiple contrasts include contrast of the Y component, the reference contrast includes reference contrast of the Y component. In this case, an image region in which the contrast of the Y component is less than the reference contrast of the Y component among the multiple image regions is determined as a candidate region of interest.
[0134] Based on the above description, after converting the YUV444 / RGB format to YUV420, the sampling of the U and V components becomes one-fourth of the original, resulting in the loss of chromaticity information. In this case, if the contrast of the Y component is low, the boundaries of different colors will be blurred and difficult to distinguish, thereby reducing the image quality. Therefore, after the image area in which the contrast of the Y component is less than the reference contrast of the Y component among the multiple image areas is determined as a candidate area of interest, when the area of interest is subsequently determined based on the candidate area of interest, the area with low contrast of the Y component can be processed in a targeted manner to make the reconstructed screen image clearer.
[0135] In some other embodiments, the format of the multiple image regions is a YUV format, the multiple contrasts include a contrast of a Y component and a contrast of a chroma component, and the chroma component includes a U component and / or a V component. In this case, based on the Y component and the chroma component in the multiple image regions, the contrast of the Y component and the contrast of the chroma component of each image region in the multiple image regions are determined.
[0136] The implementation method of determining the contrast of the Y component and the contrast of the chrominance component of each image area among the multiple image areas is similar to the method of determining the contrast of the Y component of each image area among the multiple image areas above. For details, please refer to the corresponding content above, and no further details will be given here.
[0137] In the case where the multiple contrasts include the contrast of the Y component and the contrast of the chroma component, the reference contrast includes the reference contrast of the Y component and the reference contrast of the chroma component. In this case, the image region in which the contrast of the Y component is less than the reference contrast of the Y component and the contrast of the chroma component is less than the reference contrast of the chroma component among the multiple image regions can be determined as a candidate region of interest.
[0138] If the contrast of the Y component is low, the boundaries of different colors will be blurred and difficult to distinguish, thus reducing the image quality. On this basis, if the contrast of the chrominance component is also low, the image quality will be more seriously degraded after the target screen image is converted from the YUV444 / RGB format to the YUV420 format, resulting in a blurred reconstructed screen image. Therefore, after the image area in which the contrast of the Y component is less than the reference contrast of the Y component and the contrast of the chrominance component is less than the reference contrast of the chrominance component in the multiple image areas is determined as a candidate area of interest, it can effectively ensure that the areas with low contrast of the Y component and the chrominance component are subsequently processed in a targeted manner to make the reconstructed screen image clearer.
[0139] The second implementation method is to divide the target screen image into multiple image areas, determine the contrast of each of the multiple image areas to obtain multiple contrasts, determine the image areas with contrast less than the reference contrast among the multiple image areas as candidate image areas, and determine the areas containing text in the candidate image areas as candidate interest areas.
[0140] The implementation process of determining the image area in the multiple image areas whose contrast is less than the reference contrast as the candidate image area is similar to the implementation process of determining the image area in the multiple image areas whose contrast is less than the reference contrast as the candidate area of interest. For details, please refer to the corresponding content above and will not be repeated here.
[0141] In some embodiments, text detection is performed on the candidate image region to obtain at least one text region, and a text region in the at least one text region whose area is greater than a text area threshold is determined as a region in the candidate image region containing text. In other embodiments, text detection may also be performed on the candidate image region to obtain at least one text region, and a text region in the at least one text region whose number of characters is greater than a text number threshold is determined as a region in the candidate image region containing text. Of course, in actual applications, the region containing text may also be determined by other methods, which are not limited in the embodiments of the present application.
[0142] Optionally, the candidate image region may be subjected to text detection by a text detection network model. That is, the candidate image region is used as the input of the text detection network model, and the text detection network model can output the area of the text region or the number of characters in the candidate image region. Of course, the candidate image region may also be subjected to text detection by other methods, which are not limited in the embodiments of the present application.
[0143] (2) Determine a user interest region in the target screen image, where the user interest region is a region selected by a user participating in the screen sharing process.
[0144] In some embodiments, an area selected by a user participating in the screen sharing process is received, and the area selected by the user is determined as the user interest area.
[0145] There are many ways for users to select areas to participate in the screen sharing process. Five of these ways are described in detail below.
[0146] The first method: the entire screen. The user can use the entire screen in the screen sharing interface as the user's area of interest. In this case, the user's area of interest is determined to be the entire target screen image.
[0147] The second method: manual selection. The user can manually select an area in the screen sharing interface, and then determine the manually selected area as the user's area of interest. The manually selected area can be smaller than the target screen image or equal to the target screen image, which is not limited in the embodiments of the present application.
[0148] The third method: gesture tracking. The user's area of interest can also be determined based on the user's gestures.
[0149] In this case, it is also necessary to use a camera to shoot the user's gesture to obtain a user gesture image, and use the user gesture image as the input of the gesture recognition network model. The gesture recognition network model outputs the direction indicated by the user's gesture, and moves the first position along the direction indicated by the gesture by a reference distance to obtain the first position after the movement. The first position after the movement is used as the center of the circle, and the circular area with the radius as the reference radius is used as the user's interest area. Alternatively, the reference rectangular area with the first position after the movement as the center point is used as the user's interest area.
[0150] The fourth method: following the mouse or laser pen: Based on the position of the mouse or laser pen, the user's area of interest is determined, and the mouse position is the position of the mouse of the user participating in the screen sharing process in the screen sharing interface.
[0151] Furthermore, the circular area with the mouse or laser pen position as the center and the radius as the reference radius can be used as the user interest area. Alternatively, the reference rectangular area with the mouse or laser pen position as the center point can be used as the user interest area.
[0152] It should be noted that if the user's area of interest is determined based on the position of the laser pen, it is necessary to use a camera to shoot the display screen to obtain an image of the laser pen's position on the display screen, and then determine the laser pen's position based on the image of the laser pen's position on the display screen according to relevant algorithms.
[0153] The fifth method: eye tracking. You can also determine the user's area of interest based on the user's eyes.
[0154] In this case, it is necessary to use a camera to capture the user's eyes to obtain a user's eye image, and use the user's eye image as the input of the eye recognition network model. The eye recognition network model outputs the position where the user's eyes are looking, and the position where the user's eyes are looking is determined as the second position, and the second position is used as the center of the circle, and the circular area with the radius as the reference radius is used as the user's interest area. Alternatively, a reference rectangular area with the second position point as the center point is used as the user's interest area.
[0155] Of course, in practical applications, the user's area of interest may also be determined by other methods, which is not limited in the embodiments of the present application.
[0156] The first position may be the position of the user's mouse in the screen sharing interface. Of course, the first position may also be set in advance. For example, the first position may be the center point of the screen sharing interface. In different situations, the first position may be adjusted according to different requirements. The reference radius, the reference rectangle and the reference distance are set in advance. For example, the reference radius may be 300 pixels and the reference distance may be 100 pixels. In different situations, the first position may be adjusted according to different requirements.
[0157] It should be noted that the user participating in the screen sharing process can be a user at the receiving end or a user at the sending end. The embodiment of the present application does not limit this. If the user participating in the screen sharing process is a user at the receiving end, the receiving end can send the area selected by the user to the sending end. In this way, the sending end can determine the user's interest area in the target screen image.
[0158] As an example, see Figure 8 If the user's area of interest needs to be determined, the user at the receiving end can click the HD auxiliary stream mode button on the screen sharing interface, and then a variety of ways to determine the user's area of interest can be displayed, such as the entire screen, manual selection, gesture tracking, following the mouse or laser pen, eye tracking, etc. In this case, the user can choose the way to determine the user's area of interest according to their needs. If the user selects the eye tracking mode, the camera located above the display screen can capture the user's eyes to obtain the user's eye image, and then determine the second position based on the user's eye image, and use the second position point as the reference rectangular area with the center point as the user's area of interest.
[0159] (3) Based on the candidate regions of interest and / or the user regions of interest, determine the region of interest in the target screen image.
[0160] In some embodiments, based on the candidate regions of interest and the user regions of interest in the target screen image, the implementation process of determining the region of interest includes: determining the area of the overlapping area between the user region of interest and the candidate region of interest, and determining the region of interest from the candidate regions of interest based on the area of the overlapping area and the area of the candidate region of interest.
[0161] Optionally, if there is at least one candidate region of interest, for any one of the at least one candidate region of interest, the area of the overlapping region between the user region of interest and the candidate region of interest is determined. In this way, for each candidate region of interest in the at least one candidate region of interest, the area of the overlapping region between the user region of interest and the corresponding candidate region of interest can be determined.
[0162] Further, based on the area of the overlapping area and the area of the candidate area of interest, the implementation process of determining the area of interest from the candidate areas of interest includes: for any one of the at least one candidate area of interest, if the value of the area of the overlapping area divided by the area of the candidate area of interest is greater than or equal to the overlap ratio threshold, then determining the candidate area of interest as the area of interest. Each candidate area of interest in the at least one candidate area of interest is processed in the same manner, and finally all the areas of interest can be determined.
[0163] Of course, in practical applications, the candidate region of interest may also be directly determined as the region of interest in the target screen image. In this case, the overlap ratio threshold may be directly set to 0.
[0164] Optionally, if there is no candidate region of interest, the user region of interest may be determined as the region of interest in the target screen image, or the entire target screen image may be used as the region of interest. Of course, the user region of interest may also be directly determined as the region of interest in the target screen image, or the entire target screen image may be used as the region of interest. In other words, in the absence of a candidate region of interest, the user region of interest or the entire target screen image may be used as the region of interest, or the candidate region of interest may not be determined, and the user region of interest or the entire target screen image may be directly used as the region of interest.
[0165] The overlap ratio threshold is set in advance, for example, the overlap ratio threshold can be set to 0.2, and can be adjusted according to different requirements in different situations.
[0166] In some embodiments, a non-interest region may also be determined, that is, the region other than the interest region in the target screen image is determined as the non-interest region.
[0167] Step 603: Process the region of interest in the target screen image so that the contrast of the region of interest after processing is higher than that of the region of interest before processing, and / or the resolution of the region of interest after processing is higher than that of the region of interest before processing.
[0168] The region of interest in the target screen image is upsampled so that the resolution of the region of interest after the upsampling is higher than the resolution of the region of interest before the upsampling, and / or the region of interest is color converted so that the contrast of the region of interest after the color conversion is higher than the contrast of the region of interest before the color conversion.
[0169] In some embodiments, the region of interest may be upsampled based on the upsampling parameters according to a relevant algorithm.
[0170] The algorithm for upsampling the region of interest may be a nearest neighbor interpolation algorithm, a bilinear interpolation algorithm, a bicubic interpolation algorithm, etc., which is not limited in the embodiments of the present application.
[0171] The upsampling parameter is set in advance, and the upsampling parameter is greater than 2, and can be adjusted according to different requirements in different situations. For example, the upsampling parameter can be set to 2, that is, the region of interest is upsampled by 2 times. In this case, if the resolution of the region of interest is 1080P, after 2 times upsampling, the resolution of the region of interest becomes 4K.
[0172] Furthermore, the process of implementing the color conversion on the region of interest includes: determining a text area in the region of interest, and performing the color conversion on the text area in the region of interest.
[0173] Optionally, the text region in the region of interest may be determined by a text detection network model, that is, the region of interest is used as an input of the text detection network model, and the text detection network model can output the text region in the region of interest based on the region of interest.
[0174] Furthermore, at least one color to be converted in the text area in the region of interest is determined, and based on the at least one color to be converted, a target color corresponding to each of the at least one color to be converted is determined, and at least one color to be converted in the region of interest is replaced with the corresponding target color to achieve color conversion of the text area in the region of interest.
[0175] Optionally, the transmitting end stores a color conversion table, which contains a correspondence between the to-be-converted color and the target color. For any one of the at least one to-be-converted color, the target color corresponding to the to-be-converted color is determined from the color conversion table. Each of the at least one to-be-converted color is processed in the same manner, thereby obtaining the target color corresponding to each of the at least one to-be-converted color.
[0176] If there is no text area, the color conversion can be performed on the entire region of interest. Of course, the text area in the region of interest can also be determined, and the color conversion can be performed directly on the entire region of interest. In other words, the color conversion can be performed on the entire region of interest when there is no text in the region of interest.
[0177] The implementation method of color conversion of the entire region of interest is similar to the implementation method of color conversion of the text area in the region of interest. For details, please refer to the corresponding content above, which will not be repeated here.
[0178] For example, the target color corresponding to the blue color RGB (0, 0, 255) / YUV (41, 240, 110) to be converted is the medium blue RGB (0, 0, 205) / YUV (36, 218, 114), and the target color corresponding to the red color RGB (255, 0, 0) / YUV (82, 90, 240) to be converted is the pink RGB (255, 124, 128) / YUV (157, 110, 185).
[0179] It should be noted that there are four ways to upsample the region of interest and / or perform color conversion on the region of interest. In the first way, only the region of interest is upsampled. In the second way, only the region of interest is color converted. In the third way, the region of interest is first color converted, and then the region of interest after color conversion is upsampled. In the fourth way, the region of interest is first upsampled, and then the region of interest after upsampling is color converted.
[0180] Based on the above description, most of the existing hardware devices only support the encoding, decoding and transmission of the YUV420 format. Therefore, before encoding the screen image, the screen image needs to be converted into the YUV420 format. In some embodiments, after upsampling the region of interest and / or performing color conversion on the region of interest, the method further includes: performing format conversion on the region of interest after upsampling and / or color conversion to obtain a processed region of interest, and the format of the processed region of interest is the YUV420 format.
[0181] As another example, see Fig. 9 ,exist Fig. 9 In the example, if the resolution of the region of interest is 1080P and the image format is YUV444, the region of interest is upsampled by a factor of 2 according to the nearest neighbor interpolation algorithm, and then the format of the region of interest after upsampling is converted from YUV444 to YUV420 to obtain the processed region of interest. At this time, the resolution of the processed region of interest is 4K and the image format is YUV420.
[0182] As an example, see Fig.10 ,exist Fig.10 In the process, if the resolution of the region of interest is 1080P and the image format is YUV444, color conversion is performed on the region of interest, and then the format of the region of interest after the color conversion is converted from YUV444 to YUV420 to obtain the processed region of interest. At this time, the resolution of the processed region of interest is 1080P and the image format is YUV420.
[0183] It should be noted that if upsampling is performed during the processing of the region of interest in the target screen image, since the number of pixels in the region of interest after upsampling becomes at least twice the original number, even if the format of the region of interest after upsampling is converted to YUV420 format, all the chromaticity information in the region of interest is still retained in the processed region of interest, that is, the U and V components of the region of interest after processing are the same as those of the region of interest before processing, thereby solving the above-mentioned problem of loss of image chromaticity information due to the conversion of the image format to YUV420.
[0184] Step 604: Encode the processed region of interest into a bitstream.
[0185] In some embodiments, the processed region of interest may be encoded into a bitstream according to a relevant algorithm.
[0186] Optionally, when a non-interest region is determined, the non-interest region may be encoded into a bitstream according to a relevant algorithm.
[0187] If both the non-interested area and the interested area need to be encoded into the bitstream, in this case, in order to distinguish between the two different areas in the target screen image while being compatible with existing hardware and software devices and codec transmission protocols, in some embodiments, the encoding of the interested area can be written into the custom field of the bitstream. For example, taking the H265 encoding protocol as an example, H265 has a user-defined field (SEI) that allows user-defined data to be stored during encoding. Therefore, the encoded content of the area of interest can be written into the user-defined field. In other embodiments, the non-interested area and the interested area can be encoded into different bitstreams, that is, the interested area is encoded into a newly added bitstream.
[0188] Optionally, the position of the region of interest in the target screen image may also be encoded into the bitstream. For example, the position of the region of interest in the target screen image may be the horizontal and vertical coordinates of the upper left corner / lower left corner / upper right corner / lower right corner pixels of the region of interest in the target screen image. Of course, it may also be other coordinates in the region of interest that can determine the position of the region of interest in the target screen image, which is not limited in the embodiments of the present application. During decoding, the region of interest can be restored in the reconstructed image based on the position of the region of interest in the target screen image, thereby improving decoding efficiency.
[0189] It should be noted that if the processed region of interest has been upsampled, the number of pixels in the processed region of interest is at least four times the original number. Correspondingly, the encoding rate of the processed region of interest will also be at least four times higher than the original number, which will result in a decrease in encoding efficiency. Therefore, in order to ensure that the encoding rate remains unchanged, when encoding the processed region of interest, the QP value can be increased, that is, the quantization accuracy is reduced, so that the encoding rate of the processed region of interest is basically consistent with the original one. In this way, the clarity of the target screen image can be effectively improved while ensuring that the encoding rate remains unchanged. For example, when the encoding method provided in the embodiment of the present application is not used, the QP value is 30. After using the encoding method provided in the embodiment of the present application, the QP value can be increased to 43.
[0190] In addition, if the processed region of interest has only undergone color conversion and no upsampling has been performed, the processed region of interest can be directly restored to the corresponding position in the target screen image to obtain the processed target screen image, and then the processed target screen image can be encoded into the bitstream to achieve the encoding of the processed region of interest into the bitstream.
[0191] By processing the region of interest in the target screen image, the contrast of the processed region of interest is higher than the contrast of the region of interest before processing, and / or the resolution of the processed region of interest is higher than the resolution of the region of interest before processing, and then the processed region of interest is encoded into the bitstream, so that after decoding the bitstream to obtain the reconstructed target screen image, the contrast of the region of interest in the reconstructed target screen image is higher than the contrast of the region of interest before processing, and / or the color saturation of the region of interest after downsampling is higher than the color saturation of the region of interest before downsampling, so that the reconstructed screen image is clearer. In addition, the embodiment of the present application can effectively solve the problem of image blurring caused by the loss of chromaticity information under the conditions of existing software and hardware equipment, that is, without increasing additional hardware costs, the efficiency of encoding screen images is improved.
[0192] Fig.11 This is a flowchart of a decoding method provided by an embodiment of the present application. Please refer to Fig.11 , the method comprises the following steps.
[0193] Step 1101: parse the code stream to obtain the region of interest.
[0194] Optionally, when the non-interest region is encoded into a bitstream, the non-interest region may be parsed from the bitstream.
[0195] Optionally, in the case where the position of the region of interest in the target screen image is encoded into a bitstream, the position of the region of interest in the target screen image may be parsed from the bitstream.
[0196] Based on the above description, if only color conversion is performed on the region of interest at the encoding side without upsampling, the bitstream can be directly parsed to obtain a reconstructed target screen image.
[0197] Step 1102: down-sample the region of interest so that the resolution of the region of interest after down-sampling is lower than the resolution of the region of interest before down-sampling, and the color saturation of the region of interest after down-sampling is higher than the color saturation of the region of interest before down-sampling.
[0198] Based on the above description, the encoding side may or may not upsample the ROI. In the case where the encoding side upsamples the ROI, the number of pixels of the decoded ROI is at least four times the number of pixels of the ROI in the target screen image.
[0199] In some embodiments, the format of the region of interest is a YUV format. In this case, the implementation process of downsampling the region of interest includes: downsampling the Y component in the region of interest, keeping the U component and the V component in the region of interest unchanged, to obtain the downsampled region of interest.
[0200] In some embodiments, the Y component in the region of interest may be downsampled based on the downsampling parameters and according to a relevant algorithm, while keeping the U component and the V component in the region of interest unchanged.
[0201] It should be noted that the algorithm for downsampling the region of interest corresponds to the algorithm for upsampling used in the encoding process. The downsampling parameters are consistent with the above-mentioned upsampling parameters. For example, the upsampling parameter is 2, that is, the region of interest is upsampled by 2 times. In this case, the downsampling parameter is also 2, that is, the region of interest is downsampled by 2 times. If the resolution of the region of interest is 4K and the image format is YUV420 format, the Y component in the region of interest is downsampled by 2 times. After keeping the U component and V component in the region of interest unchanged, the resolution of the region of interest becomes 1080P, and the image format is YUV444 format.
[0202] Step 1103: reconstruct the target screen image based on the down-sampled region of interest.
[0203] The target screen image may be reconstructed based on the non-interest region, the position of the interest region in the target screen image, and the down-sampled interest region.
[0204] Optionally, the region in the non-interest region that is consistent with the position of the interest region can be replaced with the interest region to obtain a reconstructed target screen image. Of course, in practical applications, the target screen image can also be reconstructed in other ways. This embodiment of the application does not limit this.
[0205] It should be noted that the above decoding process can be implemented by the receiving end. However, in actual applications, please refer to Fig.12 If the decoding capability of the receiving end is insufficient, the MCU can transcode the code stream into a resolution and format that the receiving end can decode based on the decoding capability of the receiving end. If the resolution that the receiving end can decode is consistent with the resolution of the target screen image, there is no need to downsample the decoded region of interest.
[0206] As an example, if the receiving end can only decode images with a maximum resolution of 1080P and an image format of YUV444, in this case, if the resolution of the area of interest to be decoded is 4K and the image format is YUV420, the MCU can, in accordance with relevant technologies, transcode the bitstream corresponding to the image with a resolution of 4K and an image format of YUV420 into a bitstream corresponding to an image with a resolution of 1080P and an image format of YUV444, and then send the bitstream corresponding to the image with a resolution of 1080P and an image format of YUV444 to the receiving end for decoding.
[0207] As another example, if the receiving end can only decode images with a maximum resolution of 1080P and an image format of YUV420, in this case, if the resolution of the area of interest to be decoded is 4K and the image format is YUV420, the MCU can, in accordance with relevant technologies, transcode the bitstream corresponding to the image with a resolution of 4K and an image format of YUV420 into a bitstream corresponding to an image with a resolution of 1080P and an image format of YUV420, and then send the bitstream corresponding to the image with a resolution of 1080P and an image format of YUV420 to the receiving end for decoding.
[0208] Next, we will combine Fig.13 , the encoding and decoding method provided in the embodiment of the present application is introduced again.
[0209] The transmitting end obtains the target screen image, determines the region of interest in the target screen image, processes the region of interest, and encodes the processed region of interest into the bitstream. The bitstream is sent to the receiving end through the MCU, and the receiving end receives the bitstream, parses the region of interest from the bitstream, downsamples the region of interest, and then reconstructs the target screen image based on the downsampled region of interest and displays the reconstructed target screen image. Optionally, the receiving end determines the user selected region and sends the user selected region to the transmitting end, so that the transmitting end can determine the user region of interest in the target screen image based on the user selected region, and then determine the region of interest based on the user region of interest.
[0210] Since the contrast of the processed region of interest is higher than the contrast of the region of interest before processing, and / or the resolution of the processed region of interest is higher than the resolution of the region of interest before processing, the processed region of interest is encoded into the bitstream, so that after decoding the bitstream to obtain the reconstructed target screen image, the contrast of the region of interest in the reconstructed target screen image can be made higher than the contrast of the region of interest before processing, and / or the color saturation of the region of interest after downsampling is higher than the color saturation of the region of interest before downsampling, thereby ensuring that the reconstructed screen image is clearer. In addition, the present application can effectively solve the problem of image blurring caused by the loss of chromaticity information under the conditions of existing software and hardware equipment, that is, without increasing additional hardware costs, improve the efficiency of encoding screen images.
[0211] Fig.14 is a schematic diagram of the structure of a coding device provided in an embodiment of the present application. The coding device can be implemented by software, hardware or a combination of both to become part or all of the sending end, and the coding device can be Figure 2 The encoder 100 in FIG. Fig.14 The device includes: an acquisition module 1401, a determination module 1402, a processing module 1403 and an encoding module 1404.
[0212] The acquisition module 1401 is used to acquire a target screen image, where the target screen image is obtained by taking a screenshot of the screen content during the screen sharing process.
[0213] The determination module 1402 is used to determine the region of interest in the target screen image.
[0214] The processing module 1403 is used to process the region of interest so that the contrast of the region of interest after processing is higher than that of the region of interest before processing, and / or the resolution of the region of interest after processing is higher than that of the region of interest before processing.
[0215] The encoding module 1404 is used to encode the processed region of interest into a bitstream.
[0216] Optionally, the determining module 1402 is specifically configured to:
[0217] Determine a candidate region of interest in the target screen image, where the candidate region of interest is a region in the target screen image with a contrast ratio less than a reference contrast ratio;
[0218] Determine a user interest region in the target screen image, where the user interest region is a region selected by a user participating in the screen sharing process;
[0219] Based on the candidate regions of interest and / or the user region of interest, a region of interest is determined.
[0220] Optionally, the determining module 1402 is specifically configured to:
[0221] Determine the area of overlap between the user's region of interest and the candidate region of interest;
[0222] Based on the area of the overlapping region and the area of the candidate regions of interest, the region of interest is determined from the candidate regions of interest.
[0223] Optionally, the determining module 1402 is specifically configured to:
[0224] dividing the target screen image into a plurality of image regions;
[0225] determining a contrast ratio of each of the plurality of image regions to obtain a plurality of contrast ratios;
[0226] An image region with a contrast smaller than a reference contrast among the multiple image regions is determined as a candidate region of interest.
[0227] Optionally, the format of the multiple image regions is a brightness color saturation YUV format, the multiple contrasts include a contrast of a Y component, and the reference contrast includes a reference contrast of a Y component;
[0228] The determination module 1402 is specifically used for:
[0229] An image region in which the contrast of the Y component is smaller than the reference contrast of the Y component among the multiple image regions is determined as a candidate region of interest.
[0230] Optionally, the formats of the multiple image regions are brightness color saturation YUV format, the multiple contrasts include contrast of Y component and contrast of chroma component, the reference contrast includes reference contrast of Y component and reference contrast of chroma component, and the chroma component includes U component and / or V component;
[0231] The determination module 1402 is specifically used for:
[0232] An image region in which the contrast of the Y component is smaller than the reference contrast of the Y component and the contrast of the chrominance component is smaller than the reference contrast of the chrominance component among the multiple image regions is determined as a candidate region of interest.
[0233] Optionally, the processing module 1403 is specifically configured to:
[0234] Upsampling the region of interest so that the resolution of the region of interest after upsampling is higher than the resolution of the region of interest before upsampling; and / or
[0235] The color conversion is performed on the region of interest so that the contrast of the region of interest after the color conversion is higher than the contrast of the region of interest before the color conversion.
[0236] Optionally, the processing module 1403 is specifically configured to:
[0237] Determine the text area in the region of interest;
[0238] Perform color conversion on the text area in the region of interest.
[0239] By processing the region of interest in the target screen image, the contrast of the processed region of interest is higher than the contrast of the region of interest before processing, and / or the resolution of the processed region of interest is higher than the resolution of the region of interest before processing, and then the processed region of interest is encoded into the bitstream, so that after decoding the bitstream to obtain the reconstructed target screen image, the contrast of the region of interest in the reconstructed target screen image is higher than the contrast of the region of interest before processing, and / or the color saturation of the region of interest after downsampling is higher than the color saturation of the region of interest before downsampling, so that the reconstructed screen image is clearer. In addition, the embodiment of the present application can effectively solve the problem of image blurring caused by the loss of chromaticity information under the conditions of existing software and hardware equipment, that is, without increasing additional hardware costs, the efficiency of encoding screen images is improved.
[0240] It should be noted that: when the encoding device provided in the above embodiment performs encoding, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the encoding device provided in the above embodiment and the encoding method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0241] Fig.15is a schematic diagram of a decoding device provided in an embodiment of the present application. The decoding device can be implemented by software, hardware or a combination of both to become part or all of the receiving end. Moreover, the decoding device can be Figure 2 Decoder 200 in . Fig.15 The device includes: an analysis module 1501, a down-sampling module 1502 and a reconstruction module 1503.
[0242] The parsing module 1501 is used to parse the bitstream to obtain the region of interest;
[0243] A downsampling module 1502 is used to downsample the region of interest so that the resolution of the region of interest after downsampling is lower than the resolution of the region of interest before downsampling, and the color saturation of the region of interest after downsampling is higher than the color saturation of the region of interest before downsampling;
[0244] The reconstruction module 1503 is used to reconstruct the target screen image based on the down-sampled region of interest.
[0245] Optionally, the format of the region of interest is a brightness color saturation YUV format;
[0246] The down sampling module 1502 is specifically used for:
[0247] The Y component in the region of interest is downsampled, and the U component and the V component in the region of interest are kept unchanged, so as to obtain the downsampled region of interest.
[0248] Since the contrast of the processed region of interest is higher than the contrast of the region of interest before processing, and / or the resolution of the processed region of interest is higher than the resolution of the region of interest before processing, the processed region of interest is encoded into the bitstream, so that after decoding the bitstream to obtain the reconstructed target screen image, the contrast of the region of interest in the reconstructed target screen image can be made higher than the contrast of the region of interest before processing, and / or the color saturation of the region of interest after downsampling is higher than the color saturation of the region of interest before downsampling, thereby ensuring that the reconstructed screen image is clearer. In addition, the present application can effectively solve the problem of image blurring caused by the loss of chromaticity information under the conditions of existing software and hardware equipment, that is, without increasing additional hardware costs, improve the efficiency of encoding screen images.
[0249] It should be noted that: when the decoding device provided in the above embodiment performs decoding, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the decoding device provided in the above embodiment and the decoding method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0250] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiment of the present application may be a non-volatile storage medium, in other words, a non-transient storage medium.
[0251] It should be understood that the "multiple" mentioned herein refers to two or more. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit them to be necessarily different.
[0252] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the target screen image involved in the embodiments of the present application is obtained with full authorization.
[0253] The above-mentioned embodiments are provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A coding method, characterized in that: The method comprises: Acquire a target screen image, where the target screen image is obtained by taking a screenshot of the screen content during the screen sharing process; determining a region of interest in the target screen image; Processing the region of interest so that the contrast of the region of interest after processing is higher than the contrast of the region of interest before processing, and / or the resolution of the region of interest after processing is higher than the resolution of the region of interest before processing; The processed region of interest is encoded into a bitstream.
2. The method according to claim 1, characterized in that The determining the region of interest in the target screen image comprises: Determine a candidate region of interest in the target screen image, the candidate region of interest being a region in the target screen image with a contrast ratio less than a reference contrast ratio; Determine a user interest region in the target screen image, where the user interest region is a region selected by a user participating in the screen sharing process; The region of interest is determined based on the candidate regions of interest and / or the user region of interest.
3. The method according to claim 2, characterized in that The determining the region of interest based on the candidate region of interest and the user region of interest includes: Determine the area of the overlapping region between the user interest region and the candidate interest region; The region of interest is determined from the candidate regions of interest based on the area of the overlapping region and the area of the candidate regions of interest.
4. The method according to claim 2 or 3, characterized in that The determining of the candidate interest region in the target screen image comprises: Dividing the target screen image into a plurality of image areas; determining a contrast ratio of each of the plurality of image regions to obtain a plurality of contrast ratios; An image region among the multiple image regions having a contrast smaller than the reference contrast is determined as the candidate region of interest.
5. The method according to claim 4, characterized in that The formats of the multiple image regions are brightness color saturation YUV format, the multiple contrasts include contrasts of Y components, and the reference contrast includes reference contrast of the Y component; The step of determining an image region among the multiple image regions whose contrast is smaller than the reference contrast as the candidate region of interest comprises: An image region in which the contrast of the Y component is smaller than the reference contrast of the Y component among the multiple image regions is determined as the candidate region of interest.
6. The method according to claim 4, characterized in that The formats of the multiple image regions are brightness color saturation YUV format, the multiple contrasts include contrast of Y component and contrast of chroma component, the reference contrast includes reference contrast of Y component and reference contrast of chroma component, and the chroma component includes U component and / or V component; The step of determining an image region among the multiple image regions whose contrast is smaller than the reference contrast as the candidate region of interest comprises: An image region in which the contrast of the Y component is smaller than the reference contrast of the Y component and the contrast of the chrominance component is smaller than the reference contrast of the chrominance component among the multiple image regions is determined as the candidate region of interest.
7. The method according to any one of claims 1 to 6, characterized in that: The processing of the region of interest includes: Upsampling the region of interest so that the resolution of the region of interest after upsampling is higher than the resolution of the region of interest before upsampling; and / or The region of interest is subjected to color conversion so that the contrast of the region of interest after the color conversion is higher than the contrast of the region of interest before the color conversion.
8. The method according to claim 7, characterized in that The color conversion of the region of interest includes: Determine a text area in the region of interest; Performing color conversion on the text area in the region of interest.
9. A decoding method, characterized in that: The method comprises: Parse the region of interest from the bitstream; Downsampling the region of interest so that a resolution of the region of interest after the downsampling is lower than a resolution of the region of interest before the downsampling, and a color saturation of the region of interest after the downsampling is higher than a color saturation of the region of interest before the downsampling; The target screen image is reconstructed based on the downsampled region of interest.
10. The method according to claim 9, characterized in that The format of the region of interest is brightness color saturation YUV format; The downsampling the region of interest comprises: The Y component in the region of interest is downsampled, and the U component and the V component in the region of interest are kept unchanged, so as to obtain the downsampled region of interest.
11. A coding device, characterized in that: The device comprises: An acquisition module, used to acquire a target screen image, wherein the target screen image is obtained by taking a screenshot of the screen content during the screen sharing process; A determination module, used to determine a region of interest in the target screen image; A processing module, used for processing the region of interest so that the contrast of the region of interest after processing is higher than the contrast of the region of interest before processing, and / or the resolution of the region of interest after processing is higher than the resolution of the region of interest before processing; The encoding module is used to encode the processed region of interest into a bit stream.
12. The device according to claim 11, characterized in that The determination module is specifically used for: Determine a candidate region of interest in the target screen image, the candidate region of interest being a region in the target screen image with a contrast ratio less than a reference contrast ratio; Determine a user interest region in the target screen image, where the user interest region is a region selected by a user participating in the screen sharing process; The region of interest is determined based on the candidate regions of interest and / or the user region of interest.
13. A decoding device, characterized in that: The device comprises: A parsing module, used to parse the code stream to find the region of interest; A downsampling module, configured to downsample the region of interest so that a resolution of the region of interest after downsampling is lower than a resolution of the region of interest before downsampling, and a color saturation of the region of interest after downsampling is higher than a color saturation of the region of interest before downsampling; The reconstruction module is used to reconstruct the target screen image based on the down-sampled region of interest.
14. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 10 are implemented.
15. A coding and decoding system, characterized in that: The encoding and decoding system includes an encoding device and a decoding device, wherein the encoding device is used to implement the steps of any method described in claims 1-8, and the decoding device is used to implement the steps of any method described in claims 9-10.
