Photography: exposure, optics, and composition / personal lessonsLesson 6 of 12
Photography · Lesson 6

Trace focus and define acceptable sharpness

Follow rays from one object point to an image point, then ask what happens when the sensor misses it.

By the end: Distinguish optical focus, depth of field, motion blur, and output-dependent sharpness.

A lens forms an image at a distance

In the thin converging-lens approximation, object distance and focal length determine image distance. Rays from one object point converge at one image point. The image is inverted. Real camera lenses have several elements and moving groups; the model explains geometry, not the internal design of a particular lens.

If the sensor is ahead of or behind that convergence plane, the ray cone intersects it as a spot. The experiment moves a sensor plane to make this visible. Real focusing usually moves optical elements rather than letting you slide the sensor as shown. Distances in the diagram are millimeters in a deliberately close-focus example.

Locate convergence before judging the sensor

Start with the existing thin-lens example and give each distance a specific reference. The object is 240 mm in front of the lens plane. The focal length is 80 mm. For this real object beyond the focal point, image distance equals focal length times object distance, divided by object distance minus focal length. Multiply 80 by 240 to get 19,200 square millimeters. Subtract 80 from 240 to get 160 mm. Dividing gives 120 mm behind the lens, where rays from each object point converge.

The top of an object and its bottom have different convergence points. A ray through the ideal thin lens's center continues straight, so a ray from above the axis reaches below it behind the lens. That gives the inverted image. Similar triangles compare the distances 120 and 240, giving an image-height magnitude one half of the object height. A 60 mm object therefore makes a 30 mm image in this constructed example. Inversion describes optical geometry, not whether the displayed photograph appears upside down after processing.

Now move the object to 160 mm while keeping the same 80 mm lens. Multiplying 80 by 160 gives 12,800. The denominator is 160 minus 80, or 80, so convergence moves to 160 mm behind the lens. The distance ratio is now 160 divided by 160, or one. A 60 mm object has a 60 mm image. Moving the object nearer has pushed its sharp image farther behind the lens. A sensor left at 120 mm intercepts these rays before their convergence.

A nearer object forms its sharp image farther back

Object 240 mm; image 120 mmObject height 60 mmImage height 30 mmLensImageObject 160 mm; image 160 mmObject height 60 mmImage height 60 mmLensImage
Both coordinate directions use 0.75 drawing units per millimeter. The horizontal incoming ray refracts through the rear focal point; the central ray stays straight. Their crossing gives the inverted image. Thin-lens geometry only, with no aperture clipping, diffraction, or compound-lens calibration.

Contrast that with an object at 400 mm. The numerator is 32,000 and the denominator is 320, giving an image distance of 100 mm. If the sensor remains at 120 mm, it now intercepts rays after they have crossed. Both a nearer object and a farther object can therefore look blurred at one fixed focus setting, for opposite geometric reasons. The blur does not tell you by itself which side of the intended object distance contains the sharp plane. Inspect another known distance or change focus deliberately.

For very distant objects, image distance approaches focal length. With the object at 8,000 mm, the calculation gives 640,000 divided by 7,920, or about 80.81 mm. This explains the definition involving incoming parallel rays. Rays from a very distant point arrive almost parallel across the lens and converge near 80 mm. Compound camera lenses have effective optical reference planes and may move internal groups, so these paper distances cannot calibrate a real lens barrel or focus scale.

Use the numbers as a prediction exercise rather than a camera instruction. Put three object positions on paper at 160, 240, and 400 mm and match them to convergence distances of 160, 120, and 100 mm. Place a drawn sensor at 120 mm. Only the middle object has geometric point focus there. If you move the drawn sensor to 160 mm, the nearer object becomes focused and the others do not. The diagram isolates one mechanism while omitting aberrations, diffraction, sensor sampling, and actual focusing hardware.

One sensor plane does not focus every distance

