The invention provides a
bokeh effect rendering method and
system, and the method comprises the steps: obtaining a target physical
depth map corresponding to an original image for different input sources; performing image preprocessing on the original image and the target physical depth image to obtain a
color image, a depth image and camera parameters;
processing the
depth map in combination with the camera parameters, and calculating to obtain a CoC map; determining the texture information of the TileInfoMap sampling
radius in the CoC image, and determining the texture information of the TileInfoMap sampling
radius in the CoC image; and carrying out rendering by utilizing the
color image, the CoC image, the TileInfoMap sampling
radius texture information and DiapragmMap texture information input by a user, so as to obtain a result image with a
bokeh effect. According to the invention, the virtual quantity calculation which is closer to
physics is provided, the influence of physical parameters such as an aperture, a focusing distance, a lens
focal length and a picture on the virtual quantity is truly restored, meanwhile, the influence of the change of the lens
focal length on a
field angle is fully considered, and a vivid rendering effect is realized.