vladmandic / human

Human: AI-powered 3D Face Detection & Rotation Tracking, Face Description & Recognition, Body Pose Tracking, 3D Hand & Finger Tracking, Iris Analysis, Age & Gender & Emotion Prediction, Gaze Tracking, Gesture Recognition
https://vladmandic.github.io/human/demo/index.html
MIT License
2.39k stars 326 forks source link

camera images sometimes out of focus - adding focusMode? #432

Closed arvindsaraf closed 7 months ago

arvindsaraf commented 8 months ago

Issue Description

I'm using human with the computer webcam, and some images are not focused on the main subject. Is the camera is in the continuous focus mode by default?

Will adding a focusMode config to the webcam allow users to set it? Then webcam.ts requestedConstraints can set this focus mode value, ie below: const requestedConstraints: MediaStreamConstraints = { audio: false, video: { facingMode: this.config.mode === 'front' ? 'user' : 'environment', // Attempt to enable continuous autofocus if supported focusMode: 'continuous', // This line is added to request continuous autofocus, or it can be an input setting param resizeMode: this.config.crop ? 'crop-and-scale' : 'none', }, };

Any suggestions?

vladmandic commented 8 months ago

since you have a suggestion, why not test it out yourself first?

vladmandic commented 7 months ago

any updates?

vladmandic commented 7 months ago

closing as no follow-up from issue author. if additional notes are added, issue can be reopened.