Ring locator: contrast ranking, all-round ink check; bench baseline switch

This commit is contained in:
2026-08-16 20:12:33 +01:00
parent e677e270fd
commit b314f01efc
6 changed files with 30 additions and 10 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ export function makeRingScanner(opts = {}) {
// plain bilinear at 3x reduction skips pixels and keeps the noise
wctx.imageSmoothingQuality = "high";
wctx.drawImage(src, 0, 0, wide.width, wide.height);
const cands = locate(grayOf(wctx.getImageData(0, 0, wide.width, wide.height)), { max: 3 });
const cands = locate(grayOf(wctx.getImageData(0, 0, wide.width, wide.height)), { max: 5 });
let last = null;
for (const c of cands) {
const d = readAt(src, sw, sh, { cx: (c.cx + 0.5) / k, cy: (c.cy + 0.5) / k, unit: c.r / CENTER / k, A: c.A.map((v) => v / k) }, now);