Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-chervet committed Jul 25, 2023
1 parent 738a802 commit 4758a0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Opencv/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const transformFunction = async (imageCvTemplate, imageCvTemplateDescription, im
try {
const cv = window.cv;
if (imgCv === null) return;
const imd = imageResize(cv)(imgCv, 400);
const imd = imageResize(cv)(imgCv, 200);

const imgCvTemplateResized = imd.image;

Expand Down Expand Up @@ -187,8 +187,8 @@ export const loadVideoAsync = (cv) => (imageCvTemplate, imageCvTemplateDescripti
let constraints = {
audio: false,
video: {
width: { ideal: 2600 },
height: { ideal: 2600 },
width: { ideal: 1600 },
height: { ideal: 1600 },
facingMode: {
//ideal: 'face'
ideal: 'environment'
Expand Down
4 changes: 2 additions & 2 deletions src/TemplateVideo.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export const TemplateVideo= () => {
const cv = window.cv;
const convertedFile = await toBase64Async(file);
const imgCvTemplate = await loadImageAsync(cv)(convertedFile);
let imgCvTemplateResized = imageResize(cv)(imgCvTemplate, 200).image;
let imgCvTemplateResizedMatch = imageResize(cv)(imgCvTemplate, 600).image;
let imgCvTemplateResized = imageResize(cv)(imgCvTemplate, 100).image;
let imgCvTemplateResizedMatch = imageResize(cv)(imgCvTemplate, 800).image;
//let imgCvGray = convertImgToGray(cv)(imgCvTemplateResized);
const resizedImg = detectAndComputeSerializable(cv)(imgCvTemplateResizedMatch);
const jsonValue = JSON.stringify(resizedImg);
Expand Down

0 comments on commit 4758a0a

Please sign in to comment.