---
title: "Smartphone Camera Module Interactive Lab | Sandbox Physics"
description: "What do folding, autofocus and stabilization each do in a thin phone camera, and what can none of them fix?"
canonical_url: "https://sandboxphysics.com/labs/smartphone-camera-module/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/smartphone-camera-module/"
last_modified: "2026-10-27"
---

Optics 037 · Imaging, instruments, and visual systems

# Smartphone Camera Module

**What do folding, autofocus and stabilization each do in a thin phone camera, and what can none of them fix?** Folding the light path lets a long lens fit inside a thin phone. Autofocus slides the lens to the right distance, and lens-shift stabilization moves it sideways to cancel small hand shake. None of them can remove diffraction blur or the detail limit set by pixel size.

Build a wide, periscope or macro camera module with a fixed sensor. Autofocus moves the lens itself, and lateral OIS works together with an opaque folding mirror, a computed Airy exposure image, exact integration over pixels and signed motion transfer before sampling.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

The model uses an ideal thin lens at finite conjugates and incoherent tests at the image center at 550 nm with a circular pupil, integrated over one full sinusoidal shake cycle. It is not a commercial lens prescription or an actuator controller. Aberrations, Bayer processing, noise, rolling shutter and electronic cropping are not included.

Physics tutorial

## Audit the physics of Smartphone Camera Module

**Background** The sensor stays fixed and receives a real, inverted image. Autofocus moves the lens to change its distance from the sensor, following $v=\frac{fs}{s-f}$. The periscope turns the incoming light with one opaque mirror. The fold does not shorten the optical distance, and no light passes through the mirror.

**Why it matters** What do folding, autofocus and stabilization each do in a thin phone camera, and what can none of them fix?

Start with the essentials

- **Focus question**: What do folding, autofocus and stabilization each do in a thin phone camera, and what can none of them fix?
- **One-sentence intuition**: For small angular shake, shifting an ideal lens sideways cancels the image motion, leaving a residual of $A_{\mathrm{res}}=v\alpha_{\mathrm{pk}}(1-g)$. It cannot undo diffraction or recover information that coarse pixels have aliased. The image cards integrate over one complete shake cycle; the apparatus shows a snapshot at the peak.

### Core mathematical model

#### Focus at a finite distance and the field of view

$$
v=\frac{fs}{s-f},\quad m=-\frac{v}{s},\quad \theta_h=2\arctan\frac{w}{2v}
$$

For an object at a finite distance, the chief-ray estimate of the field of view uses the image distance, not the focal length. The lens moves while the 6.4 by 4.8 mm sensor stays fixed. Changing the aperture changes the real opening, not the curvature of the glass.

#### Folding the light path with a mirror

$$
\mathbf d_r=\mathbf d_i-2(\mathbf d_i\cdot\hat{\mathbf n})\hat{\mathbf n}
$$

The circular mirror has a finite size and turns the axial ray through 90 degrees. A ray that misses the mirror, is blocked by the lens aperture or falls outside the sensor stops where it is first rejected. The open wireframe marks the 8 mm thickness allowance; it is not an opaque phone case. The thickness reading includes the mounts.

#### Diffraction with the effective f-number

$$
N_{\mathrm{eff}}=\frac{v}{2a}=N(1+|m|),\quad d_A\simeq2.44\lambda N_{\mathrm{eff}},\quad \nu_c=\frac{1}{\lambda N_{\mathrm{eff}}}
$$

At 550 nm, the point image of a circular pupil, normalized to unit total flux, grows wider as the effective f-number rises. The diameter quoted is that of the first dark ring, not the pixel resolution. One fixed physical window and a square-root display gain keep the cards comparable; the card does not measure photon throughput.

#### Contrast transfer of a circular pupil

$$
H_{\mathrm{opt}}(t)=\frac{2}{\pi}\left(\arccos t-t\sqrt{1-t^2}\right),\quad t=\frac{|\nu|}{\nu_c}\le1
$$

