feat 人脸检测
This commit is contained in:
27
Src/Dlhis.InfoCheck/faceQualityExtensions.cs
Normal file
27
Src/Dlhis.InfoCheck/faceQualityExtensions.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using ViewFaceCore;
|
||||
using ViewFaceCore.Core;
|
||||
using ViewFaceCore.Model;
|
||||
|
||||
namespace Dlhis.InfoCheck;
|
||||
|
||||
public class QualityResultEx : QualityResult
|
||||
{
|
||||
public QualityType Type { get; set; }
|
||||
}
|
||||
|
||||
public static class FaceQualityExtensions
|
||||
{
|
||||
public static QualityResultEx DetectEx<T>(this FaceQuality faceQuality, T image,
|
||||
FaceInfo info,
|
||||
FaceMarkPoint[] points,
|
||||
QualityType type) where T : class
|
||||
{
|
||||
var result = faceQuality.Detect(image, info, points, type);
|
||||
return new QualityResultEx
|
||||
{
|
||||
Level = result.Level,
|
||||
Score = result.Score,
|
||||
Type = type
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user