3
라이브 웹 캠에서 얼굴을 Windows.Media.FaceAnalysis DetectedFace
개체의 목록으로 가져올 수 있습니다. 이제는 Microsoft Cognitive Services API에 이러한 얼굴을 전달하여 얼굴을 감지하고 얼굴 특성을 얻고 싶습니다. 어떻게해야합니까?Windows.Media.FaceAnalysis DetectedFace 목록을 제공하여 Microsoft인지 서비스를 사용하여 얼굴 특성을 검색하는 방법?
IList<DetectedFace> faces = null;
// Create a VideoFrame object specifying the pixel format we want our capture image to be (NV12 bitmap in this case).
// GetPreviewFrame will convert the native webcam frame into this format.
const BitmapPixelFormat InputPixelFormat = BitmapPixelFormat.Nv12;
using (VideoFrame previewFrame = new VideoFrame(InputPixelFormat, (int)this.videoProperties.Width, (int)this.videoProperties.Height))
{
await this.mediaCapture.GetPreviewFrameAsync(previewFrame);
// The returned VideoFrame should be in the supported NV12 format but we need to verify this.
if (FaceDetector.IsBitmapPixelFormatSupported(previewFrame.SoftwareBitmap.BitmapPixelFormat))
{
faces = await this.faceDetector.DetectFacesAsync(previewFrame.SoftwareBitmap);
// Now pass this faces to Cognitive services API
// faceClient.DetectAsync
}
}
안녕 @Maria 네스 Parnisari, 우리는 임시 file.Can을 만드는 피할 수있는 방법이 우리가 임시의 도움 밖으로 솔루션을 만들 수 있습니다 임시 file.Is를 만드는 작업이 포함됩니다 answer.Your 답변 주셔서 감사합니다 파일? –
@JosephAbraham 내 업데이트 된 답변보기 :) –