chenyc
2024-08-27 7576405d2b4653b460ff0eed68f4c89340be5450
优化人像裁剪
1个文件已修改
17个文件已删除
8 ■■■■■ 已修改文件
imgs/1705642240612.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1705892155987.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1705895407297.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1708401590338.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1708401593426.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1708401603596.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1708401609822.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1714136810634.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1714440248953.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1714547526334.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1714623164195.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1714634878093.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1715839450323.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1717648518082.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1718525175763.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1720662037336.png 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1720664402647.png 补丁 | 查看 | 原始文档 | blame | 历史
src/views/home/index.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
imgs/1705642240612.png
Binary files differ
imgs/1705892155987.png
Binary files differ
imgs/1705895407297.png
Binary files differ
imgs/1708401590338.png
Binary files differ
imgs/1708401593426.png
Binary files differ
imgs/1708401603596.png
Binary files differ
imgs/1708401609822.png
Binary files differ
imgs/1714136810634.png
Binary files differ
imgs/1714440248953.png
Binary files differ
imgs/1714547526334.png
Binary files differ
imgs/1714623164195.png
Binary files differ
imgs/1714634878093.png
Binary files differ
imgs/1715839450323.png
Binary files differ
imgs/1717648518082.png
imgs/1718525175763.png
Binary files differ
imgs/1720662037336.png
Binary files differ
imgs/1720664402647.png
Binary files differ
src/views/home/index.vue
@@ -1120,12 +1120,11 @@
  )
  if (!image) {
    drawBox(box, '识别失败')
    // 开启识别
    video.value.play()
    return detectFace()
  }
  const X= jgTime(lsDateTime,new Date())
  // console.log('----',X,dialogVisible.value)
  // console.log(image)
  if(dialogVisible.value&&X>configData.value.face_push&&isworkTime(new Date())){
    lsDateTime=new Date()
    // console.log(X,'上传图片间隔')
@@ -1165,8 +1164,11 @@
  const canvas = document.createElement('canvas')
  canvas.width = video.videoWidth
  canvas.height = video.videoHeight
  canvas.getContext('2d')?.drawImage(video, 0, 0, canvas.width, canvas.height)
  // 参数:图片,裁剪开始x坐标,裁剪开始y坐标,裁剪宽度,裁剪高度,目标x坐标,目标y坐标,目标宽度,目标高度
  // context.drawImage(image, 100, 100, 200, 200, 0, 0, 200, 200);
  canvas.getContext('2d')?.drawImage(video, startPoint.x-10,startPoint.y-10,width+20,height+20,0,0,width+10,height+10)
  const imgSrc = canvas?.toDataURL('image/png');
  return imgSrc
}
// 画盒子