Image processing method and apparatus

US12475539B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-12475539-B2
Application numberUS-202218570496-A
CountryUS
Kind codeB2
Filing dateSep 21, 2022
Priority dateOct 13, 2021
Publication dateNov 18, 2025
Grant dateNov 18, 2025

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

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.

First claim

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

Assignees

Inventors

Classifications

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US12475539B2 cover?
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 …
Who is the assignee on this patent?
Beijing Bytedance Network Tech Co Ltd
What technology area does this patent fall under?
Primary CPC classification G06V10/56. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Nov 18 2025 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 1 related publication on this page (citations in our corpus or others sharing the same primary CPC).