Skip to content

Commit

Permalink
fix(video): remove log (release)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-chervet committed Aug 2, 2023
1 parent a0b4891 commit d8d4f66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/SlightCapture/templateMatching.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ export const autoAdjustBrightness = (cv) => (image, minimumBrightness=0.8) => {
}
}
const ratio = ((brightness /3) / (255 * src.cols * src.rows)) / minimumBrightness;
console.log("ratio", ratio);
console.log("1/ ratio", 1 / ratio);
if(ratio < 1 && ratio > 0) {
let alpha = 1 / ratio; // # Brightness control
let beta = 0; // # Contrast control

cv.convertScaleAbs(image, image, alpha, beta)
return {image, ratio: 1 / ratio};
return {image, ratio: alpha};
}
return { image, ratio: 0 };
}
Expand Down
2 changes: 1 addition & 1 deletion src/SlightCapture/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ const captureAsync = (cv) => async (name,
}


if(autoAdjustBrightnessRatio > 2){
if(autoAdjustBrightnessRatio > 1.9){
const size = new cv.Size(300, -280);
const font = cv.FONT_HERSHEY_SIMPLEX;
const fontScale = 2;
Expand Down

0 comments on commit d8d4f66

Please sign in to comment.