RDOC:
I want to use Gaussian Blur to create the depth of
field affect in a photo and want to know how to go
about doing it.
Images are flat in the sense that they do not
explicitly contain information about depth. There-
fore, in order to implement the depth of field
effect you will need to obtain/extract/generate a
depth-map that would define the object-lens distance
for each pixel. Given the emulated lens's focus dis-
tance, aperture and focus setting, you can then emu-
late this effect by blurring the image according to
the formulas outlined here:
http://en.wikipedia.org/wiki/Depth_of_field #Derivation_of_the_DOF_formulas
where the "circle of diffustion" is directly propor- tional to the radius setting of the blurring filter,
but you will also have to know/define your image's
dpi in order to convert between the radius in pixels
and that in real length units.
Anton