Patent ID: 11954836
Assignee: BEIJING XIAOMI MOBILE SOFTWARE CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A method of processing an image, comprising:
obtaining depth-of-field data of an input image and obtaining a weight matrix of the input image based on the depth-of-field data;
obtaining a product of a weight corresponding to a pixel in the weight matrix and a pixel value corresponding to the pixel in the input image and obtaining a weight image, wherein the product is the pixel value of the pixel in the weight image;
obtaining a first horizontal summed area table corresponding to the weight matrix by performing a horizontal summing operation on the weight matrix and obtaining a second horizontal summed area table corresponding to the weight image by performing the horizontal summing operation on the weight image, wherein the horizontal summing operation refers to, obtaining a sum of the pixel value of a pixel and pixel value of pixels before the pixel and on the same row with the pixel;
obtaining a blurring value corresponding to the pixel of the weight matrix based on the first horizontal summed area table and obtaining a first weighted blurring image corresponding to the weight matrix, and obtaining a blurring value corresponding to the pixel of the weight image based on the second horizontal summed area table and obtaining a second weighted blurring image corresponding to the weight image; and
obtaining a ratio of the blurring value corresponding to the pixel in the second weighted blurring image to the blurring value corresponding to the pixel in the first weighted blurring image, and determining the ratio as the pixel value corresponding to the pixel in a target image; the target image being obtained by blurring the input image.