Harden beam angle calculation

Merged
#114 · Created  · Last updated

Merged pull request

Merged in harden_angle_calculation (pull request #114)

75bba29·Author: ·Closed by: ·2023-05-16

Description

This PR was motivated by the failure of GeometricCalibration seen in DDCHD-63. Along the way, we also were able implement safeguards that protect us from the kind of data seen in DDCHD-61. Namely, the updates are:

  1. A new algorithm for separating the hairlines from lamp gain images. This fixes the failure seen in DDCHD-63. In that case the lamp gains had very large spatial gradients that made a global segmentation algorithm (i.e., Otsu’s method) fail. The new algorithm uses the same method we already use to find hairlines when removing their signal in gain images (so this method is well tested). Now we simply look for pixels that deviate from the global median (with some minor refinements).

  2. This new hairline identification method is also useful for dealing with the data in DDCHD-61. In that case a large collection of bad pixels was deviant enough to be incorrectly identified as hairlines, which caused the angle calculations to go haywire. To ignore these bad pixels we perform a morphological opening on the hairline map to remove any features that are “dot” like. The good news here is that the hairlines are extremely NOT dot-like and so there’s little danger of accidentally cleaning hairline pixels.

  3. Finally, if any bad pixels do get through the cleaning step (this can happen if the bad pixels touch a hairline) then we have a more robust linear fitter that iteratively reject outliers. Our initial guesses are better as well; they are now median centers-of-mass rather than simple means.

I’ll highlight the core diff for each of the 3 changes below.

0 attachments

0 comments

Loading commits...