Ring locator: contrast ranking, all-round ink check; bench baseline switch
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user