是否有计算自由度的公式?


16

我很清楚DOF取决于:

  1. 焦距
  2. 光圈
  3. 距拍摄对象的距离
  4. 传感器尺寸
    及更多(如注释中所述)。

但是,这里的问题是:是否存在将所有这些因素与自由度相关联的公式?给定这些值,就可以准确地计算出景深?


1
还有两件事要考虑:(5)最终图像的大小;(6)在考虑其他五个因素时是否关注“可接受的清晰度区域”或“足够模糊的区域”。

Answers:


17

景深取决于两个因素,放大倍数和f值。

焦距,被摄体距离,大小和混乱度(模糊变得可见的半径)共同决定了放大倍数。

除公式中的变量外,景深不取决于镜头或相机的设计,因此确实存在一些通用公式可以计算所有相机和镜头的景深。我没有将它们全部都放在内存中,所以我只能从Wikipedia复制和粘贴,因此我将保留此链接:

对于您的问题,更好的答案是从第一原理中推导公式,这是我一段时间以来一直想做的事情,但是没有时间。如果有人想做志愿者,我会给他们投票;)


15

您需要算术,所以就这样:

您需要知道相机的CoC,佳能APS-C尺寸的传感器(0.018),尼康APS-C(0.019),全画幅传感器和35mm胶片的数字(0.029)。

该公式是为了完整性:

CoC (mm) = viewing distance (cm) / desired final-image resolution (lp/mm) for a 25 cm viewing distance / enlargement / 25

蔡司公式的用法是:

c = d/1730

其中d是传感器的对角线尺寸,c是最大可接受的CoC。得出的数字略有不同。

您需要首先计算镜头和相机的超焦距(该公式对于接近焦距的距离是不准确的,例如极端宏):

HyperFocal[mm] = (FocalLength * FocalLength) / (Aperture * CoC)

例如:

50mm lens @ f/1.4 on a full frame:      61576mm (201.7 feet)
50mm lens @ f/2.8 on a full frame:      30788mm (101 feet)
50mm lens @ f/1.4 on a Canon APS frame: 99206mm (325.4 feet)
50mm lens @ f/2.8 on a Canon APS frame: 49600mm (162.7 feet)

接下来,您需要计算近点,这是在给定相机与主体之间的距离的情况下将成为焦点的最接近距离:

NearPoint[mm] = (HyperFocal * distance) / (HyperFocal + (distance – focal))

例如:

50mm lens @ f/1.4 on a full frame with a subject at 1m distance: 0.984m (~16mm in front of target)
50mm lens @ f/1.4 on a full frame with a subject at 3m distance: 2.862m (~137mm in front of target)
50mm lens @ f/2.8 on a full frame with a subject at 1m distance: 0.970m (~30mm in front of target)
50mm lens @ f/2.8 on a full frame with a subject at 3m distance: 2.737m (~263mm in front of target)

50mm lens @ f/1.4 on a Canon APS frame with a subject at 1m distance: 0.990m (~10mm in front of target)
50mm lens @ f/1.4 on a Canon APS frame with a subject at 3m distance: 2.913m (~86mm in front of target)
50mm lens @ f/2.8 on a Canon APS frame with a subject at 1m distance: 0.981m (~19mm in front of target)
50mm lens @ f/2.8 on a Canon APS frame with a subject at 3m distance: 2.831m (~168mm in front of target)

接下来,您需要计算远点,这是在给定相机与被摄体之间的距离的情况下将聚焦的最远距离:

FarPoint[mm] = (HyperFocal * distance) / (HyperFocal – (distance – focal))

例如:

50mm lens @ f/1.4 on a full frame with a subject at 1m distance: 1.015m (~15mm behind of target)
50mm lens @ f/1.4 on a full frame with a subject at 3m distance: 3.150m (~150mm behind of target)
50mm lens @ f/2.8 on a full frame with a subject at 1m distance: 1.031m (~31mm behind of target)
50mm lens @ f/2.8 on a full frame with a subject at 3m distance: 3.317m (~317mm behind of target)

