I am just post-processing some pictures I took last spring. On lots of them, I notice a halo around the edges of objects which are slightly outside the focused depth.
I shot without a tripod, with the Nikon 18-200 lens, but had stabilisation turned on. Maybe the problem is that the camera trembled in my hands while shooting, but the focused objects look sharp enough to me.
I don't think these can be removed in post processing, but if yes, I would like to hear how to do it. If not, I would like advice on how to avoid it next time I am shooting.
The whole image:
An edge sample at 100% scale. Note that the problem is present with the edges of the stem and the petals of the flower in the background, but not on the edge of the flower in the foreground.
The image has been through some heavy color post processing in raw, but no editing outside of that (especially no sharpening, which Google suggests as a common cause of edge halos).
Edit: to make it clear, because most answers seem to assume that I don't like the fact that the background is unfocused because it is outside of the DOF. I am aware that the petal which is outside of the focused depth will always be blurred. But I was expecting a more gradual blur, not this "second" edge. An example where there is blur but no halo:
This is from another photo taken in the same session. Again, there is a petal which is in focus and has no blur or halo, and a petal behind it. The second petal is outside of focus, so it is blurred as expected, but does not have this funny effect as in the first picture.