How to get rid of defocus node artifacts?
For best quality with the Defocus node, uncheck the &quot;Preview&quot; radio button.This will calculate slower, but give much better results.
Also, if you use the Depth buffer, the Defocus node can automatically use the Focus Distance of the active camera in the selected scene to calculate the blur.
See Blender's manual.