人脸图片格式处理

This commit is contained in:
Songsl 2026-05-26 13:42:14 +08:00
parent 480ab6d7b9
commit 71c241585a
1 changed files with 3 additions and 3 deletions

View File

@ -125,7 +125,7 @@ async function detectAction(action) {
const rightEye = landmarks.getRightEye()
const eyeDiff = Math.abs(leftEye[0].y - rightEye[3].y)
if (eyeDiff < 10) {
capturedFiles.front = await captureImage(video.value, 'front.png')
capturedFiles.front = await captureImage(video.value, 'front.jpg')
clearInterval(interval)
resolve()
}
@ -133,7 +133,7 @@ async function detectAction(action) {
if (action === 'mouth') {
if (isMouthOpen(landmarks)) {
capturedFiles.mouth = await captureImage(video.value, 'mouth.png')
capturedFiles.mouth = await captureImage(video.value, 'mouth.jpg')
clearInterval(interval)
resolve()
}
@ -142,7 +142,7 @@ async function detectAction(action) {
if (action === 'yaw') {
const yaw = estimateYaw(landmarks)
if (Math.abs(yaw) > YAW_THRESHOLD) {
capturedFiles.yaw = await captureImage(video.value, 'yaw.png')
capturedFiles.yaw = await captureImage(video.value, 'yaw.jpg')
clearInterval(interval)
resolve()
}