CN-122002028-A - Image processing method and device
Abstract
The application provides an image processing method and device, the method comprises the steps of obtaining a first area related to scene change in an image to be processed, and carrying out graphic calculation on the first area to obtain a first intermediate result of the image to be processed; and encoding the first intermediate result to obtain an encoded code stream. The method carries out graphic calculation on the area related to the scene change in the image to be processed so as to obtain a first intermediate result of the first area in the image to be processed, thereby greatly reducing the calculation amount and the calculation cost of the server side for graphic calculation of the image to be processed so as to obtain the intermediate result of the image to be processed, reducing the coding amount, shortening the length of the code stream and further reducing the duty ratio of the code stream to the transmission bandwidth.
Inventors
- TANG MENGXIAO
- LIN ZEHUI
- CAI KANGYING
- ZHAO YUXIN
Assignees
- 华为技术有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241108
Claims (20)
- 1. An image processing method, the method comprising: Acquiring a first area in an image to be processed, wherein the first area is an area related to scene change; carrying out graphic calculation on the first region to obtain a first intermediate result of the image to be processed; the first intermediate result is encoded to obtain an encoded code stream.
- 2. The method according to claim 1, wherein the method further comprises: first information is encoded into the code stream, the first information being used to indicate the position of the first region in the image to be processed.
- 3. The method according to claim 1 or 2, wherein the acquiring a first region in the image to be processed comprises: acquiring second information, wherein the second information is used for dividing the image to be processed into areas; and obtaining the first area in the image to be processed based on the second information.
- 4. A method according to claim 3, wherein the method is performed by a first device and the second information comprises at least one of: the scene information corresponding to the image to be processed, One or more of network status information, computing power, thermal threshold of the first device and/or the second device, Communication link information of the first device and the second device, the second device communicates with the first device.
- 5. The method according to any one of claims 1 to 4, wherein said encoding the first intermediate result to obtain an encoded code stream comprises: acquiring a coding mode of the first intermediate result; and encoding the first intermediate result based on the encoding mode to obtain the code stream.
- 6. The method of claim 5, wherein the method further comprises: Acquiring a reconstruction mode of the image to be processed, wherein the reconstruction mode corresponds to the coding mode; and encoding the reconstruction mode into the code stream.
- 7. The method according to claim 5 or 6, wherein the coding scheme comprises: Acquiring a reference frame, wherein the reference frame is an intermediate result of a reference image corresponding to the image to be processed; and encoding the first intermediate result according to the reference frame.
- 8. The method according to claim 5 or 6, wherein the coding scheme comprises: Acquiring preset data corresponding to the image to be processed, wherein the preset data comprises a first preset intermediate result corresponding to the first region; And encoding the first intermediate result according to the preset data.
- 9. The method of claim 8, wherein the preset data is a preset intermediate result of the image to be processed or a preset intermediate result of a reference image corresponding to the image to be processed.
- 10. The method according to claim 8 or 9, wherein said encoding said first intermediate result according to said preset data comprises: Acquiring the first preset intermediate result based on the preset data; obtaining first difference data based on the first intermediate result and the first preset intermediate result; The first difference data is encoded.
- 11. The method according to claim 8 or 9, wherein the first intermediate result comprises a second intermediate result of a part of the first region calculated graphically and a third intermediate result of another part of the first region calculated graphically, the encoding the first intermediate result according to the preset data comprising: acquiring a preset intermediate result of the other part of the first region in the image to be processed based on the preset data; obtaining second difference data based on the third intermediate result and the preset intermediate result of the other part; The second difference data, the second intermediate result and third information are encoded, the third information being used to indicate the position of a part of the first region and/or the other part in the image to be processed.
- 12. The method according to any one of claims 1 to 11, further comprising: Acquiring indication information corresponding to the image to be processed, wherein the indication information is used for indicating preset data corresponding to the image to be processed; And encoding the indication information into the code stream.
- 13. The method according to claim 12, wherein the indication information includes an acquisition address of preset data corresponding to the image to be processed.
- 14. A method according to claim 3, characterized in that the method further comprises: Obtaining a second region in the image to be processed based on the second information, wherein the scene change degree of the second region is lower than that of the first region; and encoding the fourth information into the code stream, wherein the fourth information is used for indicating the position of the second area in the image to be processed.
- 15. An image processing method, the method comprising: Decoding a code stream to obtain decoding data corresponding to a first intermediate result of an image to be processed, wherein the first intermediate result is obtained by performing first graphic calculation on a first area in the image to be processed, and the first area is an area related to scene change; And obtaining a graph calculation result of the image to be processed based on the decoded data corresponding to the first intermediate result.
- 16. The method according to claim 15, wherein the obtaining a graphic calculation result of the image to be processed based on the decoded data corresponding to the first intermediate result includes: Acquiring first information, wherein the first information is used for indicating the position of the first area in the image to be processed; And obtaining a graph calculation result of the image to be processed based on the first information and the decoding data corresponding to the first intermediate result.
- 17. The method according to claim 16, wherein the obtaining a graphic calculation result of the image to be processed based on the first information and the decoded data corresponding to the first intermediate result includes: Acquiring a reconstruction mode of the image to be processed; and obtaining a graph calculation result of the image to be processed according to the first information and the decoding data and the reconstruction mode.
- 18. The method according to claim 17, wherein the acquiring a reconstruction manner of the image to be processed includes: And acquiring a reconstruction mode of the image to be processed based on the first information.
- 19. The method according to claim 17, wherein the acquiring a reconstruction manner of the image to be processed includes: and acquiring a reconstruction mode of the image to be processed from the code stream.
- 20. The method according to claim 16, wherein the obtaining a graphic calculation result of the image to be processed based on the first information and the decoded data corresponding to the first intermediate result includes: acquiring preset data corresponding to the image to be processed, wherein the preset data comprises a first preset intermediate result corresponding to the first area in the image to be processed; and obtaining a graph calculation result of the image to be processed according to the preset data, the first information and the decoding data corresponding to the first intermediate result.
Description
Image processing method and device Technical Field The present application relates to the field of image processing technologies, and in particular, to an image processing method and apparatus. Background Many cloud collaborative scenes (for example, cloud games, virtual Reality (VR)/augmented Reality (AugmentedReality, AR), three-dimensional (3D) cloud conferences, 3D scene collaborative editing production, etc.) need to generate pictures through a graphics processing means, so that the obtained pictures are more realistic, and the user experience is improved. Therefore, the graphic processing algorithms such as rendering, physical simulation, animation and the like are generally deployed on the cloud side server, the cloud side server performs graphic processing such as rendering, physical simulation, animation and the like, and then the image/video obtained by the graphic processing is compressed and sent to the end side device, and the end side device displays the image/video. In order to avoid the waste of computing power of the end device caused by the fact that only the computing power of the cloud side is utilized to perform graphics processing, the cloud side server can only perform graphics processing with high computing overhead requirements, encode and transmit an intermediate result obtained by the graphics processing (for example, when the graphics processing is rendering, the intermediate result is rendering intermediate result) to the end device, and then perform simple graphics processing on the decoded intermediate result by the end device to obtain a high-quality picture. Compared with a picture generated by directly transmitting graphic processing on the cloud side, the terminal cloud collaborative graphic processing can improve the utilization rate of computing power on the two sides of the terminal cloud and save bandwidth under the condition of achieving similar display effects. However, in the end cloud collaboration scheme in the related art, the cloud side server has higher calculation cost for the intermediate result, and the transmission of the intermediate result needs to occupy higher bandwidth. Disclosure of Invention The application provides an image processing method and device, which can reduce the calculation cost of an intermediate result by a cloud side server, reduce the amount of coded data and further reduce the bandwidth occupied by transmitting the intermediate result. In a first aspect, the present application provides an image processing method, including obtaining a first region in an image to be processed, where the first region is a region related to a scene change, performing a graphic calculation on the first region to obtain a first intermediate result of the image to be processed, and encoding the obtained first intermediate result to obtain an encoded bitstream. The first region is a region associated with a change in a scene (e.g., a three-dimensional scene, etc.), then factors that cause the scene change may include, but are not limited to, at least one of a change in a position of an object in the scene, a change in time, a change in a viewing angle, etc. For example, the change of the position of an object in the three-dimensional scene can cause the scene corresponding to the image to be processed to change, namely, the character in the cloud game enters the three-dimensional scene, so that the illumination around the character needs to change, and then the area around the character in the three-dimensional scene can be the area related to the scene change. For example, the change of time can cause the change of the scene corresponding to the image to be processed, for example, the change of the game time of the cloud game is based on the game logic of the cloud game, so that the part of the scene in the game picture at the next moment is updated, and the two-dimensional image area converted by the updated part of the scene is the area related to the scene change in the image to be processed. For another example, the change of the view angle can cause the change of the scene corresponding to the image to be processed, for example, the change of the view angle of a cloud game can cause the change of the object and the illumination in the middle area of the game scene (an example of a three-dimensional scene), and the area which is caused by the change of the view angle and causes the change of the object and the illumination in the game scene is the area which is related to the scene change in the image to be processed. It should be understood that the first area defined by the present application is an area associated with a scene change, and the scene change is not limited to a change in illumination within a scene, but may be a change in an object (e.g., a character, an object, etc.) within a scene, which is not limited herein. By way of example, the graphics computation may include, but is not limited to, one or more of rendering, physical simulati