Yingsi Qin · Aswin C. Sankaranarayanan · Matthew O'Toole
📖 逐段精读 · 笔记
从 Abstract 起逐段精读(批量精读初稿,供后续 review/深化)。基于 CVF 官方 PDF 全文。最后更新 2026-06-21。
① Abstract(摘要)— 逐句精读
原文逐句引用 + 中文指路:
1) "A lens brings a single plane into focus on a planar sensor; hence, parts of the scene that are outside this planar focus plane are resolved under defocus." → 痛点起点:普通镜头只能让单一焦平面在平面传感器上清晰,平面外景物 defocus 模糊。
2) "Can we break this precept by enabling a 'lens' that can change its depth of field arbitrarily?" → 核心追问:能否造一个任意改变景深(DoF)的"镜头"?
3) "Our design uses an optical arrangement of a Lohmann lens and a phase-only spatial light modulator to allow each pixel to focus at a different depth." → 硬件方案 = Lohmann lens + 纯相位 SLM,让每个像素聚焦于不同深度。
4) 算法:"We extend classical autofocusing techniques to the spatially-varying scenario where the depth map is iteratively estimated using contrast and disparity cues, enabling the camera to progressively shape its depth-of-field to the scene's depth." → 把经典自动对焦扩成空间可变版,用对比度(contrast) + 视差(disparity)线索迭代估深度图,渐进把景深"塑形"贴合场景几何。
5) 两大优势:"the ability to bring an entire scene in focus simultaneously, and the ability to maintain the highest possible spatial resolution." → 整场景同时清晰 + 保持最高空间分辨率;且关键 "By obtaining an all-in-focus image optically"——光学一次成像得到 all-in-focus,无需后处理。
一句话抓 Abstract:用 Split-Lohmann 计算镜头(Lohmann lens + 相位 SLM)让每像素聚焦不同深度,配空间可变 CDAF/PDAF 迭代估深度并塑形景深——光学直接拍出 all-in-focus,无需算法后处理且保大光圈/高分辨率。这是 all-in-focus 成像解空间里的一个全新类别。
📚 背景知识 A — 焦平面 / 景深 / 光圈-衍射 trade-off(外部)
焦平面与 defocus:镜头的聚焦能力只对场景中单一平面有效,主体须置于该焦平面(固定深度)才清晰;偏离焦平面的点变模糊,且 "the amount of defocus increases progressively as the points move further away from the plane"。
光圈 trade-off:缩小光圈(aperture)能减少 defocus、增大景深,但代价是 "reduced light throughput"(进光量减少) 且 "smaller apertures increase diffractive blur, making content within the depth of field less sharp"(小光圈反而引入衍射模糊,景深内也不够锐)。传统镜头只能移动焦平面(对焦环)、不能改变其"形状"——本文要把单一焦平面变成可适配任意场景几何的焦曲面(focal surface)。
📚 背景知识 B — Lohmann/Alvarez lens & cubic phase plate(外部,理解式1必备)
Lohmann/Alvarez lens:一种 focus-tunable lens,由两片可横向平移的 cubic phase plate(三次相位板)组成。设两板光学轮廓 \( h_1(x)=\alpha x^3 \)、\( h_2(x)=-\alpha x^3 \)(α 是曲率相关参数),横向偏移 ∆ 叠加后相位调制为 式1:\[ h_1(x+\Delta) + h_2(x-\Delta) = \alpha\left(6\Delta x^2 + 2\Delta^3\right) \] 忽略与 x 无关的常数项 \( 2\alpha\Delta^3 \),剩 x 的二次相位 \( 6\alpha\Delta x^2 \)=一个透镜,其焦距反比于平移量 ∆。即改变 ∆ 就得到不同焦距的镜头(Fig.2)。这是"机械可调焦"的经典原理。
📚 背景知识 C — CDAF vs PDAF / DP sensor / diopter(外部,理解§4必备)
diopter(屈光度):深度的倒数,对焦工作范围用 diopter 度量(线性扫描 diopter 比线性扫描深度更均匀)。CDAF(对比度检测自动对焦):"adjusting the focus settings of the lens until the camera detects the highest contrast"——调焦到局部对比度最大即合焦,数码相机主流方案,可用 hill-climbing 加速。PDAF(相位检测自动对焦):依赖 DP(dual-pixel)传感器——每个微透镜下有 2 个子像素,分别接收来自光圈不同半边的光,等效小基线立体对。"When a scene point is in focus, the two images captured by the corresponding sub-pixels match. Otherwise, disparity is introduced"——合焦时两子像素图重合、离焦则有带符号视差,视差符号+大小决定该点该往哪调焦。本文把这两招都扩成逐区域并行的空间可变版。
📚 背景知识 D — All-in-Focus 技术全景(Tab.1 七类对比 + 本文定位)
原文 Tab.1 横向对比(光学锐度 / 所需图像数 / AIF 生成方式 / 是否输出深度):
| 方法 | 光学锐度 | 所需图像数 | AIF 生成 | 输出深度 |
| 小光圈 small aperture | low | one | optical | no |
| cubic phase plate[9] | low | one | deconvolution | no |
| focal sweep[16,22] | low | one | deconvolution | no |
| focal stack[23,35] | high | many | contrast metric | yes |
| coded aperture | low | one | depth-dep. deconv. | yes |
| light field cameras | low | one | contrast metric | yes |
| dual-pixel deblurring | low | one | hard inverse problem | yes |
| spatially-varying autofocus(ours) | high | two | optical | yes |
读表(本文独特性):大多数方法要么用小光圈(增衍射模糊)、要么故意制造 depth-invariant blur 再 deconvolution(锐度 low);focal stack 锐度 high 但要很多张图且不耐动态。本文是唯一同时做到"光学锐度 high + 仅需两张图 + 全光学生成(no post-processing) + 输出深度"的方案。原文 "our method requires at least one image to approximate the scene geometry, and a second image to form the all-in-focus image",且 "well suited for dynamic settings, where each frame determines the focus for the next frame"(适合动态:每帧给下一帧定焦)。
② §1 Introduction — problem(单焦平面 vs 任意焦曲面)
problem:原文 "Core to any imaging system is the lens ... The focusing ability of a lens, however, only applies to a single plane in the scene."。缩光圈增景深的老路 "comes at the cost of reduced light throughput" 且 "smaller apertures increase diffractive blur"。根因 "These restrictions on focus are attributed to the traditional design of a lens, which offers the ability to move the focal plane ... but maintains its shape."——传统镜头只能平移焦平面、不能改变其形状。
核心提问:原文 "in place of a single focal plane, is it possible to optically program a focal surface that can adapt to any scene geometry?"——能否光学编程一个适配任意场景几何的焦曲面?
② §1 Introduction — solution(Split-Lohmann 计算镜头)
solution:原文 "This paper advances the design and implementation of a computational lens capable of spatially-varying focus—one that allows a scene in its entirety to be simultaneously in focus on an image sensor even when the scene is highly non-planar."。技术根基是改造 Lohmann lens:原文 "Prior work by Qin et al. [28], in the context of near-eye virtual reality (VR) displays, has shown that a rearrangement of the Lohmann lens, along with the use of a phase-only spatial light modulator (SLM), can control the perceived depth of pixels on a display. Our work extends this concept to the imaging scenario."——把 Qin et al.[28] 在 VR 显示里的 Split-Lohmann(控制显示像素感知深度)反向用到成像,给相机前所未有的对焦控制力。
② §1 Introduction — why + 两大贡献
贡献一 · 光学 AIF 成像:原文 "the ability to acquire an optical AIF image given knowledge of the scene depth ... unlike prior work in all-in-focus imaging, our imaging process does not require computational post-processing."——给定场景深度即可光学把所有点同时清晰成像,无需后处理(这是与所有前作的根本区别)。
贡献二 · 空间可变自动对焦:原文 "we extend traditional ideas in contrast- and phase-based autofocus to their spatially-varying counterparts. We show that our system can progressively bring the entire scene into focus using as few as two images."——把 CDAF/PDAF 扩成空间可变,最少两张图渐进合焦,"matching the quality and depth resolution of the focus stacking without requiring a large image set"(媲美 focal stacking 质量却不用大量图)。
诚实限制(Intro 即给):"Our current optical prototype is light inefficient ... at most one-eighth of the incident light reaches the sensor, due to light passing through a polarizer once and through a 50/50 beamsplitter twice."(光效率低,最多 1/8 光到传感器)。
③ §3 Split-Lohmann 计算镜头(去机械化 + 局部选择性,式1)
第一步 去机械平移:原文 "it achieves a programmable focus-tunable lens by collocating the two cubic phase plates of the Lohmann lens using a 4f relay and placing a phase ramp at the Fourier plane whose slope controls the effective focal length."——用 4f relay 把两片 cubic plate 光学共置,在 Fourier 平面放一个 phase ramp(相位斜坡),其斜率等效式1里的平移量 ∆、从而控制有效焦距。这样把"机械平移调焦"变成"改 SLM 相位图案调焦",无运动部件。
第二步 空间选择性:原文 "We can optically collocate an image sensor with the SLM. Since each pixel on the sensor is resolved on the SLM, displaying a spatially-varying phase ramp allows local focus control."——把图像传感器与 SLM 光学共置,传感器每个像素都对应 SLM 上一点,于是显示空间可变的 phase ramp 即可逐像素/逐区域独立控焦——这正是 spatially-varying focus 的硬件来源。
③ §3 关键反转:从 VR 显示到相机成像
反转思路:Split-Lohmann 原本是 VR 显示器(Qin et al.[28])——OLED display 发光、经该光学系统让观看者感知到不同深度的像素。本文 "propose inverting the function of this optical system, by replacing the OLED display with a camera sensor and adding a camera lens. The result is a Split-Lohmann computational lens that now offers a camera the ability to spatially-vary its focus."——把OLED 显示屏换成相机传感器并加成像镜头,整个光路反向运行,就从"显示不同深度"变成"对不同深度对焦"。这是把显示器件的物理对偶性巧妙迁移到成像的核心 insight。
④ §4.1 空间可变 CDAF(对比度 unimodal + 二分搜索)
核心 insight:原文 "contrast of a patch as a function of depth is often smooth and, more importantly, unimodal."——某 patch 的对比度作为深度的函数平滑且单峰,故可用类二分的搜索高效定位峰值。
二分搜索流程:设对焦总工作范围 0~W diopters,取焦距在 \( \tfrac{W}{4},\tfrac{W}{2},\tfrac{3W}{4} \) 的三张图,估每个 local patch 的对比度,取三者中对比度最大的位置,把范围对半缩小居中于该峰值。"if the maximum value occurs at W/4, then the true maxima must be between the 0 and W/2 diopters."。每轮范围减半、迭代 → 图像数对数级(vs 线性搜索)。关键:所有 patch 并行独立搜索(靠空间可变对焦)。
脚注诚实点:理论上每轮两图够(中心焦距可复用上轮),但本文的 patching 策略使复用复杂化,故仍重拍中心焦距(每轮三图)。
④ §4.1 CDAF 的 Patching 策略(SLIC superpixel)
为何要精心分块:原文 "we would like each patch to have minimal depth variations and especially avoid depth discontinuities, so that a single focus setting suffices for all pixels in the patch."——每个 patch 内深度变化要小、避免深度不连续,否则单一焦距无法让整块清晰。
怎么做:用 SLIC(k-means 聚类的 superpixel 分割)分块,因为 "depth edges invariably align with texture edges"(深度边总与纹理边对齐),按 superpixel 分块能天然避开大深度跨度。原文 "We update the superpixels after each autofocus iteration to benefit from the improved sharpness"——每轮迭代后用更清晰的图重算 superpixel,从而更精细地分深度边界;若更新后的 superpixel 含先前不同深度的像素,则取该 superpixel 内最常见(对比度最大)的深度。
④ §4.2 空间可变 PDAF(DP 视差 + 光流求解)
原理:DP 传感器每微透镜下 2 光电二极管,分接光圈不同部分→ stereo pair。原文 "The disparity observed across the two images determines the (signed) distance of the scene point from the focal plane ... When a scene point is sharply focused on the sensor, there is no disparity."——视差大小+符号给出该点离焦平面的带符号距离,合焦时零视差。
求解:原文 "we adapt the conjugate gradient-based optical flow solver by Liu [20]. From the magnitude and direction of optical flow, we can calculate the focus correction needed to bring each region into focus, thereby enabling a single-shot approach."——用 Liu[20] 的共轭梯度光流求解器解 signed disparity,由光流大小+方向算每区域的 focus correction,实现单张图对焦全视野。
④ §4.2 PDAF 深度边界难题(SegmentAnything 分层光流)
难题:原文 "since disparity in a stereo configuration is always horizontal ... much of our disparity estimation is driven by pixels with strong vertical gradients."。在深度边界处(常有强纹理梯度),"all we can observe is the relative shifts between the patches on either side of the boundary, and we cannot—just with local context—identify the exact shifts for each."——只能看到边界两侧的相对位移,无法仅靠局部上下文定出各自的绝对位移。
解法:原文 "we segment the total DP image using SegmentAnything [14] into masked labeled regions (layers), independently compute the masked optical flow for each layer, and sum all layers into a result flow map."——用 SegmentAnything 把 DP 图分成语义层(layers),逐层独立算 masked 光流,再求和成最终 flow map 驱动下一轮对焦。
④ §4 CDAF vs PDAF 权衡(何时用哪个)
PDAF 优点(原文):"Unlike CDAF, which requires a search procedure to identify the sharpest focus setting, PDAF requires a single image to identify the spatially-varying focus map; this allows it to adapt to scene dynamics and is less likely to get stuck in local minima."——单图、适应动态、不易陷局部最小。即使工作范围大、大 disparity 区 defocus 严重导致视差估计劣化,"as long as the sign of the disparity is accurate, the technique converges within a few steps"(只要视差符号对,几步收敛)。代价:需 DP 专用传感器。
CDAF 优点:可在大多数成像系统上实现(不需特殊传感器);合焦后只需低成本地随时间精修焦曲面适应动态(远比重拍整个 focal stack 便宜),但需多次拍摄搜索。
⑤ §5 原型硬件(Prototype 配置)
关键器件(原文逐一):DP 图像用 Canon R10 相机传感器(分辨率 6000×4000、pixel pitch 3.72 µm,是 dual-pixel 传感器,供 PDAF),用 gphoto2 命令程控取 raw、LibRaw 库提 DP views;相位调制用 Holoeye GAEA-2 Phase-Only SLM(pixel pitch δ_SLM=3.74 µm、分辨率 4160×2464);cubic phase plate 用 subtractive laser etching(减材激光刻蚀)定制;relay lens 为三片 Samyang 85 mm f/1.4 AS;objective lens 为 AF-S DX Micro NIKKOR 40mm f/2.8G;beamsplitter Thorlabs CCM1-BS013。PSF(Fig.6):对针孔点光源在 0.89D~16.02D 多个距离成像,SLM 空间频率 v 从 -0.200 到 0.200,dot 为 10×10 像素(37.2µm×37.2µm)。
⑤ §5 Freeform 景深摄影(超越 AIF 的创意应用)
空间可变对焦解锁的创作能力:① tilt-shift 摄影——原文 "we can perform tilt-shift photography without requiring a Scheimpflug adapter to tilt the plane of focus"(无需 Scheimpflug 适配器即可倾斜焦平面,Fig.7);② 选择性对焦——"selectively focus on isolated regions at different depths, while the rest of the scene remains defocused"(只让指定区域清晰、其余 defocus);③ 细结构抹除(Fig.8)——"suppress the presence of thin structures from a photo by optically defocusing only those particular pixels"(对细线网格等只光学 defocus 那些像素,使其几乎不可见,靠"选一个远离其真实深度的焦距")。这些过去只能后处理实现,现可光学一次完成。
⑤ §5 AIF 定量评测 & 空间分辨率(MTF)
评测协议:6 个场景(Adventure, Planes, Flowers, Bunny, Ship, Rainbow)。GT 构造:原文 "we capture a dense focal stack with 69 depth planes, with each focus setting having 2 repeated captures averaged to reduce noise" → 合成 computational AIF 作 ground truth。指标 PSNR/SSIM(Fig.11,Adventure+Rainbow 平均,作为拍摄张数的函数)。对比张数:contrast-based 3 steps(10 photos)、phase-based 3 steps(4 photos)、focal sweep(1 photo)、focus stacking computational/optical(20 photos);Planes 另加 small aperture(f/36, 55mm Nikon Z5 长曝光)。
结论:"we observe phase-based autofocusing having the best performance, followed by both contrast-based autofocus and capturing a focal stack."——phase-based 最优,contrast-based 与 focal stack 次之。MTF(Fig.12,三深度 USAF 靶标):phase/contrast/optical focal stack 都与 computational focal stack comparable,而 focal sweep 一致更差。即本文方法以远少的图像数达到 focal stack 级锐度。
⑥ §6 Discussion(光圈 / 光效率 / 像差修正)
光圈与光通量:原文 "our prototype imaging system has a rest state f number of f/6.8 (i.e., the slope of the phase ramp is 0).";加 phase ramp 时 cubic plate 光学平移 → 有效光圈变小、改变 bokeh 形状并减面积。"At the most extreme focus settings, we calculate that light throughput is 76% when compared to the system in the rest state."——最极端对焦时光通量降至静止态的 76%。原文指出 f-number 取决于 cubic phase plate 的直径与曲率,"we can increase the light throughput by using a cubic phase plate with a large diameter"。
像差修正方向:可借端到端光学设计(Sitzmann et al.[32]、Sun et al.[34])联合优化镜头与 SLM 图案,或用 Yang et al.[43] 的可微 ray-wave 模型优化 hybrid refractive-diffractive phase plate,以修正 chromatic focal shift、深度不连续处伪影、f-number 等。
📌 全文一页总结(problem → method → experiment → takeaway)
problem:传统镜头只能让单一焦平面清晰、且只能平移不能改变焦面形状;缩光圈增景深又带来进光减少+衍射模糊。能否光学编程一个适配任意场景几何的焦曲面,让整个非平面场景同时清晰?
method:① 硬件——把 Qin et al.[28] 的 Split-Lohmann 显示镜头反转用于成像(OLED 换相机传感器+加镜头),靠 Lohmann lens(式1,焦距∝1/∆) + 4f relay + Fourier 面 phase ramp + 纯相位 SLM,实现逐像素独立控焦;② 算法——把 CDAF(对比度单峰→二分搜索 W/4,W/2,3W/4,SLIC superpixel 分块)与 PDAF(DP 视差→Liu 光流求解,SegmentAnything 分层解深度边界)扩成空间可变版,迭代估深度图并塑形焦曲面,最少两张图。
experiment:原型用 Canon R10 DP 传感器(6000×4000)+Holoeye GAEA-2 SLM(4160×2464)+定制 cubic phase plate;6 场景 AIF,GT 取 69 面 dense focal stack;phase-based(4 photos) 最优、contrast-based 与 focal stack 次之,MTF 与 computational focal stack comparable 而 focal sweep 最差;还能做 tilt-shift、选择性对焦、细结构光学抹除。
takeaway:① "光学直接拍 all-in-focus"——首个无需后处理、保大光圈/高分辨率、仅需两张图、还输出深度的 AIF 方案(Tab.1 独此一类);② 把显示器件(Split-Lohmann)反转成成像器件是优雅的物理对偶迁移;③ 经典 CDAF/PDAF 在空间可变硬件上"逐区域并行"即可解 spatially-varying autofocus,系统可视为"光学的图像对比度优化器";④ 应用前景:长距监视、机器视觉、显微。
🧐 疑问 / 局限(含 [推测])
① 光效率低是硬伤——偏振相位调制 + beamsplitter 致最多仅 1/8 入射光到传感器(过偏振器一次 + 过 50/50 beamsplitter 两次),弱光/高速场景受限,原文已诚实承认;② 极端对焦时光通量降到 76% 且有效光圈/bokeh 随对焦改变,[推测] 这会让不同深度区域的景深/虚化不一致,可能影响美学一致性;③ 定量评测仅 Adventure+Rainbow 两场景的 PSNR/SSIM 平均(Fig.11),其余场景为定性,[推测] 样本偏少;④ [推测] 依赖 SegmentAnything/SLIC 的分割质量——分割错误会直接污染深度边界处的对焦;⑤ PDAF 需 DP 专用传感器、CDAF 需多次拍摄,二者各有硬件/速度门槛;⑥ [推测] 系统含 SLM/relay/beamsplitter,体积与标定复杂度远高于普通镜头,离便携/量产尚远,原文也把端到端镜头设计/像差修正列为未来工作。