Skip to content

Commit

Permalink
feat(slight-capture): invert count down (release)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-chervet committed Sep 20, 2023
1 parent 87a2d9b commit 57eedea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/SlightCapture/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const imageResize = (cv) => (image, max = null) => {
// # if both the width and height are None, then return the
// # original image
if (!max) {
return image, 1;
return {image: image, ratio: 1};
}

let new_width = w;
Expand Down
2 changes: 1 addition & 1 deletion src/SlightCapture/templateMatching.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const findMatch = (cv) => (template, image, isDrawRectangle = false) => {
};
}

export const templateMatchingImageSize = 100;
export const templateMatchingImageSize = 200;
export const templateMatchingImageRatio = 0.75;

export const applyTemplateMatching = (cv) => async (imageCvTemplate, imgCv) => {
Expand Down
2 changes: 1 addition & 1 deletion src/SlightCapture/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ const captureAsync = (cv) => async (name,
// const baseline=0;
// const size= cv.getTextSize('Test', font, fontScale, thickness, baseline);
const size = new cv.Size(300, -280);
cv.putText(imageDestination, counterTime.toString(), new cv.Point(Math.round(imageDestination.cols / 2 - size.width / 2), Math.round(imageDestination.rows / 2 - size.height / 2)), font, fontScale, colorRed, thickness, cv.LINE_AA);
cv.putText(imageDestination, (waitNumberOfSecond - counterTime).toString(), new cv.Point(Math.round(imageDestination.cols / 2 - size.width / 2), Math.round(imageDestination.rows / 2 - size.height / 2)), font, fontScale, colorRed, thickness, cv.LINE_AA);

const point1 = new cv.Point(Math.round(currentPoints.x1 * imageDestination.cols), Math.round(currentPoints.y1 * imageDestination.rows));
const point2 = new cv.Point(Math.round(currentPoints.x2 * imageDestination.cols), Math.round(currentPoints.y2 * imageDestination.rows));
Expand Down

0 comments on commit 57eedea

Please sign in to comment.