takuya-takeuchi / FaceRecognitionDotNet

The world's simplest facial recognition api for .NET on Windows, MacOS and Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Usage of API

takuya-takeuchi opened this issue · comments

Hello
I try to do facial recognition with this example
https://github.com/takuya-takeuchi/FaceRecognitionDotNet/wiki/Quickstart#1-initialize
but I get an error when compiling in visual studio

Argument 2: cannot be converted from 'FaceRecognitionDotNet.Location' a 'System.Collections.Generic.IEnumerable<FaceRecognitionDotNet.Location>'

in this line
IEnumerable encodingA = FaceRecognition.FaceEncodings(imageA, locationsA.First());

I am missing some nuget package

Originally posted by @Gaara1996 in #187 (comment)

You can do

IEnumerable encodingA = FaceRecognition.FaceEncodings(imageA, locationsA);

OK, Wiki is wrong.
I revised it.
Thanks. :)

Thanks for the help in the end I left it this way
IEnumerable encodingB = fr.FaceEncodings(imageB).ToArray();
and it worked =)
And I also tried your suggestion and it worked.