In ideal incoherent imaging, the autocorrelation of the pupil gives this optical transfer, which is zero beyond the cutoff. The cyan MTF leaves out pixels and shake. The green curve includes them and plots the magnitude of their signed transfer.

#### Each pixel integrates light before it is sampled

$$
H_{\mathrm{pix}}(\nu)=\frac{\sin(\pi\nu p)}{\pi\nu p},\quad \nu_N=\frac{1}{2p}
$$

Each square pixel integrates the intensity over its area, and the result is sampled at the pixel center. Four independent test patterns, each an infinite sinusoid, use fixed frequencies and a fixed window. Above Nyquist a stripe pattern can pass for a lower frequency, so contrast that survives there is not recovered detail.

#### Lens-shift stabilization over one full shake cycle

$$
\delta(t)=gf\alpha_{\mathrm{pk}}\sin\omega t,\quad H(\nu)=H_{\mathrm{opt}}H_{\mathrm{pix}}J_0(2\pi\nu A_{\mathrm{res}})
$$

The residual image motion follows from how a shifted thin lens bends rays when the object is at a finite distance. Averaging the sinusoidal displacement over one full cycle gives the Bessel factor, and the images keep its sign. This is an ideal gain model, not a commercial actuator or an implementation of DeepOIS.

### Common difficulties

#### More pixels or perfect stabilization always means more detail

**Typical misconception** Shrink the pixels or turn the compensation up to full gain, and all the lost information comes back.

**Better mental model** Stabilization removes only the angular motion in the model. The optical cutoff stays, and sampling has its own limit. Real aberrations, Bayer processing, noise, rolling shutter and controller bandwidth are left out of this ideal model on purpose.

### Run the experiment

1. 01

   #### Scene 1: Compact wide module

   Compare the wide and periscope modules. Find the opaque fold mirror and follow the gold ray to the same fixed sensor. Change the focal length and watch both the geometry and the thickness.

   **What to observe:** All the hardware is drawn on one millimetre scale; only the incoming ray segment is shortened. The enlarged cards show tests at the center of the field, not photos of the whole sensor.

2. 02

   #### Scene 2: Opaque periscope fold

   Choose macro and change the object distance. Watch the lens carriage move and the effective diffraction scale change.

   **What to observe:** In the central test windows the circular pupil is not vignetted. Off-axis rays drawn for illustration may miss the finite fold mirror, and the wave cards do not claim accurate aberrations or vignetting over the full field.

3. 03

   #### Scene 3: Macro autofocus and OIS

   Keep the same shake and set the OIS gain to zero, then to one. Next change the aperture and the pixel pitch one at a time. Compare the point image, the held pixels and the Nyquist line.

   **What to observe:** The sampled tiles keep their mean intensity and the sign of the transfer. Exposure is not normalized automatically, so faint or aliased stripes are not boosted into what looks like resolved detail.

Physical conclusion

Autofocus, optical folding, diffraction, pixel integration, sampling and OIS each handle a different part of the problem. A sound camera-module model keeps their physical scales and limits separate.

Waves & optics · Starter path

## From one ray to interference measurement

Start with refraction, find where the ray picture stops working, then use interference to measure tiny distances.

[Start here → **Optical Boundary Explorer** Turn the incident angle and watch reflected and transmitted power trade off. Then switch to the critical-angle scene. Observe · 11 min](https://sandboxphysics.com/labs/optical-boundary-explorer/)

1. [1 Optical Boundary Explorer](https://sandboxphysics.com/labs/optical-boundary-explorer/)
2. [2 Rainbow Caustic Observatory](https://sandboxphysics.com/labs/rainbow-laboratory/)
3. [3 Camera Obscura](https://sandboxphysics.com/labs/camera-obscura/)
4. [4 Coherent Wave Composer](https://sandboxphysics.com/labs/coherent-wave-composer/)
5. [5 Young Double-Slit Bench](https://sandboxphysics.com/labs/young-double-slit-bench/)
6. [6 Michelson Precision Lab](https://sandboxphysics.com/labs/michelson-precision-lab/)

[View the full path →](https://sandboxphysics.com/topics/waves-and-optics/#starter-path)
