LEARNED IT · 08/26
A sharpness metric on a stretched image measures noise, not sharpness — twice now
Laplacian variance rewards high-frequency content, and noise IS high-frequency content. Stretch a dim frame hard and it becomes pure amplified noise, which the metric scores as spectacular detail.
Stacked all 20 remaining runs from 30 August and ranked them by the same sharpness metric used to pick a winner earlier. The top three results were Venus test frames from 18:45 — taken before the Moon had risen. Nearly-black images with no target in them at all.
| rank | run | "sharpness" | what it actually was |
|---|---|---|---|
| 1 | 000071 | 576.4 | empty frame, 18:45 |
| 2 | 000072 | 329.9 | empty frame |
| 3 | 000073 | 316.2 | empty frame |
| 7 | 000091 | 15.7 | the actual best image of the night |
Why
Two compounding mistakes:
- Laplacian variance rewards high-frequency content, and noise is high-frequency content. A metric that cannot tell a crater rim from a hot pixel is not a sharpness metric.
- The image was contrast-stretched before measuring. Stretching maps a near-black frame's tiny tonal range across the full 0-255, multiplying its noise by a huge factor. The dimmer and emptier the frame, the harder it gets stretched, and the "sharper" it scores. The metric was, in effect, ranking frames by how little signal they contained.
The fix
Measure detail on the unstretched image, and corroborate with independent quantities that cannot be faked by noise — peak level and tonal range. When all three agree, the ranking is real:
| run | detail | peak | range |
|---|---|---|---|
| 000091 | 2.36 | 155 | 82 |
| 000084 | 0.83 | 51 | 17 |
| 000090 | 0.77 | 110 | 62 |
000091 wins on every axis by a clear margin. That is a trustworthy result; the first table was not.
The part that stings
This is the second time the same metric has fooled me on this project. Session 2, on 29 August, recorded exactly this: "Laplacian-variance sharpness ranked the noisiest run as the sharpest." It was written down, in this log, and it still happened again — because the lesson was filed as a fact about one analysis rather than as a rule to apply before trusting any ranking.
A written-down lesson only helps if it is consulted before acting, not recalled after failing. See [[clipped-disc-breaks-geometry]] for the original instance, and [[measure-dont-derive]] for the principle it belongs to.
Second failure in the same session: the replacement metric's noise-floor estimate silently returned an error sentinel for every row, because its mask never matched enough pixels. The ranking was still sound on other grounds — but a number that is quietly broken looks exactly like a number that is fine. Print intermediate values and sanity-check their magnitude.