Fixed sensor at 120 mm; f = 80 mmObject 400 mm100 mmObject 240 mm120 mmObject 160 mm160 mmLensSensor
Horizontal scale is two drawing units per millimeter behind the lens. Cone widths are schematic and equal at the lens. The fixed sensor cuts the far object's cone after convergence and the near object's cone before convergence. It meets the middle object's convergence exactly.

Depth of field requires a tolerance

For a fixed focus setting, other object distances form their sharp images at other planes. Their spots may still be small enough for the intended output. A circle of confusion is a chosen blur-diameter criterion; it is not a universal property of human vision or a sharp boundary in the scene.

Stopping down narrows the cone and reduces geometric defocus. Changing focus distance and enlargement changes the acceptable range too. Hyperfocal distance is a calculation based on a chosen blur criterion: focusing there makes infinity just acceptable under that criterion. It does not make every distant object perfectly focused.

Turn cone width into an output criterion

The amount of geometric defocus depends on the pupil as well as the misplaced image plane. In the model, a cone begins with diameter 40 mm at the lens and narrows to zero at 120 mm. At a sensor distance of 100 mm, it still has 20 mm left before convergence. Similar triangles give a width of 40 times 20 divided by 120, or about 6.67 mm. At 140 mm, the rays have crossed and spread to the same width because the distance from convergence is again 20 mm.

Narrow the pupil to 20 mm without changing the lens, object, or sensor positions. Both widths halve to about 3.33 mm. Convergence stays at 120 mm because restricting the cone does not move its ideal meeting point. This is the geometric reason stopping down makes some focus errors less visible. It does not move every object's sharp image onto the sensor. The object at 400 mm still converges at 100 mm, even when its spot elsewhere shrinks.

A chosen maximum spot diameter translates that continuous geometry into an acceptable interval. For a deliberately generous teaching threshold of 2 mm and a pupil of 40 mm, the allowed plane error is 2 divided by 40, then multiplied by 120, giving 6 mm. The sensor could lie between 114 and 126 mm for this one object's cone. With a 20 mm pupil, the same calculation allows 12 mm of error, from 108 to 132 mm. This interval concerns sensor-plane placement, not yet a range of subject distances.

A narrower cone gives a wider placement tolerance

Pupil 40 mmConvergence: 120 mmAllowed plane error: ±6 mmSpot threshold: 2 mmPupil 20 mmConvergence: 120 mmAllowed plane error: ±12 mmSpot threshold: 2 mm
Both axes use two drawing units per millimeter. Dashed lines locate sensor positions where each cone is 2 mm wide. The region between them meets that chosen geometric threshold for this one object. This is image-plane tolerance, not a subject-distance depth-of-field scale; diffraction is excluded.

Depth of field instead holds the sensor and focus setting fixed and asks which object distances produce spots below a chosen threshold there. Different objects have different convergence distances, so their cones must be evaluated separately. A threshold labels some spots acceptable without making them identical. An object exactly at focus has zero geometric defocus in the ideal model, while an object near a depth-of-field boundary already uses nearly all the allowed blur. Wave optics and aberrations prevent even the focused point from becoming an infinitely small physical dot.

Output enlargement sets a stricter or looser practical threshold. Suppose a recorded spot is 0.02 mm wide on a sensor, and the image is enlarged ten times in each direction for a print. The spot becomes 0.2 mm wide. At twenty times enlargement it becomes 0.4 mm. If the chosen viewing condition accepts no more than 0.25 mm, the first print passes that geometric criterion and the second fails. This tolerance is an assumption, not a universal boundary of eyesight.

Cropping can raise enlargement even when the final print size stays fixed. A 20 mm-wide sensor region printed 200 mm wide enlarges ten times. Cropping to a 10 mm-wide region and still printing 200 mm wide requires twenty times enlargement. The same captured blur doubles in output size. You cannot judge that change by aperture alone. For practice, predict whether the 0.02 mm spot passes the stated 0.25 mm criterion in each crop. It passes the wider region's output and fails the tighter crop's output.

The same recorded spot changes size with enlargement

