Canon Camera Hackers Manual page 169

Camera hackers manual berthold daum
Table of Contents

Advertisement

160
C H A P T E R 5
DoF 1
DoF 2
DoF 3
Adaptive focus stacking
with the distance settings
depending on the DOF.
Scripting
focal distance 1
near 1
near 2
The following script accepts four parameters: two for the near limit and
Figure 5-3
two for the far limit of the composite sharpness range. Each limit is de-
scribed by a base value (in millimeters) and a factor (1, 10, 100). You don't
have to click 1,000 times for a distance of one meter. Instead, you dial a
base value of 10 and a factor of 100, which is done with just a few clicks.
The far limit factor, in addition, allows dialing in infinity directly. The de-
fault range is set to (20 cm - infinity). Because there are no timing con-
straints for this script, we have used uBasic to implement it.
@title Adaptive Focus Stacking
@param a close distance (mm)
@default a 2
@param b factor (0=1,1=10,2=100)
@default b 2
@param c far distance (mm)
@default c 5
@param d factor (0=1,1=10,2=100,3=inf)
@default d 3
In the following instructions, we make sure that no parameters are invalid.
Invalid parameters (negative or zero distance) are set to their default
values.
rem consolidate parameters
if a < 1 then a = 2
if c < 1 then c = 5
Then the script computes the true limits in millimeters by multiplying the
base values with their factors. Only in the case of infinity do we directly
assign the value of –1 that represents infinity.
focal distance 2
far 1
near 3
total DoF of stacked images
focal distance 3
far 2

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Powershot sx10 is

Table of Contents