CPC G06T 5/002 (2013.01) [G06T 15/005 (2013.01); G06T 2207/10028 (2013.01)] | 16 Claims |
1. A computer-implemented method comprising:
receiving, by a user interface manager of a lens blur rendering system, a request to apply a lens blur effect to an image, the request identifying an input image, depth map, and focal plane in the input image;
identifying, by a blur manager of the lens blur rendering system, an accumulation region of the input image corresponding to a first pixel of an output image, wherein the accumulation region is a region of source pixels of the input image centered on coordinates of the first pixel whose values contribute to an output pixel value of the first pixel;
generating, by an iris map manager of the lens blur rendering system, an iris map including a plurality of iris blocks, wherein the iris map includes, for each source pixel, a threshold value for that source pixel to contribute to the output pixel value of the first pixel, and wherein the iris map manager identifies a minimum threshold value for each iris block of the plurality of iris blocks and stores the minimum threshold value for each iris block;
determining, by the blur manager of the lens blur rendering system, a weight for each source pixel from the input image in the iris blocks of the accumulation region when a maximum effective blur radius is larger than the minimum threshold value of the iris block based on a comparison of the minimum threshold value of the iris block and a maximum effective blur radius for each iris block of the accumulation region; and
generating, by the blur manager of the lens blur rendering system, an output pixel value for the first pixel by calculating a weighted sum of the source pixels from the accumulation region.
|