10× enlargement20 mm region to 200 mmSpot: 0.2 mm in outputPasses 0.25 mm criterion20× enlargement10 mm crop to 200 mmSpot: 0.4 mm in outputExceeds 0.25 mm criterionGold ruler = 0.25 mm; 200 drawing units / output mm
Circles and rulers share a scale; they enlarge the tiny output spots for inspection rather than mimic a print viewed normally. The 0.25 mm acceptance criterion is stipulated. Actual visibility also depends on viewing distance, contrast, eyesight, sampling, and other optical blur.

Work through the mechanism

1. Thin-lens relation
1f=1u+1v

All distances are positive millimeters for this real-object, real-image case. The object lies beyond the focal point.

2. Locate convergence
v=80×240240−80=120 mm

An 80 mm thin lens focuses this object 120 mm behind the lens.

Place the sensor in the ray cone

ObjectThin lensFocus point: 120 mmPupil diameter: 40 mmSensor

Geometric spot diameter: 0 mm.

One drawing unit per millimeter in both directions. Rays from the object tip converge below the axis, so the image is inverted. Red marks the cone width at the sensor. The pupil choice keeps the current sensor position; narrowing it reduces geometric blur away from focus. All controls replace assumptions immediately. Moving the sensor is a geometry experiment, not an instruction for operating your camera. Diffraction, aberrations, and close-focus exposure corrections are omitted.
Object distanceFocal lengthImage distance
240 mm80 mm120 mm
The reciprocal lens equation gives 1/120 = 1/80 − 1/240. This is a thin-lens geometric example, not a focus-scale calibration.

Choose focus for more than one distance

Use the same 80 mm thin lens for a near object at 240 mm and a far object at 400 mm. Their sharp image planes are 120 and 100 mm behind the lens. Suppose the sensor is fixed at 110 mm and pupil diameter is 20 mm. The near object's plane error is 10 mm, so its spot is 20 times 10 divided by 120, or about 1.67 mm. The far object's spot is 20 times 10 divided by 100, or 2 mm. Equal plane errors do not quite give equal blur.

Under a deliberately loose 1.9 mm threshold, the near object passes and the far object fails. A sensor position halfway between the image planes is therefore not automatically a balanced solution. At 109 mm, the near spot becomes 20 times 11 divided by 120, about 1.83 mm. The far spot becomes 20 times 9 divided by 100, or 1.8 mm. Both now pass. These large close-focus spots illustrate geometry, not acceptable camera images.

The balanced sensor position is about 109.09 mm. The near object's error is about 10.91 mm, and the far object's is about 9.09 mm. Dividing these by their respective convergence distances gives about 0.0909 in both cases. Multiplying by the 20 mm pupil gives matching spots near 1.82 mm. This balances geometric defocus for these two objects only. It excludes other objects, motion, and aberrations. A practical focus decision must consider which subject distances and output details actually matter.

Balance spots using their different cone slopes

Sensor plane behind lensNear object at 240 mm, convergence 120 mmFar object at 400 mm, convergence 100 mmBoth meet 1.9 mm criterion?
110 mm1.67 mm spot2.00 mm spotNo
109 mm1.83 mm spot1.80 mm spotYes
109.09 mm, approximately1.82 mm spot1.82 mm spotYes
Fixed 20 mm pupil and 80 mm thin lens. Spot diameter is pupil diameter times plane error divided by convergence distance. Equal absolute plane errors do not give equal spots because the cone slopes differ. These intentionally large tolerances are not photographic sharpness recommendations.

A smaller pupil provides another option. At the original 110 mm sensor position, a 10 mm pupil gives spot diameters about 0.83 and 1 mm. Both easily pass the invented 1.9 mm threshold. But halving pupil diameter quarters its area, so it loses two stops of ideal collection at unchanged time and light. Restoring collection by making exposure four times longer may add motion blur. Restricting the pupil also increases diffraction spread. The geometric model does not include those costs in its displayed spot diameter.

