Per-pixel variable rate shading controls using stencil data
US-2022414950-A1 · Dec 29, 2022 · US
US12475539B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-12475539-B2 |
| Application number | US-202218570496-A |
| Country | US |
| Kind code | B2 |
| Filing date | Sep 21, 2022 |
| Priority date | Oct 13, 2021 |
| Publication date | Nov 18, 2025 |
| Grant date | Nov 18, 2025 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
The present disclosure provides an image processing method and apparatus. The method comprises: obtaining an RGB image and a stencil buffer, wherein the RGB image comprises image information taken by a physical camera and image information rendered by a virtual object rendering module, and the stencil buffer is used for storing stencil values corresponding to pixels on the RGB image; obtaining a target image by processing the RGB image according to the stencil buffer; obtaining a post-processed image by post-processing the target image; determining an image to be displayed according to the post-processed image. In this way, the post-processing object is flexible and controllable. The user therefore has a stronger sense of participation and a better experience.
Opening claim text (preview).
What is claimed is: 1 . An image processing method comprising: obtaining an RGB image and a stencil buffer, wherein the RGB image comprises: image information taken by a physical camera and image information rendered by a virtual object rendering module, and the stencil buffer stores stencil values corresponding to pixels of the RGB image, and pixels to be post-processed and pixels not to be post-processed of the RGB image correspond to different stencil values; obtaining a target image by processing the RGB image according to the stencil buffer, wherein pixels not to be post-processed in the target image are in a preset color; obtaining a post-processed image by post-processing the target image; and determining an image to be displayed according to the post-processed image. 2 . The method of claim 1 , wherein obtaining the RGB image and the stencil buffer comprises: obtaining the RGB image according to RGB values of the image information taken by the physical camera and RGB values of the image information rendered by the virtual object rendering module; and obtaining the stencil buffer by updating stencil values of the pixels to be post-processed in an original stencil buffer to a pre-set value, wherein stencil values corresponding to the pixels stored in the original stencil buffer are a default value and the pre-set value differ from the default value. 3 . The method of claim 2 , wherein obtaining the target image by processing the RGB image according to the stencil buffer comprises: creating a render target; copying RGB values of the pixels on the RGB image into the render target; setting RGB values of the pixels on the RGB image to zero; and for each pixel on the RGB image, querying in the stencil buffer whether a stencil value corresponding to the pixel is a pre-set value; in the case that the stencil value corresponding to the pixel is the pre-set value, obtaining an RGB value of the pixel by querying the render target; in the case that the stencil value corresponding to the pixel is not the pre-set value, no processing being performed. 4 . The method of claim 3 , wherein determining the image to be displayed according to the post-processed image comprises: obtaining the image to be displayed by fusing the render target with the post-processed image. 5 . The method of claim 4 , wherein obtaining the image to be displayed by fusing the render target with the post-processed image comprises: obtaining the image to be displayed by substituting an RGB value of a pixel in the render target with a corresponding RGB value of a target pixel of the post-processed image, the target pixel comprising a pixel having non-zero RGB value. 6 . A non-transitory computer readable storage medium, storing a computer program thereon, the computer program, when executed by a processor, causing the processor to: obtain an RGB image and a stencil buffer, wherein the RGB image comprises: image information taken by a physical camera and image information rendered by a virtual object rendering module, and the stencil buffer stores stencil values corresponding to pixels of the RGB image, and pixels to be post-processed and pixels not to be post-processed of the RGB image correspond to different stencil values; obtain a target image by processing the RGB image according to the stencil buffer, wherein pixels not to be post-processed in the target image are in a preset color; obtain a post-processed image by post-processing the target image; and determine an image to be displayed according to the post-processed image. 7 . The medium of claim 6 , wherein the computer program causing the processor to obtain the RGB image and the stencil buffer comprises a computer program causing the processor to: obtain the RGB image according to RGB values of the image information taken by the physical camera and RGB values of the image information rendered by the virtual object rendering module; and obtain the stencil buffer by updating stencil values of the pixels to be post-processed in an original stencil buffer to a pre-set value, wherein stencil values corresponding to the pixels stored in the original stencil buffer are a default value and the pre-set value differ from the default value. 8 . The medium of claim 7 , wherein the computer program causing the processor to obtain the target image by processing the RGB image according to the stencil buffer comprises a computer program causing the processor to: create a render target; copy RGB values of the pixels on the RGB image into the render target; set RGB values of the pixels on the RGB image to zero; and for each pixel on the RGB image, query in the stencil buffer whether a stencil value corresponding to the pixel is a pre-set value; in the case that the stencil value corresponding to the pixel is the pre-set value, obtain an RGB value of the pixel by querying the render target; in the case that the stencil value corresponding to the pixel is not the pre-set value, no processing is performed. 9 . The medium of claim 8 , wherein the computer program causing the processor to determine the image to be displayed according to the post-processed image comprises a computer program causing the processor to: obtain the image to be displayed by fusing the render target with the post-processed image. 10 . The medium of claim 9 , wherein the computer program causing the processor to obtain the image to be displayed by fusing the render target with the post-processed image comprises a computer program causing the processor to: obtain the image to be displayed by substituting an RGB value of a pixel in the render target with a corresponding RGB value of a target pixel of the post-processed image, the target pixel comprising a pixel having non-zero RGB value. 11 . A terminal device comprising: a processor; and a memory storing executable instructions of the processor; wherein the instructions, when executed by a processor, cause the processor to: obtain an RGB image and a stencil buffer, wherein the RGB image comprises: image information taken by a physical camera and image information rendered by a virtual object rendering module, and the stencil buffer stores stencil values corresponding to pixels of the RGB image, and pixels to be post-processed and pixels not to be post-processed of the RGB image correspond to different stencil values; obtain a target image by processing the RGB image according to the stencil buffer, wherein pixels not to be post-processed in the target image are in a preset color; obtain a post-processed image by post-processing the target image; and determine an image to be displayed according to the post-processed image. 12 . The terminal device of claim 11 , wherein the instructions causing the processor to obtain the RGB image and the stencil buffer comprises instructions causing the processor to: obtain the RGB image according to RGB values of the image information taken by the physical camera and RGB values of the image information rendered by the virtual object rendering module; and obtain the stencil buffer by updating stencil values of the pixels to be post-processed in an original stencil buffer to a pre-set value, wherein stencil values corresponding to the pixels stored in the original stencil buffer are a default value and the pre-set value differ from the default value. 13 . The terminal device of claim 12 , wherein the instructions causing the processor to obtain the target image by processing the RGB image according to the stencil buffer comprises instructions causing the processor to: create a render target; copy RGB values of the pixels on the
Determination of colour characteristics · CPC title
Color image · CPC title
relating to colour · CPC title
Image fusion; Image merging · CPC title
Three-dimensional [3D] image rendering · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.