50mm lens @ f/1.4 on a Canon APS frame with a subject at 1m distance: 1.009m (~9mm behind of target)
50mm lens @ f/1.4 on a Canon APS frame with a subject at 3m distance: 3.091m (~91mm behind of target)
50mm lens @ f/2.8 on a Canon APS frame with a subject at 1m distance: 1.019m (~19mm behind of target)
50mm lens @ f/2.8 on a Canon APS frame with a subject at 3m distance: 3.189m (~189mm behind of target)

现在,您可以计算总焦距:

TotalDoF = FarPoint - NearPoint

例如:

50mm lens @ f/1.4 on a full frame with a subject at 1m distance:  31mm
50mm lens @ f/1.4 on a full frame with a subject at 3m distance: 228mm
50mm lens @ f/2.8 on a full frame with a subject at 1m distance:  61mm
50mm lens @ f/2.8 on a full frame with a subject at 3m distance: 580mm

50mm lens @ f/1.4 on a Canon APS frame with a subject at 1m distance:  19mm
50mm lens @ f/1.4 on a Canon APS frame with a subject at 3m distance: 178mm
50mm lens @ f/2.8 on a Canon APS frame with a subject at 1m distance:  38mm
50mm lens @ f/2.8 on a Canon APS frame with a subject at 3m distance: 358mm

因此,预先计算了带有CoC和HyperFocal的完整公式:

TotalDoF[mm] = ((HyperFocal * distance) / (HyperFocal – (distance – focal))) -(HyperFocal * distance) / (HyperFocal + (distance – focal))

或简化:

TotalDoF[mm] = (2 * HyperFocal * distance * (distance - focal)) / (( HyperFocal + distance - focal) * (HyperFocal + focal - distance))

使用CoC进行预先计算:我已经尝试通过以下替换简化以下方程式:a =观看距离(cm)b = 25厘米观看距离时所需的最终图像分辨率(lp / mm)c =放大d = FocalLength e =孔径f =距离X = CoC

TotalDoF = ((((d * d) / (e * X)) * f) / (((d * d) / (e * X)) – (f – d))) - ((((d * d) / (e * X)) * f) / (((d * d) / (e * X)) + (f – d)))

简化:

TotalDoF = (2*X*d^2*f*e(d-f))/((d^2 - X*d*e + X*f*e)*(d^2 + X*d*e - X*f*e))

使用WolframAlpha进一步简化:

TotalDoF = (2 * d^2 * e * (d - f) * f * X)/(d^4 - e^2 * (d - f)^2 * X^2)

或者,如果未预先计算任何内容,则会得到这个无法使用的怪物:

TotalDoF = ((FocalLength * FocalLength) / (Aperture * (viewing distance (cm) / desired final-image resolution (lp/mm) for a 25 cm viewing distance / enlargement / 25)) * distance) / ((FocalLength * FocalLength) / (Aperture * (viewing distance (cm) / desired final-image resolution (lp/mm) for a 25 cm viewing distance / enlargement / 25)) – (distance – focal)) - ((FocalLength * FocalLength) / (Aperture * (viewing distance (cm) / desired final-image resolution (lp/mm) for a 25 cm viewing distance / enlargement / 25)) * distance) / ((FocalLength * FocalLength) / (Aperture * (viewing distance (cm) / desired final-image resolution (lp/mm) for a 25 cm viewing distance / enlargement / 25)) + (distance – focal))

简化:

(50*a*b*c*d^2*f*e*(d-f))/((25*b*c*d^2 - a*d*e + a*f*e)*(25*b*c*d^2 + a*d*e - a*f*e)

所以基本上使用重新计算的CoC和HyperFocal :)


@mattdm会回答您关于包含公式的问题吗?
psarossy

是的,非常有帮助,谢谢。(对不起,我忘了分配赏金。)
mattdm




0

P =关注点

Pd =清晰定义的远点

Pn =明确定义的近点

D =混淆圆的直径

f = f数

F =焦距

Pn = P÷(1 + PDf÷F ^ 2)

Pd = P÷(1-PDf÷F ^ 2)

行业标准将D设置为焦距的1/1000。为了更精确地工作,请使用焦距的1/1500。假设焦距为100mm,那么100mm的1/1000 = 0.1mm或1/1500 = 0.6666mm

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.