A focus stack takes a different approach. Imagine a stationary arrangement with one frame focused for the near detail and another for the far detail. A merge can select sharper regions from each rather than demand one focus setting cover everything. It requires suitable software and enough overlap, neither assumed here. Objects can change apparent size during refocusing, and regions hidden behind foreground edges may have no clean match. Moving leaves, changing reflections, and subject motion can create seams. A stack is not a universal substitute for depth of field.

For a paper planning task, give the near object priority and ask whether the far object must remain readable or merely recognizable. If both must meet the chosen threshold, compare shifting the focus balance with narrowing the pupil. The first option redistributes defocus; the second reduces geometric spots while spending collection and diffraction tolerance. If only the near detail matters, accepting far blur can avoid unnecessary compromises. The exact sensor movements belong to this experiment. A real camera generally changes optical groups to achieve its focus setting.

Focus changes redistribute or reduce geometric blur

Paper choiceNear / far spotsCollection at unchanged timeWhat remains unresolved
20 mm pupil, sensor at 110 mm1.67 / 2.00 mmBaselineFar spot exceeds chosen threshold
20 mm pupil, sensor at 109.09 mmAbout 1.82 / 1.82 mmUnchanged pupil areaOther distances and non-geometric blur
10 mm pupil, sensor at 110 mm0.83 / 1.00 mmOne quarterDiffraction increases; longer compensating time may blur motion
Separate focus settings, then mergeChoose focused regions from separate framesMultiple capturesAlignment, changing scale, occlusion, movement
Only the first three rows use the single-frame geometric calculation. Restoring the last pupil change's collection requires four times the time at fixed light and transmission. Stacking is a possible workflow, not an available control in the model or a required device capability.

Diagnose before sharpening

Autofocus selects a target and estimates a setting. It can choose the background, lag behind motion, or fail on low contrast. Single-focus modes often hold a setting, while continuous modes attempt to follow change. Names, tracking performance, and phone portrait-depth effects vary by device.

Inspect where detail is sharp. A sharp background behind a soft face suggests a focus-target problem; directional smears suggest motion; broad softness at a very small aperture can include diffraction. Sharpening increases local edge contrast but cannot generally reconstruct missing fine structure. Test with a stationary textured subject before blaming the lens.

Use evidence to distinguish kinds of softness

Start diagnosis with the distribution of detail rather than a sharpness slider. Suppose a face is soft but writing on a wall behind it is crisp. That supports the possibility that focus landed behind the face. It does not prove it, because the face might have moved while the wall stayed still. Look at the shape of blurred edges and compare repeated captures. A directional double edge suggests movement more than a simple geometric spot, but real lens blur and processing can complicate the shape.

A stationary subject helps separate those hypotheses. If safe and available, support the camera and photograph a textured object with another textured object farther behind it. Keep lighting and framing stable. Select the nearer target if the device allows it, then compare which plane looks sharper. A tap may select focus, exposure, or both. It need not lock either. If there are no focus controls, repeated pictures of a stationary scene can still show whether softness is stable or changes between captures.

A sensor samples the optical pattern at discrete locations rather than recording continuous detail. A projected line narrower than one sample spacing may appear inconsistently depending on where it falls. A repeated fine grid can produce false larger patterns rather than a faithful record of every line. Better geometric focus does not remove this sampling limit. Increasing output dimensions afterward adds interpolated values, not independently measured positions. The target must contain detail broad enough for the recording and delivery process to represent reliably.

A sharp region is evidence about the cause

Observed comparisonHypothesis supportedUseful discriminating comparison
Wall writing crisp, face softFocus behind face, or face movementStationary near target; inspect edge direction
Background and face both directionally smearedCamera movement is plausibleSupport camera; retain scene and framing
Near texture sharper after target selectionFocus setting may have changedCheck exposure and movement also stayed comparable
Fine grid becomes false broad stripesSampling or resizing artifact is plausibleCompare subject scale and original-size samples
These observations narrow possibilities; none is a unique proof. A focus/exposure tap can change several settings, and computational processing may add further differences. The tests require only capabilities the device actually offers.

