fix 人脸检测问题,数据查询
This commit is contained in:
@@ -6,6 +6,7 @@ using ViewFaceCore;
|
||||
using ViewFaceCore.Configs;
|
||||
using Dlhis.InfoCheck.Request;
|
||||
using Dlhis.InfoCheck.Response;
|
||||
using Kurisu.AspNetCore.UnifyResultAndValidation.Aop;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
|
||||
namespace Dlhis.InfoCheck.Controllers;
|
||||
@@ -19,6 +20,7 @@ public class FaceController : ControllerBase
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[DisableApiLog]
|
||||
[HttpPost("detection")]
|
||||
public IEnumerable<string> FacialDetection(FaceDetectRequest request)
|
||||
{
|
||||
@@ -32,7 +34,13 @@ public class FaceController : ControllerBase
|
||||
MarkType = MarkType.Light
|
||||
});
|
||||
|
||||
var info = faceDetector.Detect(bitmap).First();
|
||||
var faces = faceDetector.Detect(bitmap);
|
||||
if (faces.Length == 0)
|
||||
{
|
||||
return new List<string> { "未检测到人脸" };
|
||||
}
|
||||
|
||||
var info = faces.First();
|
||||
var markPoints = faceMark.Mark(bitmap, info);
|
||||
|
||||
using var faceQuality = new FaceQuality();
|
||||
|
||||
Reference in New Issue
Block a user