8

I'm not talking about the "people tags" embeded in the XMP packets of JPEGs. I'm talking about the face database used to recognize new faces.

I want to add to my program the option to recognize faces using the already trained database of WLPG. I managed to use the API (a type library dll) to detect faces, but to recognize them it needs an Exemplar Cache object that is not available in the same API. I could create my own object, but i want to use the already existing one to avoid duplicate training for the user.

I know the database is in "%localappdata%\Local\Microsoft\Windows Live Photo Gallery\" and that it is in SQL Server Compact Edition 3.1 format. I opened the database with Visual Studio 2010 but I would prefer to read it without accesing the database directly and I don't see a DLL that exports that functionality.

BTW, I'm using Delphi 2010.

Any ideas?

Zian Choy
  • 2,846
  • 6
  • 33
  • 64
acorderob
  • 81
  • 1
  • 4

1 Answers1

1

Cautionary Note: I have never written a line of Delphi in my life.

Since this is not supported by Microsoft, there is unlikely to be any sort of obvious API. Consequently, doing what you're talking about will probably break the moment a new version of Windows Live Photo Gallery comes out.

That being said, your best hope is to connect directly to the database. You will need to read up on how to create a SQL Server to Delphi connection. Then, create a connection string to connect to the Windows Live Photo Gallery database.

Zian Choy
  • 2,846
  • 6
  • 33
  • 64
  • I already managed to import the database data into my IExemplarCache object, but i'm having problems with how i return the information to the recognition engine. I will keep trying, but i doubt i will put this method into the final version of the program, even if i make it work. – acorderob Jan 08 '11 at 17:58
  • Could you provide some details of your IExemplarCache class? – Zian Choy Apr 10 '11 at 00:48
  • I managed to make it work to some extent. It doesn't give exceptions anymore (i wasn't constructing the cache items properly). It detects the faces, but the person id is always 0 which means it is not recognized. – acorderob Apr 13 '11 at 13:12
  • Ok, so it is working! I just didn't have good test images. The recognition is not very good, thou. I tested with a copy of an already recognized image (in WLPG) and it only gave the correct response as a recomendation with 33% confidence. – acorderob Apr 13 '11 at 14:50
  • Congratulations! I'm so happy to hear that! – Zian Choy Apr 19 '11 at 03:40
  • I made a [post](http://www.acordero.org/2011/06/accessing-windows-live-photo-gallery-face-api/) about this. – acorderob Jun 16 '11 at 18:09