Sharpening changes edge contrast. In a constructed five-sample edge, values of 0, 25, 50, 75, and 100 describe a gradual transition. An operation might replace them with 0, 10, 50, 90, and 100, making the transition appear steeper. That does not identify whether the original scene had one thin line, two close lines, or a broad edge before optical blur. Strong sharpening can also produce bright and dark halos. Contrast improvement and recovery of a specific missing structure are different claims.

Diffraction and motion require different next tests. If a static supported scene becomes softer only at very small openings, diffraction is one plausible contributor, alongside changed time, vibration, and lens behavior. If a hand smears while the supported background remains clear, reducing subject movement or exposure time is more relevant than refocusing the wall. If every depth looks similarly soft, check the output scaling and recording limits too. Changing several controls together can leave the cause unresolved. Isolate the suspected mechanism where possible.

Finish by defining success at the intended destination. Choose a visible requirement such as readable lettering at a specified displayed size, rather than maximum crispness at unlimited magnification. Compare a full view and an enlarged crop of the same file. If only the crop looks soft, the capture did not change; enlargement exposed existing limits. Without a camera or editor, use the edge samples to explain why greater contrast does not prove newly recovered detail. Record which evidence favors focus error, motion, or sampling, and which alternatives remain plausible.

Stronger edge contrast does not identify missing structure

Linear teaching values, not a camera sharpening algorithmRecorded transition10000255075100Sample positions 1 through 5Contrast increased10000105090100Sample positions 1 through 5
Both plots use the same axes, with one sample every 60 horizontal drawing units and 1.5 vertical units per value unit. Connecting lines aid comparison; only five discrete values are specified. The edited profile is steeper, but neither profile determines whether the scene contained finer separate lines before blur and sampling.

Exercises

Predict geometric blur

A ray cone has diameter 40 mm at the lens and converges 120 mm behind it. The sensor is at 160 mm. What blur diameter does similar-triangle geometry predict?

Hint

The plane misses convergence by 40 mm, one third of the lens-to-image distance.

Worked answer
ObjectThin lensFocus point: 120 mmPupil diameter: 40 mmSensor
The sensor lies 40 mm behind convergence; the ray cone has widened again.
QuantityValue
Pupil diameter40 mm
Relative plane error40/120
Geometric spot diameter13.33 mm
This is a cone cross-section, not a real camera blur measurement.

The diameter is 40 × 40/120 = 13.33 mm. This large constructed example makes the geometry visible. A smaller pupil would reduce this geometric blur, while diffraction and real lens aberrations are omitted.

Sharp in a thumbnail

An image looks sharp as a thumbnail but soft in a large crop. Must the autofocus have changed?

Hint

The same recorded spot is enlarged differently.

Worked answer
Viewing conditionSame recorded blur
Small thumbnailMay be unnoticeable
Large cropMore visibly enlarged
Acceptable sharpness depends on how the image is used.

No. The capture can be identical. Enlargement makes existing blur occupy more of the viewed image, so it may exceed the acceptable criterion. Assess at the intended output size and distance, then distinguish defocus from noise, motion, and limited sampling.

Sources and further reading

The lessons and answers stand alone. These optional secondary references explain the optics and imaging concepts. Numerical examples are constructed, not measured camera specifications. Visual judgments depend on the intended image; the course does not claim a universal aesthetic score.

  • Depth of field

    Acceptable blur criteria, viewing conditions, and focus geometry. No universal circle-of-confusion value or camera-specific depth scale is assumed.

  • F-number and entrance pupil

    Definitions, light per unit area, transmission limits, and diffraction. Selected passages checked; the illustrations here are original geometric constructions.

  • OpenStax University Physics: thin lenses

    Selected textbook passages on real-image geometry, the thin-lens equation, and inverted magnification checked during revision. These approximations are not a model of a particular compound camera lens.