Image processing method, device, apparatus and storage medium
By introducing low-pass filtering into regions with high-frequency components in the image and performing image quality enhancement processing on the terminal device, the problems of increased encoding difficulty and image quality degradation caused by sharpening processing are solved, achieving higher encoding efficiency and image quality improvement.
Patent Information
- Application Number
- CN202210103023.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-27
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-01-27
AI Technical Summary
During video processing, sharpening increases the number of high-frequency components, which increases the encoding difficulty of the encoder and reduces the overall image quality, especially when the bit rate is insufficient or the video is complex.
Low-pass filtering is applied to areas in the image that contain high-frequency components. Simultaneously, image quality enhancement processing is performed on the low-pass filtered areas at the terminal device. This process reduces encoding difficulty and improves image quality by canceling out high-frequency components.
It reduces the encoding difficulty of the encoder and improves the overall image quality through image enhancement processing, especially when the bit rate is insufficient or the video scene is complex.
Smart Images

Figure CN116567229B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of video processing, and particularly relate to an image processing method, device, equipment and storage medium. BACKGROUND
[0002] Currently, for some video or image processing processes based on a cloud scenario, the following can be performed: as shown in FIG. 1, a cloud server generates a video, performs video image acquisition, performs sharpening processing on the acquired video image, encodes the processed video image to obtain a code stream of the video image, and further sends the code stream to a terminal device. The terminal device decodes the code stream, and finally displays the video image according to the decoding result. Figure 1
[0003] It should be understood that the essence of the sharpening processing is to compensate the outline of the image, enhance the edge and gray level jump part of the image, and make the image clear. As can be seen, the sharpening processing increases the high frequency component of the image. Under the condition that the encoding code rate is constant, since the high frequency component is increased, the code rate allocated by the encoder to the non-sharpening area of the image is reduced. On the one hand, this leads to a large encoding difficulty of the encoder, and on the other hand, this leads to a decrease in the quality of the entire image. Especially in the case of insufficient code rate, very complex video picture or severe motion, the encoding difficulty is increased and the quality of the picture is decreased more obviously. SUMMARY
[0004] The present application provides an image processing method, device, equipment and storage medium, which can reduce the encoding difficulty on the one hand and improve the quality on the other hand.
[0005] In a first aspect, an image processing method is provided, the method being applied to a cloud server, and the method comprising: determining a first image region and a second image region in a first image frame, the first image region being an image region to which a high frequency component is to be introduced, and the second image region being an image region to be filtered; performing quality enhancement processing on the first image region in the first image frame, and performing low-pass filtering processing on the second image region to obtain a second image frame; encoding the second image frame to obtain a code stream; and outputting the code stream to a terminal device.
[0006] In a second aspect, an image processing method is provided. The method is applied to a terminal device. The method comprises: obtaining a code stream; parsing the code stream to obtain a third image frame; determining a third image region in the third image frame; performing quality enhancement processing on the third image region in the third image frame to obtain a fourth image frame; and displaying the fourth image frame. The third image frame is obtained by performing quality enhancement processing on a first image region in a first image frame and performing low-pass filtering processing on a second image region in the first image frame, and then performing encoding and decoding on the third image frame. The third image region is an image region obtained by performing low-pass filtering processing on the second image region and then performing encoding and decoding on the third image region.
[0007] In a third aspect, an image processing apparatus is provided. The apparatus comprises a determination module, a processing module, an encoding module, and an output module. The determination module is configured to determine a first image region and a second image region in a first image frame. The first image region is an image region to which high frequency components are to be introduced, and the second image region is an image region to be filtered. The processing module is configured to perform quality enhancement processing on the first image region in the first image frame and perform low-pass filtering processing on the second image region to obtain a second image frame. The encoding module is configured to encode the second image frame to obtain a code stream. The output module is configured to output the code stream to a terminal device.
[0008] In a fourth aspect, an image processing apparatus is provided. The apparatus comprises a first obtaining module, a parsing module, a first determining module, a processing module, and a display module. The first obtaining module is configured to obtain a code stream. The parsing module is configured to parse the code stream to obtain a third image frame. The first determining module is configured to determine a third image region in the third image frame. The processing module is configured to perform quality enhancement processing on the third image region in the third image frame to obtain a fourth image frame. The display module is configured to display the fourth image frame. The third image frame is obtained by performing quality enhancement processing on a first image region in a first image frame and performing low-pass filtering processing on a second image region in the first image frame, and then performing encoding and decoding on the third image frame. The third image region is an image region obtained by performing low-pass filtering processing on the second image region and then performing encoding and decoding on the third image region.
[0009] In a fifth aspect, an electronic device is provided. The electronic device comprises a processor and a memory. The memory is configured to store a computer program. The processor is configured to invoke and run the computer program stored in the memory to execute the method in the first aspect, the second aspect, or any implementation manner thereof.
[0010] In a sixth aspect, a computer readable storage medium is provided. The computer readable storage medium is configured to store a computer program. The computer program causes a computer to execute the method in the first aspect, the second aspect, or any implementation manner thereof.
[0011] In a seventh aspect, a computer program product is provided, comprising computer program instructions to cause a computer to perform the method according to the first aspect, the second aspect, or any implementation thereof.
[0012] In an eighth aspect, a computer program is provided, the computer program causing a computer to perform the method according to the first aspect, the second aspect, or any implementation thereof.
[0013] By the technical solution provided in the present application, in the case of introducing high-frequency components into the image, low-pass filtering processing can be used for some regions in the image. Since some high-frequency components can be removed through low-pass filtering processing, these removed high-frequency components can offset the introduced high-frequency components of the image to a certain extent. For the region subjected to low-pass filtering processing, it does not need a high bit rate itself. Therefore, through the above manner, on the one hand, the coding difficulty of the encoder can be reduced, and on the other hand, the terminal device can perform quality enhancement processing on the region subjected to low-pass filtering processing, so that the quality of the entire image can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.
[0015] Figure 1 A flowchart of an image processing process is provided;
[0016] Figure 2 A schematic diagram of a cloud game scenario provided for an embodiment of the present application is provided;
[0017] Figure 3 A flowchart of an image processing method provided for an embodiment of the present application is provided;
[0018] Figure 4 A method flowchart for determining whether the third image region is reasonable provided for an embodiment of the present application is provided;
[0019] Figure 5 A method flowchart for determining whether the third image region is reasonable provided for another embodiment of the present application is provided;
[0020] Figure 6 A flowchart of a video rendering collaboration method provided for an embodiment of the present application is provided;
[0021] Figure 7 A schematic diagram of an image processing device provided for an embodiment of the present application is provided;
[0022] Figure 8Another schematic diagram of an image processing device provided by an embodiment of the present application is shown in FIG. 2.
[0023] Figure 9 FIG. 1 is a schematic block diagram of an electronic device 900 provided by an embodiment of the present application. DETAILED DESCRIPTION
[0024] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or server including a series of steps or units does not necessarily have to include only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product, or device.
[0026] Before introducing the technical solutions of the present application, the related knowledge of the present application will be described as follows:
[0027] Video encoding: a way of converting a file in original video format into another file in a different video format through compression technology. The converted data can be referred to as a code stream.
[0028] Video decoding: a reverse process of video encoding.
[0029] Sharpening: an image processing method that enhances the edges and gray level transitions of an image by compensating for the image's outline, making the image clear. Sharpening is to highlight the edges and outlines of objects in an image, which can improve the contrast between the object and the surrounding background, and thus is also referred to as edge enhancement.
[0030] It should be understood that the present application does not limit the specific sharpening algorithm, for example, an unsharp masking sharpening algorithm can be used.
[0031] Low-pass filtering processing: a signal filtering method, the rule is that low-frequency signals can pass normally, and high-frequency signals exceeding the set threshold are blocked and weakened. Low-pass filtering can have the effect of denoising and blurring, and is one of the most commonly used operations in the field of image processing.
[0032] It should be understood that the present application does not limit the specific low-pass filtering algorithm, for example: a bilateral filtering algorithm can be used.
[0033] It should be noted that in the present application, "rendering" is also referred to as "processing", for example: image rendering can be referred to as image processing.
[0034] The technical problems and inventive concepts to be solved by the present application will be described below:
[0035] As described above, sharpening processing increases the high-frequency components of the image, and under the condition of a certain encoding code rate, the increase in high-frequency components leads to a decrease in the code rate allocated by the encoder to the non-sharpening area of the image. On the one hand, this leads to a greater difficulty in encoding for the encoder, and on the other hand, it leads to a decrease in the quality of the entire image. Especially in the case of insufficient code rate, very complex or intense motion of the video picture, the encoding difficulty increases and the quality decreases are more obvious.
[0036] To solve the above technical problems, the present application proposes that in the case of introducing high-frequency components in the image, low-pass filtering processing can be used for some areas in the image. Since some high-frequency components can be removed by low-pass filtering processing, these removed high-frequency components can offset the introduced high-frequency components in the image to a certain extent. For the areas subjected to low-pass filtering processing, they do not require a high code rate, therefore, by the above-mentioned method, on the one hand, the encoding difficulty of the encoder can be reduced, and on the other hand, for the areas subjected to low-pass filtering processing, the terminal device can perform quality enhancement processing, thereby improving the quality of the entire image.
[0037] It should be understood that the technical solutions of the present application can be applied to cloud gaming scenarios, interactive live streaming, video conferencing, video calls and the like, but are not limited thereto:
[0038] Cloud gaming, also known as gaming on demand, is an online gaming technology based on cloud computing technology. Cloud gaming technology enables thin clients with relatively limited graphics processing and data processing capabilities to run high-quality games. In the cloud gaming scenario, the game is not run on the player's game terminal, but on the cloud server, and the cloud server renders the game scene into a video and audio stream and transmits it to the player's game terminal. The player's game terminal does not need to have powerful graphics processing and data processing capabilities, but only needs to have basic streaming media playback capabilities and the ability to obtain player input instructions and send them to the cloud server.
[0039] Exemplarily, Figure 2 A schematic diagram of a cloud gaming scenario provided by an embodiment of the present application is shown in Figure 2 The cloud server 210 and the player's game terminal 220 can communicate with each other, the cloud server 210 can run a game, collect game video images, encode the collected video images to obtain a code stream of the video images, and further transmit the code stream to the terminal device. The terminal device decodes the code stream and finally displays the video images according to the decoding result.
[0040] Optionally, the cloud server 210 and the player's game terminal 220 can communicate with each other through Long Term Evolution (LTE), New Radio (NR) technology, Wireless Fidelity (Wi-Fi) technology, etc., but are not limited thereto.
[0041] In the cloud gaming scenario, the cloud server refers to a server that runs a game in the cloud and has functions such as video enhancement (pre-processing before encoding) and video encoding, but is not limited thereto.
[0042] The terminal device refers to a device with rich human-computer interaction methods, internet access capability, various operating systems, and strong processing capability. The terminal device can be a smart phone, a living room TV, a tablet computer, a vehicle-mounted terminal, a player's game terminal, such as a handheld game console, etc., but is not limited thereto.
[0043] The technical solution of the present application will be described in detail as follows:
[0044] Figure 3 A flowchart of an image processing method provided by an embodiment of the present application is shown in the figure. The method can be executed by a cloud server and a terminal device, for example, in a cloud gaming scenario, the cloud server can be the cloud server 210 in Figure 2 , and the terminal device can be the player's game terminal 220 in Figure 2The player game terminal 220 in the game server 200, in summary, the application does not limit the execution subject of the image processing method, such as Figure 3 As shown in the method comprises:
[0045] S310: The cloud server determines the first image region and the second image region in the first image frame;
[0046] S320: The cloud server performs quality enhancement processing on the first image region in the first image frame, and performs low-pass filtering processing on the second image region, to obtain a second image frame;
[0047] S330: The cloud server encodes the second image frame to obtain a code stream;
[0048] S340: The cloud server outputs the code stream to a terminal device;
[0049] S350: The terminal device parses the code stream to obtain a third image frame;
[0050] S360: The terminal device determines a third image region in the third image frame, the third image region being an image region that has been subjected to low-pass filtering processing and codec processing on the second image region;
[0051] S370: The terminal device performs quality enhancement processing on the third image region in the third image frame to obtain a fourth image frame;
[0052] S380: The terminal device displays the fourth image frame.
[0053] It should be understood that the first image frame can be any image frame in a target video. The target video can be a cloud game video in a cloud game scenario, or a live video in an interactive live broadcast, or a video in a video conference or a video call, and the application does not limit this.
[0054] Optionally, the first image frame is obtained from a real-time uploaded video sequence, which can be a virtual game video sequence; the first image frame comprises an image frame header, which is used to indicate the coordinates of the first image region and the second image region.
[0055] It should be understood that the first image region is an image region in the first image frame to which a high-frequency component is to be introduced, for example, the first image region is an image region in the first image frame that needs to be sharpened, and the second image region is an image region in the first image frame to be filtered. The first image region and the second image region can constitute the entire image frame, or can not constitute the entire image frame, that is, the regions in the first image frame other than the first image region are all second image regions, or the regions in the first image frame other than the first image region include the second image region and other image regions that do not need to be subjected to image quality enhancement processing and low-pass filtering.
[0056] Exemplarily, in a cloud game scenario, the first image region can be an image region in which a game character in a game image frame is located, and the second image region can be an image region in the game image frame other than the first image region.
[0057] Exemplarily, in a cloud game scenario, the first image region can be an image region in which a game character in a game image frame is located, and the second image region can be an edge region in the game image frame, and the game image frame further includes other image regions in addition to the first image region and the second image region.
[0058] As described above, there is a case that the cloud server can first determine the first image region, and then determine the regions in the first image frame other than the first image region as the second image region. Based on this, in this case, it is crucial to determine the first image region, wherein the cloud server can determine the first image region in the following manner, but is not limited thereto.
[0059] It should be understood that the image region that needs to be subjected to image quality enhancement processing is related to the characteristics of the human visual system, for example: the human eye is more sensitive to image regions carrying text and central image regions. Generally, image regions carrying text can be at least one of the top left corner, the bottom left corner, the top right corner, and the bottom right corner of the entire image frame, and therefore, for the first image frame, at least one of the top left corner region, the bottom right corner region, the top right corner region, the bottom right corner region, and the central region of the image frame can be the image region that needs to be sharpened, that is, these regions are all first image regions. Alternatively, the cloud server can use a text detection method to detect image regions carrying text and determine these image regions as the first image region. Alternatively, the cloud server can use some automatic region-of-interest recognition algorithm to determine the first image region.
[0060] Optionally, the region sizes of the above-mentioned top-left region, bottom-right region, top-right region, bottom-right region, and center region can be negotiated by the cloud server and the terminal device, can be predefined, can be specified by the cloud server, or can be specified by the terminal device, and the present application does not limit this.
[0061] It should be understood that the center region can be represented in the following manner in general:
[0062] (W*α, H*α) - (W*(1-α), H*(1-α))
[0063] wherein W and H are the resolution of the first image frame, and α represents a size parameter of the center region, wherein 0 < α < 0.5.
[0064] Optionally, the present application does not limit the size of the center region, assuming that the center region is represented in the above-mentioned manner, that is, the present application does not limit α.
[0065] Optionally, α can be negotiated by the cloud server and the terminal device, can be predefined, can be specified by the cloud server, or can be specified by the terminal device, and the present application does not limit this.
[0066] Optionally, assuming that the first image region is determined by the region detection module, the region detection module can output the number and coordinates of the first image region after determining the first image region.
[0067] Optionally, the coordinates of the first image region can include the coordinates of the top-left pixel point and the bottom-right pixel point of the first image region, or can include the coordinates of the top-right pixel point and the bottom-left pixel point of the first image region, or can include at least three coordinates: the coordinates of the top-left pixel point, the coordinates of the top-left pixel point, the coordinates of the top-right pixel point, and the coordinates of the bottom-right pixel point of the first image region. In general, the present application does not limit the coordinates of the first image region, as long as it can uniquely determine the first image region.
[0068] Illustratively, assuming that the region detection module determines n first image regions, and the coordinates of each first image region include the coordinates of the top-left pixel point and the bottom-right pixel point of the first image region, the output result of the region detection module is: n, x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4, …, x_i, y_i, x_i+1, y_i+1, …, x_2n-1, y_2n-1, x_2n, y_2n, wherein n is the number of first image regions, and (x_i, y_i) and (x_i+1, y_i+1) represent the coordinates of the top-left pixel point and the bottom-right pixel point of a certain first image region, respectively.
[0069] Optionally, assuming that the cloud server is the first image region determined by the region detection module, then the region detection module can determine the second image region according to the first image region after determining the first image region, and can output the number and coordinates of the second image region.
[0070] Optionally, the coordinates of the second image region can include the coordinates of the top-left pixel point and the bottom-right pixel point of the second image region, or include the coordinates of the top-right pixel point and the bottom-left pixel point of the second image region, or can include at least three coordinates: the coordinates of the top-left pixel point, the coordinates of the top-right pixel point, the coordinates of the bottom-left pixel point, and the coordinates of the bottom-right pixel point of the second image region. In summary, the present application does not limit the coordinates of the second image region, as long as it can uniquely determine the second image region.
[0071] Illustratively, assuming that the region detection module determines n second image regions, and the coordinates of each second image region include the coordinates of the top-left pixel point and the coordinates of the bottom-right pixel point of the second image region, then the output result of the region detection module is: n, x_1, y_1, x_2, y_2, x_3, y_3, x_4, y_4, …, x_i, y_i, x_i+1, y_i+1, …, x_2n-1, y_2n-1, x_2n, y_2n, where n is the number of second image regions, (x_i, y_i) and (x_i+1, y_i+1) represent the coordinates of the top-left pixel point and the coordinates of the bottom-right pixel point of a certain second image region, respectively.
[0072] Optionally, assuming that the cloud server is the first image region determined by the region detection module, then the region detection module can determine the second image region according to the first image region after determining the first image region, and can output the number and coordinates of the first image region, and the number and coordinates of the second image region.
[0073] It should be understood that the coordinate representation of the first image region and the second image region, and the output example of the region detection module can refer to the above, and the present application will not be repeated here.
[0074] It should be understood that for the first image frame, the cloud server can perform quality enhancement processing such as sharpening processing on the first image region in the image frame, and perform low-pass filtering processing on the second image region to obtain the second image frame, that is, if the first image frame includes the first image region and the second image region, the cloud server performs quality enhancement processing and low-pass filtering processing on the first image region and the second image region in the first image frame respectively, and the second image frame can be obtained. If the first image frame includes the first image region, the second image region and other image regions, the cloud server performs quality enhancement processing and low-pass filtering processing on the first image region and the second image region in the first image frame respectively, and does not perform any processing on the other image frames, and the second image frame can be obtained.
[0075] It should be understood that the application does not limit the encoding mode adopted by the encoder in the cloud server. The terminal device also does not limit the analysis mode of the code rate.
[0076] As described above, for the image region in the first image frame which is subjected to low-pass filtering processing and coding, that is, the third image region described above, the terminal device needs to perform quality enhancement processing such as sharpening processing on the third image region in order to improve the quality of the third image region and improve the quality of the entire image. Therefore, the terminal device first needs to identify the third image region in the third image frame, which can be implemented in the following manner, but is not limited thereto:
[0077] In the first implementation manner, the terminal device can use a detection algorithm to detect the third image region. For example, since the code rate of the third image region is relatively low, the terminal device can determine the image region with a code rate lower than a preset code rate in the third image frame as the third image region. The application does not limit the detection algorithm.
[0078] Alternatively, the preset code rate can be negotiated by the cloud server and the terminal device, or can be predefined, or can be specified by the cloud server, or can be specified by the terminal device, and the application does not limit this.
[0079] In the second implementation manner, the cloud server can send the information of the third image region to the terminal device, so that the terminal device identifies the third image region according to the information of the third region information.
[0080] Alternatively, the information of the third image region can include an identifier of the third image region. Alternatively, the information of the third image region includes coordinates of the third image region. Alternatively, the information of the third image region includes a number of regions of the third image region and coordinates of the third image region.
[0081] It should be understood that the identification of the third image region is used to uniquely identify the third image region, which can be an index corresponding to the third image region, but is not limited thereto.
[0082] Optionally, the coordinates of the third image region can include coordinates of a top-left pixel point of the third image region, coordinates of a bottom-right pixel point of the third image region, or coordinates of a top-right pixel point of the third image region, coordinates of a bottom-left pixel point of the third image region, or at least three coordinates of a top-left pixel point of the third image region, a top-right pixel point of the third image region, a bottom-left pixel point of the third image region, and a bottom-right pixel point of the third image region. In summary, the present application does not limit the coordinates of the third image region, as long as it can uniquely determine the third image region.
[0083] Optionally, after determining the third image region, the terminal device can detect whether the third image region is reasonable, which can include the following cases.
[0084] Case one: assuming that the terminal device obtains the information of the third image region, and the information of the third image region includes the coordinates of the third image region, the terminal device detects whether the third image region is reasonable, that is, whether the coordinates of the third image region are reasonable.
[0085] Case two: assuming that the terminal device obtains the information of the third image region, and the information of the third image region includes the number of regions of the third image region and the coordinates of the third image region, the terminal device detects whether the third image region is reasonable, that is, whether the coordinates of the third image region are reasonable and whether the number of regions of the third image region is reasonable.
[0086] It should be noted that the information of the third image region can be used to determine the third image region and / or detect whether the third image region is reasonable.
[0087] Exemplarily, it is assumed that the information of the third image region includes the identification of the third image region, and the identification of the third image region cannot be used to detect whether the third image region is reasonable. Alternatively, even if the information of the third image region includes the coordinates of the third image region, or the information of the third image region includes the number of regions of the third image region and the coordinates of the third image region, the information of the third image region can not be used to detect whether the third image region is reasonable. Alternatively, it is assumed that the information of the third image region includes the coordinates of the third image region, or the information of the third image region includes the number of regions of the third image region and the coordinates of the third image region, and the information of the third image region can be used to detect whether the third image region is reasonable, but the terminal device does not determine the third image region through the information of the third image region. Alternatively, it is assumed that the information of the third image region includes the coordinates of the third image region, or the information of the third image region includes the number of regions of the third image region and the coordinates of the third image region, and the information of the third image region can be used to detect whether the third image region is reasonable, and can also be used to determine the third image region.
[0088] The case one is explained.
[0089] It should be understood that the terminal device detecting whether the coordinates of the third image region are reasonable means that the terminal device detects whether the coordinates of the third image region fall within the range of the third image frame.
[0090] The case two is explained.
[0091] Figure 4 A method flowchart for determining whether the third image region is reasonable is provided for an embodiment of the present application. The method can be executed by a terminal device, which can be a player game terminal 220 in Figure 2 , but is not limited thereto. As shown in Figure 4 , the method includes the following steps.
[0092] S410: Determine the number of coordinates of the third image region according to the number of regions of the third image region.
[0093] S420: Determine whether the third image region is reasonable according to whether the number of coordinates of the third image region is consistent with the actual number of coordinates included in the information of the third image region, and whether the coordinates of the third image region fall within the range of the third image frame.
[0094] Optionally, if the number of coordinates of the third image region is consistent with the number of coordinates actually included in the information of the third image region, and the coordinates of the third image region fall within the range of the third image frame, it is determined that the third image region is reasonable; if the number of coordinates of the third image region is inconsistent with the number of coordinates actually included in the information of the third image region, or at least one coordinate of the third image region does not fall within the range of the third image frame, it is determined that the third image region is unreasonable.
[0095] As described above, there are various ways to represent the coordinates of the third image region. Assuming that the method of representing the coordinates of the third image region is certain, the number of coordinates included in the third image region can be determined. For example, assuming that the coordinates of the third image region include the coordinates of the top-left pixel point and the coordinates of the bottom-right pixel point of the third image region, and the coordinates of each pixel point are two-dimensional coordinates, it can be known that the coordinates of the third image region include the coordinates of the top-left pixel point and the coordinates of the bottom-right pixel point, i.e. 4 data. That is, the number of coordinates of each third image region is 4. Assuming that there are x_1 third image regions, the number of coordinates of the x_1 third image regions should be 4*x_1.
[0096] In addition, the terminal device can obtain the number of coordinates and the coordinates of the third image region from the cloud server. Assuming that there are x_1 third image regions, and the coordinates of each third image region include the coordinates of the top-left pixel point and the coordinates of the bottom-right pixel point of the third image region, the terminal device can obtain the following data sequence: x_1, x_2, x_3, …, x_n, where x_1 is the number of third image regions, x_2, x_3, …, x_n represent the coordinates of the third image regions, for example, (x_2, x_3) is the coordinates of the top-left pixel point of a third image region, and (x_4, x_5) is the coordinates of the bottom-right pixel point of the third image region. That is, it can be known from the data sequence that the number of coordinates of the third image region should be n-1. If 4*x_1=n-1, it indicates that the number of coordinates of the third image region is consistent with the number of coordinates actually included in the information of the third image region, otherwise, it indicates that the number of coordinates of the third image region is inconsistent with the number of coordinates actually included in the information of the third image region.
[0097] It should be understood that, since the third image frame has a certain resolution, for example, W*H, W represents the width of the third image frame, i.e. the number of pixel points included in the width direction, and H represents the height of the third image frame, i.e. the number of pixel points included in the height direction. Based on this, it is determined whether the coordinates of the third image region fall within the range of the third image frame, that is, the coordinates of the third image region need to be within the width range and the height range of the third image frame.
[0098] Exemplarily, Figure 5A method flowchart for determining whether the third image region is reasonable is provided for another embodiment of the present application. The method can be executed by a terminal device, which can be a player game terminal 220 in Figure 2 , but is not limited thereto. As shown in Figure 5 , the method includes the following steps.
[0099] S510: Obtain information of the third image region, which is x_1, x_2, x_3, …, x_n.
[0100] Wherein, x_1 is the number of the third image region, and x_2, x_3, …, x_n respectively represent the coordinates of the third image region. For example, (x_2, x_3) is the coordinate of the top-left pixel point of a third image region, and (x_4, x_5) is the coordinate of the bottom-right pixel point of the third image region.
[0101] S520: Determine whether 4*x_1 is equal to n-1. If 4*x_1 is equal to n-1, execute S530, otherwise, execute S570.
[0102] That is, S520 is used to determine whether the number of coordinates of the third image region is consistent with the number of coordinates actually included in the information of the third image region. If 4*x_1 is equal to n-1, it indicates that the number of coordinates of the third image region is consistent with the number of coordinates actually included in the information of the third image region. If 4*x_1 is not equal to n-1, it indicates that the number of coordinates of the third image region is not consistent with the number of coordinates actually included in the information of the third image region.
[0103] S530: Let i=1.
[0104] S540: Determine whether i+4 is less than or equal to n. If i+4 is less than or equal to n, execute S550, otherwise, execute S580.
[0105] S550: Determine whether the following conditions are all met:
[0106] 0≤x_(i+1)≤W-1;
[0107] 0≤x_(i+3)≤W-1;
[0108] 0≤x_(i+2)≤H-1;
[0109] 0≤x_(i+4)≤H-1;
[0110] If the above conditions are all met, execute S560, otherwise, execute S570.
[0111] wherein, W represents the width of the third image frame, that is, the number of pixel points included in the width direction, and H represents the height of the third image frame, that is, the number of pixel points included in the height direction.
[0112] It should be understood that, it is assumed herein that the pixel in the upper left corner of the third image frame is the coordinate origin, and the positive direction of the x-axis in the coordinate is to the right and the positive direction of the y-axis in the coordinate is downward, and the judgment of the above three conditions is actually a judgment of whether the coordinates of the third image region are within the range of the third image frame.
[0113] S560: let i = i + 4, and continue to execute S540;
[0114] S570: determine that the third image region is unreasonable.
[0115] S580: determine that the third image region is reasonable.
[0116] It should be noted that the judgment of whether the third image region is reasonable can be performed before S370.
[0117] It should be understood that, for the third image frame, the terminal device can perform the quality enhancement processing on the third image region in the image frame and does not perform any processing on other image regions to obtain a fourth image frame.
[0118] It should be understood that, after obtaining the fourth image frame, the terminal device can perform image rendering to display the fourth image frame. The rendering manner adopted by the terminal device is not limited in the present application.
[0119] In summary, the present application provides an image processing method. By introducing high-frequency components into the image, low-pass filtering processing can be performed on some regions in the image. Since some high-frequency components can be removed by low-pass filtering processing, these removed high-frequency components can offset the introduced high-frequency components in the image to some extent. For the region subjected to low-pass filtering processing, a high code rate is not required. Therefore, by the above manner, on the one hand, the coding difficulty of the encoder can be reduced, and on the other hand, for the region subjected to low-pass filtering processing, the terminal device can perform quality enhancement processing such as sharpening processing, so that the image quality of the entire image can be improved.
[0120] Further, before performing the quality enhancement processing on the third image region, the terminal device can first detect whether the third image region is reasonable. Only when the third image region is reasonable, the quality enhancement processing is performed on the third image region. When the third image region is unreasonable, the quality enhancement processing is not performed on the third image region, so that the reliability of image processing can be improved.
[0121] Optionally, since the terminal device needs to perform the quality enhancement processing on the third image region, the video rendering capability of the terminal device needs to meet the quality enhancement processing requirement of the third image region.
[0122] Optionally, the cloud server can send a video rendering capability request to the terminal device, and receive a video rendering capability response of the terminal device, wherein the video rendering capability response includes the video rendering capability of the terminal device.
[0123] Optionally, as shown in Figure 6 the cloud server can send a video rendering capability request to the terminal device through a client installed on the terminal device, and the terminal device can also return a video rendering capability response to the cloud server through the client. In the cloud game scenario, the client can be a cloud game client.
[0124] Optionally, the video rendering capability request is used to request the video rendering capability of the terminal device.
[0125] Optionally, the video rendering capability request includes at least one of the following, but is not limited thereto: a protocol version number, a video resolution, a video frame rate, and a queried rendering algorithm type.
[0126] Optionally, the protocol version number refers to the minimum protocol version supported by the cloud server, and the protocol can be a rendering protocol.
[0127] Optionally, the video resolution, i.e., the video size, can be the resolution of a video source to be rendered, such as 1080p.
[0128] Optionally, the video frame rate can be the frame rate of the video source to be rendered, such as 60fps.
[0129] Optionally, the queried rendering algorithm type can be at least one of the following, but is not limited thereto: a sharpening processing algorithm, a noise reduction processing algorithm, a blur processing algorithm, a video High Dynamic Range Imaging (HDR) enhancement capability algorithm, etc.
[0130] Optionally, different video resolutions can be defined by enumeration, as shown in Table 1:
[0131] Table 1
[0132] Video resolution Enumerated definition 360p 0x1 576p 0x2 720p 0x4 1080p 0x8 2k 0x10 4k 0x20
[0133] Optionally, different video frame rates can be defined by enumeration, as shown in Table 2:
[0134] Table 2
[0135] Video frame rate Enumerated definition 30 fps 0x1 40 fps 0x2 50 fps 0x4 60 fps 0x8 90 fps 0x10 120 fps 0x20
[0136] Optionally, different rendering algorithms can be defined by enumeration, as shown in Table 3:
[0137] Table 3
[0138]
[0139]
[0140] Exemplarily, the code implementation of the video rendering capability request can be as follows:
[0141] {
[0142] "render_ability":{
[0143] "version":"1.0",
[0144] "resolution":"8",
[0145] "framerate":"8",
[0146] "type":"1,2"
[0147] }
[0148] }
[0149] The explanation of each data structure in the code can refer to Table 4 below, which will not be repeated herein.
[0150] Among them, the data structure of the video rendering capability of the terminal device can be as shown in Table 4:
[0151] Table 4
[0152]
[0153]
[0154]
[0155] Optionally, the video rendering capability response can include at least one of the following, but is not limited thereto: an identifier of whether the rendering algorithm type to be queried by the cloud server is successfully queried, a protocol version number supported by the terminal device, a video rendering capability of the terminal device, etc.
[0156] Optionally, if the rendering algorithm type to be queried by the cloud server is successfully queried, the identifier of whether the rendering algorithm type to be queried by the cloud server is successfully queried can be represented by 0, and if the rendering algorithm type to be queried by the cloud server fails to be queried, the identifier of whether the rendering algorithm type to be queried by the cloud server is successfully queried can be represented by an error code, such as 001, etc.
[0157] Optionally, the protocol version number refers to the lowest protocol version supported by the terminal device, and the protocol can be a rendering protocol.
[0158] Optionally, the video rendering capability of the terminal device comprises at least one of, but is not limited to, the following: a rendering algorithm type supported by the terminal device and a performance of the rendering algorithm.
[0159] Optionally, the performance of the rendering algorithm comprises at least one of, but is not limited to, the following: a video size, a frame rate and a time delay that can be processed by the algorithm.
[0160] Exemplarily, a code implementation of the video rendering capability response can be as follows:
[0161] {
[0162] "render_ability":{
[0163] "state":"0",
[0164] "version":"1.0",
[0165] "renders":"2"
[0166] },
[0167] "render1":{
[0168] "type":"1",
[0169] "performances":"1",
[0170] "performance1":"8,8,10"
[0171] },
[0172] "render2":{
[0173] "type":"2",
[0174] "performances":"1",
[0175] "performance1":"8,8,5"
[0176] }
[0177] }
[0178] Exemplarily, a code implementation of the video rendering capability response (only supporting partial rendering capability) can be as follows:
[0179] {
[0180] "render_ability": {
[0181] "state": "0",
[0182] "version": "1.0",
[0183] "renders": "1"
[0184] },
[0185] "render1": {
[0186] "type": "2",
[0187] "performances": "1",
[0188] "performance1": "8,8,5"
[0189] }
[0190] }
[0191] For example, the code implementation of the video rendering capability response (not supporting rendering capability) can be as follows:
[0192] {
[0193] "render_ability": {
[0194] "state": "0",
[0195] "version": "1.0",
[0196] "renders": "0"
[0197] }
[0198] }
[0199] For example, the code implementation of the video rendering capability response (protocol request failure) can be as follows:
[0200] {
[0201] "render_ability": {
[0202] "state": "-1",
[0203] "version": "0.9"
[0204] }
[0205] }
[0206] It should be understood that the explanation of the various data structures in these codes can be found in Table 4, and will not be repeated here.
[0207] Figure 7 This is a schematic diagram of an image processing apparatus provided in an embodiment of this application, such as... Figure 7 As shown, the device includes: a determining module 710, a processing module 720, an encoding module 730, and an output module 740. The determining module 710 is used to determine a first image region and a second image region in a first image frame. The first image region is the image region to which high-frequency components are to be introduced, and the second image region is the image region to be filtered. The processing module 720 is used to perform image quality enhancement processing on the first image region in the first image frame and to perform low-pass filtering processing on the second image region to obtain a second image frame. The encoding module 730 is used to encode the second image frame to obtain a bitstream. The output module 740 is used to output the bitstream to a terminal device.
[0208] Optionally, the device further includes: a sending module 750, configured to perform image quality enhancement processing on the first image region in the first image frame and low-pass filtering processing on the second image region in the processing module 720 to obtain the second image frame, and then send the information of the third image region to the terminal device; wherein the third image region is the image region after the second image region has been low-pass filtered and encoded / decoded.
[0209] Optionally, the information of the third image region includes: the number of regions in the third image region and the coordinates of the third image region.
[0210] Optionally, the device further includes a receiving module 760, wherein the sending module 750 is further configured to send a video rendering capability request to the terminal device; the receiving module 760 is configured to receive a video rendering capability response from the terminal device, the video rendering capability response including the video rendering capability of the terminal device; and correspondingly, the sending module 750 is specifically configured to send information of the third image region to the terminal device when the video rendering capability of the terminal device meets the image quality enhancement processing requirements of the third image region.
[0211] Optionally, the determining module 710 is specifically used to: determine a first image region according to a preset rule; and determine the region other than the first image region in the first image frame as a second image region, wherein the preset rule is that at least one of the following regions in the first image frame is the first image region by default: the upper left corner region, the lower right corner region, the upper right corner region, the lower right corner region, and the center region.
[0212] Optionally, the first image frame is obtained from a real-time uploaded video sequence, which is a virtual game video sequence; the first image frame includes an image frame header, which is used to indicate the coordinates of the first image region and the second image region.
[0213] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 7 The apparatus shown can execute the method embodiments corresponding to the cloud server described above, and the aforementioned and other operations and / or functions of each module in the apparatus are respectively for implementing the corresponding processes in the various methods corresponding to the cloud server described above. For the sake of brevity, they will not be described in detail here.
[0214] The apparatus of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the method disclosed in this application embodiment can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.
[0215] Figure 8 A schematic diagram of another image processing apparatus provided in the embodiments of this application, such as Figure 8 As shown, the device includes: a first acquisition module 810, a parsing module 820, a first determination module 830, a processing module 840, and a display module 850. The first acquisition module 810 is used to acquire the bitstream; the parsing module 820 is used to parse the bitstream to obtain a third image frame; the first determination module 830 is used to determine a third image region in the third image frame; the processing module 840 is used to perform image quality enhancement processing on the third image region in the third image frame to obtain a fourth image frame; and the display module 850 is used to display the fourth image frame. The second image frame is obtained by performing image quality enhancement processing on the first image region in the first image frame, and low-pass filtering processing on the second image region in the first image frame, followed by encoding and decoding. The third image region is obtained by performing low-pass filtering processing on the second image region and then encoding and decoding it.
[0216] Optionally, the device further includes a second acquisition module 860 for acquiring information about a third image region.
[0217] Optionally, the first determining module 830 is specifically used to: determine the third image region in the third image frame based on the information of the third image region.
[0218] Optionally, the apparatus further includes a second determining module 870 configured to determine whether the third image region is reasonable according to the information of the third image region before the processing module 840 performs the quality enhancement processing on the third image region in the third image frame to obtain a fourth image frame.
[0219] Optionally, the information of the third image region includes: a region number of the third image region and coordinates of the third image region; correspondingly, the second determining module 870 is specifically configured to: determine a coordinate number of the third image region according to the region number of the third image region; and determine whether the third image region is reasonable according to whether the coordinate number of the third image region is consistent with an actual coordinate number included in the information of the third image region, and whether the coordinates of the third image region fall within a range of the third image frame.
[0220] Optionally, the second determining module 870 is specifically configured to: if the coordinate number of the third image region is consistent with the actual coordinate number included in the information of the third image region, and the coordinates of the third image region fall within the range of the third image frame, determine that the third image region is reasonable; if the coordinate number of the third image region is not consistent with the actual coordinate number included in the information of the third image region, or at least one coordinate of the third image region does not fall within the range of the third image frame, determine that the third image region is not reasonable.
[0221] Optionally, the apparatus further includes a communication module 880 configured to: receive a video rendering capability request sent by a cloud server; and send a video rendering capability response to the cloud server, the video rendering capability response including a video rendering capability of the terminal device.
[0222] Optionally, the first image frame is obtained from a real-time uploaded video sequence, and the video sequence is a virtual game video sequence; the first image frame includes an image frame header, and the image frame header is used to indicate coordinates of the first image region and the second image region.
[0223] It should be understood that the apparatus embodiments and the method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, details are not described here. Specifically, Figure 8 The apparatus shown can perform the method embodiments corresponding to the terminal device, and the foregoing and other operations and / or functions of each module in the apparatus are respectively implemented to realize the corresponding processes in each method of the terminal device. To be brief, details are not described here.
[0224] The device of the embodiments of the present application is described above from the perspective of functional modules in combination with the drawings. It should be understood that the functional modules can be implemented in the form of hardware, or in the form of instructions of software, or in the form of a combination of hardware and software modules. Specifically, the steps of the method embodiments in the embodiments of the present application can be completed by integrated logic circuits of hardware in a processor and / or instructions of software. The steps of the method disclosed in the embodiments of the present application can be directly embodied as hardware code processing performed by a processor, or be executed by a combination of hardware and software modules in a code processing processor. Alternatively, the software module can be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, and the like. The storage medium is located in a memory, and a processor reads information in the memory and combines hardware to complete the steps in the above method embodiments.
[0225] Figure 9 is a schematic block diagram of an electronic device 900 provided by the embodiments of the present application. The electronic device can be the cloud server or the terminal device described above.
[0226] As shown in Figure 9 , the electronic device 900 can include:
[0227] The memory 910 is used to store computer programs and transmit the program codes to the processor 920. In other words, the processor 920 can call and run the computer programs from the memory 910 to implement the method in the embodiments of the present application.
[0228] For example, the processor 920 can be used to execute the above method embodiments according to the instructions in the computer programs.
[0229] In some embodiments of the present application, the processor 920 can include but is not limited to:
[0230] A general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like.
[0231] In some embodiments of the present application, the memory 910 includes but is not limited to:
[0232] The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0233] In some embodiments of the present application, the computer program can be divided into one or more modules, which are stored in the memory 910 and executed by the processor 920 to complete the method provided by the present application. The one or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the electronic device.
[0234] As shown in Figure 9 The electronic device can further include:
[0235] The transceiver 930 can be connected to the processor 920 or the memory 910.
[0236] The processor 920 can control the transceiver 930 to communicate with other devices, specifically, can send information or data to other devices, or receive information or data sent by other devices. The transceiver 930 can include a transmitter and a receiver. The transceiver 930 can further include an antenna, and the number of antennas can be one or more.
[0237] It should be understood that the various components within the electronic device are connected via a bus system, which includes, in addition to a data bus, a power supply bus, a control bus, and a state signal bus.
[0238] The application also provides a computer storage medium, which stores a computer program, and the computer program enables a computer to execute the method of the method embodiment when executed by the computer. Alternatively, the application embodiment also provides a computer program product containing instructions, and the instructions enable the computer to execute the method of the method embodiment when executed by the computer.
[0239] When implemented by using software, the computer program product can be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. When loaded and executed by a computer, the computer program instructions produce the flow or function of the embodiment of the application in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through a wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, digital video disc (DVD)), or a semiconductor medium (for example, solid state disk (SSD)), etc.
[0240] Those skilled in the art can realize that the modules and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the application.
[0241] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the division of the above-described device embodiments is only a logical function division, and there can be another division manner for the actual implementation, for example, multiple devices or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different parts can be indirect couplings or communication connections through some interfaces, devices or modules, and can be electrical, mechanical or in other forms.
[0242] The modules explained as separated components can or can not be physically separated, and the components shown as modules can or can not be physical modules, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments. For example, the functional modules in the embodiments of the present application can be integrated into a processing module, or each module can be physically present separately, or two or more modules can be integrated into one module.
[0243] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. An image processing method, characterized by, The method is applied to a cloud server, and the method comprises: determining a first image region and a second image region in a first image frame, the first image region being an image region to which a high-frequency component is to be introduced, and the second image region being an image region to be filtered; performing quality enhancement processing on the first image region in the first image frame and low-pass filtering processing on the second image region to obtain a second image frame; encoding the second image frame to obtain a code stream; outputting the code stream to a terminal device; sending information of a third image region to the terminal device to enable the terminal device to determine whether the third image region is reasonable according to the information of the third image region and, in the case where the third image region is reasonable, perform quality enhancement processing on the third image region in a third image frame to obtain and display a fourth image frame; wherein the third image region is an image region that has been subjected to low-pass filtering processing and codec processing on the second image region.
2. The method of claim 1, wherein, The information of the third image region comprises a region number of the third image region and coordinates of the third image region.
3. The method according to claim 1 or 2, characterized in that, Before the information of the third image region is sent to the terminal device, the method further comprises: sending a video rendering capability request to the terminal device; receiving a video rendering capability response of the terminal device, the video rendering capability response comprising a video rendering capability of the terminal device; the sending of the information of the third image region to the terminal device comprises: when the video rendering capability of the terminal device meets the requirement of quality enhancement processing on the third image region, sending the information of the third image region to the terminal device.
4. The method according to claim 1 or 2, characterized in that, The determination of the first image region and the second image region in the first image frame comprises: determining the first image region according to a preset rule; determining a region other than the first image region in the first image frame as the second image region; wherein the preset rule is to regard at least one of the following regions in the first image frame as the first image region by default: a top-left corner region, a bottom-right corner region, a top-right corner region, a bottom-right corner region, and a center region.
5. The method according to claim 1 or 2, characterized in that, The first image frame is obtained from a real-time uploaded video sequence, and the video sequence is a virtual game video sequence; The first image frame comprises an image frame header, and the image frame header is used to indicate the coordinates of the first image region and the second image region.
6. An image processing method characterized by, The method is applied to a terminal device, and the method comprises: obtaining a code stream; parsing the code stream to obtain a third image frame; determining a third image region in the third image frame; obtaining information of the third image region; determining whether the third image region is reasonable according to the information of the third image region; in the case where the third image region is reasonable, performing quality enhancement processing on the third image region in the third image frame to obtain a fourth image frame; displaying the fourth image frame; The third image frame is an image frame obtained by performing image quality enhancement processing on the first image region in the first image frame and low-pass filtering processing on the second image region in the first image frame, and then encodes and decodes it. The third image region is an image region that has undergone low-pass filtering processing on the second image region and has been encoded and decoded.
7. The method of claim 6, wherein, Determining the third image region in the third image frame includes: The third image region in the third image frame is determined based on the information of the third image region.
8. The method according to claim 6 or 7, characterized in that, The information of the third image region includes: the number of regions in the third image region and the coordinates of the third image region; The step of determining whether the third image region is reasonable based on the information of the third image region includes: The number of coordinates of the third image region is determined based on the number of regions in the third image region. The validity of the third image region is determined by whether the number of coordinates in the third image region matches the actual number of coordinates included in the information of the third image region, and whether the coordinates of the third image region fall within the range of the third image frame.
9. The method of claim 8, wherein, The step of determining whether the third image region is reasonable based on whether the number of coordinates in the third image region matches the actual number of coordinates included in the information of the third image region, and whether the coordinates of the third image region fall within the range of the third image frame, includes: If the number of coordinates in the third image region is consistent with the actual number of coordinates included in the information of the third image region, and the coordinates of the third image region fall within the range of the third image frame, then the third image region is determined to be reasonable. If the number of coordinates in the third image region is inconsistent with the actual number of coordinates included in the information of the third image region, or if at least one coordinate of the third image region does not fall within the range of the third image frame, then the third image region is determined to be unreasonable.
10. The method of claim 6 or 7, wherein, Also includes: Receive video rendering capability requests sent by the cloud server; Send a video rendering capability response to the cloud server, the video rendering capability response including the video rendering capability of the terminal device.
11. The method of claim 6 or 7, wherein, The first image frame is obtained from a video sequence uploaded in real time, and the video sequence is a virtual game video sequence; The first image frame includes an image frame header, which is used to indicate the coordinates of the first image region and the second image region.
12. An image processing apparatus characterized by comprising: include: The determining module is used to determine a first image region and a second image region in a first image frame, wherein the first image region is the image region to which high-frequency components are to be introduced, and the second image region is the image region to which filtering is to be performed. The processing module is used to perform image quality enhancement processing on the first image region in the first image frame and low-pass filtering processing on the second image region to obtain the second image frame. The encoding module is used to encode the second image frame to obtain a bitstream; The output module is used to output the bitstream to the terminal device; The sending module is configured to send information of the third image region to the terminal device, so that the terminal device determines whether the third image region is reasonable according to the information of the third image region, and performs quality enhancement processing on the third image region in the third image frame to obtain a fourth image frame and display the fourth image frame when the third image region is reasonable. The third image region is an image region obtained by performing low-pass filtering processing on the second image region and then performing coding and decoding.
13. An image processing apparatus characterized by comprising: The method comprises the following steps: The first obtaining module is configured to obtain a code stream. The parsing module is configured to parse the code stream to obtain a third image frame. The first determining module is configured to determine a third image region in the third image frame. The second obtaining module is configured to obtain information of the third image region. The second determining module is configured to determine whether the third image region is reasonable according to the information of the third image region. The processing module is configured to perform quality enhancement processing on the third image region in the third image frame to obtain a fourth image frame when the third image region is reasonable. The display module is configured to display the fourth image frame. The third image frame is an image frame obtained by performing quality enhancement processing on a first image region in a first image frame and performing low-pass filtering processing on a second image region in the first image frame, and then performing coding and decoding, and the third image region is an image region obtained by performing low-pass filtering processing on the second image region and then performing coding and decoding.
14. An electronic device, comprising: The method comprises the following steps: The processor and the memory are configured to store a computer program, and the processor is configured to call and run the computer program stored in the memory to execute the method in any one of claims 1 to 11.
15. A computer-readable storage medium, characterized in that, The computer program is configured to enable a computer to execute the method in any one of claims 1 to 11.
Citation Information
Patent Citations
Adaptive image enhancement method based on interesting area
CN102663682A
Video image encoding and decoding method and apparatus
CN109996069A
Video processing method and device, electronic equipment and storage medium
CN110766637A
Virtual image live broadcast method and device, electronic equipment and storage medium
CN111614967A