@@ -146366,6 +146366,7 @@ TFFaceMesh.prototype.positionsArray = null;
146366146366
146367146367/**
146368146368 * Isolates the two patches that correspond to the user's eyes
146369+ * @param {Object} video - the video element itself
146369146370 * @param {Canvas} imageCanvas - canvas corresponding to the webcam stream
146370146371 * @param {Number} width - of imageCanvas
146371146372 * @param {Number} height - of imageCanvas
@@ -148027,17 +148028,16 @@ function drawCoordinates(colour,x,y){
148027148028/**
148028148029 * Gets the pupil features by following the pipeline which threads an eyes object through each call:
148029148030 * curTracker gets eye patches -> blink detector -> pupil detection
148030- * @param {Object} video - the video element itself
148031148031 * @param {Canvas} canvas - a canvas which will have the video drawn onto it
148032148032 * @param {Number} width - the width of canvas
148033148033 * @param {Number} height - the height of canvas
148034148034 */
148035- function getPupilFeatures(video, canvas, width, height) {
148035+ function getPupilFeatures(canvas, width, height) {
148036148036 if (!canvas) {
148037148037 return;
148038148038 }
148039148039 try {
148040- return curTracker.getEyePatches(video , canvas, width, height);
148040+ return curTracker.getEyePatches(videoElement , canvas, width, height);
148041148041 } catch(err) {
148042148042 console.log("can't get pupil features ", err);
148043148043 return null;
@@ -148070,7 +148070,7 @@ function paintCurrentFrame(canvas, width, height) {
148070148070async function getPrediction(regModelIndex) {
148071148071 var predictions = [];
148072148072 // [20200617 xk] TODO: this call should be made async somehow. will take some work.
148073- latestEyeFeatures = await getPupilFeatures(videoElement, videoElementCanvas, videoElementCanvas.width, videoElementCanvas.height);
148073+ latestEyeFeatures = await getPupilFeatures(videoElementCanvas, videoElementCanvas.width, videoElementCanvas.height);
148074148074
148075148075 if (regs.length === 0) {
148076148076 console.log('regression not set, call setRegression()');
0 commit comments