Cell = binary LABEL (black=print kept). Text reads clean ~0.15; thin figure lines need ~0.03. That conflict motivates section 2.
| stamp | source | thr 0.03 | thr 0.06 | thr 0.1 | thr 0.15 |
|---|---|---|---|---|---|
| figure 61-10__p001_ | source | thr 0.03 3.6% | thr 0.06 2.8% | thr 0.1 2.5% | thr 0.15 2.2% |
| figure 61-11__p001_ | source | thr 0.03 15.7% | thr 0.06 12.7% | thr 0.1 11.1% | thr 0.15 9.8% |
| figure 61-11__p001_ | source | thr 0.03 11.7% | thr 0.06 9.5% | thr 0.1 8.3% | thr 0.15 7.4% |
| text 09__M__p001_ | source | thr 0.03 9.4% | thr 0.06 7.9% | thr 0.1 7.2% | thr 0.15 6.5% |
| text 12__p001__00 | source | thr 0.03 16.5% | thr 0.06 13.3% | thr 0.1 11.8% | thr 0.15 10.4% |
per-type: text→0.15, figure→0.03 (we already classify stamps; dead simple, your exact sweet spots). adaptive: cv2 local Gaussian threshold — catches thin lines by LOCAL contrast regardless of absolute darkness (your "laplacian" idea). hysteresis: keep faint pixels (ink>0.035) only if connected to a solid core (ink>0.15) — captures faint line extensions, rejects isolated noise. Pick the column that keeps thin diagram lines AND clean text.
| type | source | global 0.06 | per-type | adaptive | hysteresis | tophat |
|---|---|---|---|---|---|---|
| figure | source | global 0.06 | per-type 0.03 | adaptive(local) | hysteresis | tophat(ridge) |
| figure | source | global 0.06 | per-type 0.03 | adaptive(local) | hysteresis | tophat(ridge) |
| figure | source | global 0.06 | per-type 0.03 | adaptive(local) | hysteresis | tophat(ridge) |
| text | source | global 0.06 | per-type 0.15 | adaptive(local) | hysteresis | tophat(ridge) |
| text | source | global 0.06 | per-type 0.15 | adaptive(local) | hysteresis | tophat(ridge) |
Each tile's left side is artificially darkened to fake a shaded/dark background. whole-tile (old) washes that background out toward paper as fade rises — bad, it erases the dark-BG the shade/sliver aug teaches. print-only (new) fades ONLY the print, leaving the background dark. Default now FADE_MAX=0.7 (you OK'd 0.7; 0.9 too much).
| tile | fade 0.0 | fade 0.3 | fade 0.5 | fade 0.7 | fade 0.9 |
|---|---|---|---|---|---|
| tile 0 whole-tile (old: fades BG) | fade 0.0 (off) | fade 0.3 | fade 0.5 | fade 0.7 | fade 0.9 |
| tile 0 print-only (new: BG kept) | fade 0.0 (off) | fade 0.3 | fade 0.5 | fade 0.7 | fade 0.9 |
| tile 1 whole-tile (old: fades BG) | fade 0.0 (off) | fade 0.3 | fade 0.5 | fade 0.7 | fade 0.9 |
| tile 1 print-only (new: BG kept) | fade 0.0 (off) | fade 0.3 | fade 0.5 | fade 0.7 | fade 0.9 |
| tile 2 whole-tile (old: fades BG) | fade 0.0 (off) | fade 0.3 | fade 0.5 | fade 0.7 | fade 0.9 |
| tile 2 print-only (new: BG kept) | fade 0.0 (off) | fade 0.3 | fade 0.5 | fade 0.7 | fade 0.9 |
| tile | none | floor 0.6 | floor 0.45 | floor 0.3 | floor 0.18 |
|---|---|---|---|---|---|
| tile 0 | none | floor 0.6 | floor 0.45 | floor 0.3 | floor 0.18 |
| tile 1 | none | floor 0.6 | floor 0.45 | floor 0.3 | floor 0.18 |
| tile 2 | none | floor 0.6 | floor 0.45 | floor 0.3 | floor 0.18 |
SCALE_RANGE now (0.5, 1.0) = 150-300dpi. Text legible to ~135dpi; thin figure hatching is the limit (~150dpi). Below 150 = not supported (input genuinely too low-res). AREA keeps thin lines present-but-faint instead of dropping them.
| type | 300dpi | 198dpi | 150 (floor)dpi | 135dpi | 120 (too low)dpi |
|---|---|---|---|---|---|
| figure | 300dpi | 198dpi | 150 (floor)dpi | 135dpi | 120 (too low)dpi |
| text | 300dpi | 198dpi | 150 (floor)dpi | 135dpi | 120 (too low)dpi |