# Question about focusing in the lens? [duplicate]

I usually find, after blowing up my pic on the computer, that at one point (where I wished to focus) the image is very sharp, then as I inspect the picture I see that some more parts of the image, either horizontally or vertically, are in focus.

My confusion is that when we lock the focus at a certain point, is it that entire plane (both in the x and y directions) that is in focus? because I see most of the time (in Macro), that focusing is either horizontal or vertical or am I mistaken, because of minute differences in distance? E.g.,

                        (In focus)
|
|
(Not in focus )  ________|__________ (Not in focus or I have mistaken)
|
|
|
(In focus)


I understand the general statement that a higher F-number means a greater area of focus.

• I'm sorry; I think I understand but am not quite sure. Are you asking why objects which are the same distance from the camera ("Z" axis) might be more more less in sharp focus depending on their distance from the center of the frame? Keeping in mind that the frame is not square, are the top and bottom edges roughly comparable to the equivalent distance horizontally? If not, is the direction of the effect constant (with the same lens)? In your diagram, the issue appears to be symmetrical — is that the case, or is left or right worse? And finally, do you see the same effect with all lenses? Jul 11, 2011 at 10:05

The focus plane is parallel to the plane of the sensor (or film), unless you're using tilt lenses.

If you're finding that parts of your image that are expected to be in focus are in fact out of focus, then they must lie on a plane that is tilted with respect to the camera.

In macro photography this is common, because it is quite hard to orient the camera precisely parallel to the plane you wish to shoot. The depth of field is so small with macro lenses at 1:1, that shooting at a high aperture (f/22 or higher) mitigates this effect.

Not sure if I understood your question correctly, but if your photos have lines in one direction in focus but crossed lines at same distance out of focus, your lens suffers from astigmatic aberration - focal distances for the perpendicular lines are at different distances, which is caused by spherically asymmetrical or misaligned glass surfaces. Try another lens and see if the problem persists.

If you meant having a band of image in focus and adjacent areas out of focus, your lens is probably less corrected for field curvature aberration than you'd like - the lens projects a spherical image, but the sensor is flat. Along longer side of sensor, the difference may well exceed depth of focus and cause part of image be out of focus.

• +1: good references, well supported, with recognition of the distinction between real-world behavior and simplified idealized behavior of lenses. Jul 12, 2011 at 19:21

When pushing a lens to the absolute limits, as you would in macro shots with the aperture wide open, you will notice even the smallest defects in a lens. No lens is perfectly shaped and there will be some distortion, though on the most expensive lenses, any distortion should be extremely small.

Additionally any misalignment in your set up would show as you describe. If the subject plane is not absolutely parallel to the focal plane then you will get a focus pattern as you described, where the line of focus runs along the axis of the misalignment. Using precision made mounts for the camera and the subject, such as those found in microscopes, would allow you to ensure that subject, lens, and camera body are truly aligned.

Yes, the area that is on focus is a plane.

If you would take a picture of a wall, with the sensor exactly parallell to the wall, the entire wall would be in focus.

The DOF (depth of field), which is the depth of what's in focus, depends on the aperture (f-number) and the distance to the subject. In macro photo you are often very close to the subject, so you get a very narrow DOF.

When you have a narrow DOF, it's not easy to get the sensor plane parallel to what you want to catch in both x and y direction, so it's easy to get the effect where the DOF seem to be a horisontal or vertical band rather than a plane.

You have correctly described astigmatism, one of the 7 major aberrations of the lens. Your best focus will be about 2 f-stops stopped down from the maximum widest opening. Sorry to report that all we can do is mitigate these aberrations, we can't eliminate.