32. Background interpolation chip cutout correction    Appendix

As mentioned in the main text (sec. 13.10.8), when performing the background interpolation, we need to correct for the fact that towards the edges of the chip, part of the circle (the x-y plane component) will be cut off. To correct for this we want to compute the area of the circle that is still contained on the chip. By scaling the intensity \(I\) by the missing area we correct for this. Let's discuss the actual calculation of the (possibly) double cut out circle.

The area of a single circle segment can be written as \[ A = R² / 2 · (ϑ - \sin(ϑ)) \] where \(R\) is the radius of the circle and \(ϑ\) the angle that cuts off the circle. See the upper center part of fig. 1 for the area \(A\).

In the general case we need to know the area of a circle that is cut off from 2 sides, with angles \(ϑ_1\) and \(ϑ_2\), which are orthogonal to another. See the middle left part of fig. 1 to see areas \(A\) and \(B\) cut off, leaving area \(E\) as the remaining area contained on the chip. For a point \((x, y)\), define the distance to the edge of the chip to be \((Δx, Δy)\) for each axis. Then, the cutout areas \(A\) and \(B\) are given by

\[ A = R² / 2 · (ϑ - \sin(ϑ_1)) \]

and

\[ B = R² / 2 · (ϑ - \sin(ϑ_2)) \]

where the angles \(ϑ_1\) and \(ϑ_2\) (see center of fig. 1) are related to the distances to the edge of the chip by

\begin{align*} ϑ_1 &= 2 \arccos(Δx / R) \\ ϑ_2 &= 2 \arccos(Δy / R). \end{align*}

By subtracting areas \(A\) and \(B\) from the total area \(F\), we remove too much however. So we need to add back:

  • another circle segment \(D\), of the angle \(α\) given by the lines connecting to the ends up each cut off line (see the center row of fig. 1)
  • the area of the triangle \(C\), see the bottom row of fig. 1.

The angle \(α\) relates to angles \(ϑ_1\) and \(ϑ_2\) via

\[ α = \frac{ϑ_2}{2} - \left(π - \frac{ϑ_1}{2}\right), \]

see the center row of fig. 1.

To calculate the area \(C\), we need the catheti of the triangle, \(x'\) and \(y'\). See the bottom part of fig. 1. These are the distances from the orthogonal cutoff line to the edge of the circle, as hopefully clear in the figure. Given that we know the center position of the circle (as that is the interpolation point), we can express \(x'\) and \(y'\) via the circle radius \(R\) and the distances from the center to the chip in each axis, \(Δx\) and \(Δy\) (they may in theory be negative if the center is outside the chip).

They are thus

\begin{align*} x' &= \cos β · R - Δx \\ y' &= \cos γ · R - Δy, \end{align*}

where \(γ\) is the same angle as in the middle row of the schematic and \(β\) is the equivalent for \(ϑ_2\), \(β = \frac{ϑ_2}{2} - \frac{π}{2}\).

In combination then the area \(E\) can then be expressed as:

\[ E = F - A - B + C + D, \]

with \(F\) being the total area of the circle. This finally means to correct the background interpolation at a point close to the chip edges, we adjust \(I\) by

\[ I'(x,y) = I · \frac{F}{E(x,y)}, \]

where we emphasize that \(E(x,y)\) depends on the position, before normalizing with the weight \(W\).

circle_cutout_explanation.svg
Figure 1: Figure 193: Explanation of the different areas appearing in the calculation. We want to calculate area \(E\), the area remaining on the chip. Subtracting \(A\) and \(B\) makes us subtract areas \(C\) and \(D\) twice.
Click on any heading marked 'extended' to open it