Skip to content

Commit

Permalink
update for test
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-chervet committed Jul 22, 2023
1 parent ec10494 commit 2916686
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Opencv/templateMatching.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const findMatch = (cv) => (template, image) => {
let colorRed = new cv.Scalar(255, 100, 200, 255);
cv.putText(image, "" + numberPoint, new cv.Point(10, 30), cv.FONT_HERSHEY_SIMPLEX, 1.0, colorRed, 1, cv.LINE_AA);

if(maxPoint.x > 0 && maxPoint.y > 0) {
if(maxPoint.x > 0 && maxPoint.y > 0 && Math.abs(maxPoint.x - point1.x) < 20 && Math.abs(maxPoint.y - point1.y) < 20 ) {
const lineSize = average < 0.1 ? 1 : parseInt(average * 10, 10);
//console.log("lineSize")
//console.log(lineSize)
Expand Down
2 changes: 1 addition & 1 deletion src/TemplateVideo.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const transformImage = (stateImgCvTemplateResized, imgDescription) => {

try {
console.log("result", result);
if (result && result?.goodMatchSize > state.confidenceRate -50 ) {
if (result && result?.goodMatchSize > state.confidenceRate -30 ) {
const bestOutput = toImageBase64(cv)(imgCv);
const newState = {
...state,
Expand Down

0 comments on commit 2916686

Please sign in to comment.