UW-MAGIC-lab / hidden_village

https://practical-fermat-9e0301.netlify.app/
MIT License
1 stars 7 forks source link

BUG: On startup, something went wrong #3

Closed afogel closed 3 years ago

afogel commented 3 years ago

On booting up the app, if the camera does not have a person's image in the webcam image, the application will error out. We need to gracefully handle this case until a person's image is shown in the camera.

likeketchup commented 3 years ago

Adding a while loop before drawing the landmarks to check if the data is empty or not might prevent the bug from occurring.

likeketchup commented 3 years ago

After some more experiments, I think the key attribute that causes this bug is faceLandmarks within props parameter in Pose.js. In order to successfully start the app, this attribute must not be empty. A few cases:

  1. poseLandmarks, ea are occupied, but the error occurs.
  2. The app starts with only poseLandmarks, ea, and facelandmarks as landMarks. No leftHandLandmarks and rightHandLandmarks
  3. If I cover the camera after the app starts, the faceLandmarks will not be empty, but remains the same as before.

Thus, I guess faceLandmarks is the one that causes the error.