Skip to content

Commit

Permalink
chore(chrome bug): increase black tolerance for washed out capture bug
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheeg committed Jul 24, 2024
1 parent be6f47a commit bc469f5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion public/ocr/ocr_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,12 @@ video.addEventListener('click', async evt => {
);

// get field coordinates via flood-fill (includes borders on all sides)
const field_w_borders_xywh = getFieldCoordinates(img_data, floodStartPoint);
const field_w_borders_xywh = getFieldCoordinates(
img_data,
floodStartPoint,
[0, 0, 0], // targeting black
40 // 40 is a very high tolerance, but this is to work around a "washed out colors" bug in chrome
);
console.log('field coordinates', field_w_borders_xywh);

let [ox, oy, ow, oh] = getCaptureCoordinates(
Expand Down

0 comments on commit bc469f5

Please sign in to comment.