Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Talk:Face Recognition using 2D Fast Fourier Transform

From Wiki
Jump to: navigation, search


Joaocardoso - Nice article

I can see come interesting applications for this. For example, find all photos on a album of a certain person.

I would suggest that you add this article to the Wiki Competition that is going on now.


joaocardoso 16:45, 29 November 2012 (EET)

Izinin - amazing results


This is very interesting and well made article. I would vote for this in the wiki competition if i could. And amazingly the test results is very good !

Thank you


izinin 15:13, 3 December 2012 (EET)

Yan -


Why did you write  : "Don't create a BitmapImage or WriteableBitmap on the UI thread "

is it very efficient? have you try to perform FFT with C++?

yan_ 14:36, 4 December 2012 (EET)

Galazzo - FFT with C++

Hi Yan

FFT with C++ is a further improvement. At moment I'm focused to improve the algorithm implementing a good ( I try and hope well ) skin and hair detection process. I hope to switch in C++ as soon as possible.

Anyway let you consider that you don't need to compare a Police database, but although a lot, a limited number of photos on your device and Lumia performaces are good. This is because is not my first focus.

About "Don't create a BitmapImage or WriteableBitmap on the UI thread " as explained on Tip unless you this trick you get excepion error.

galazzo 18:34, 4 December 2012 (EET)

Yan -

But in your code you create BitmapImage and WriteableBitmap in UI thread ;)

I understand that BitmapImage and WriteableBitmap must be used only with UI Thread. They are UI object.

To perform pixel manipulation in a thread you must use an int[] array.

yan_ 18:49, 4 December 2012 (EET)

Galazzo -

Hi Yan

please refer to documentation for use of Deployment.Current.Dispatcher.BeginInvoke( ()=> {...} ) format or read the following post:

As you can see from the code i refer to int[] array for pixel manipulation:

int[] pixel = MainPage.CapturedImage.Pixels;

but as explained in the article the FFT works with double values this is because we need to convert from int to double.

galazzo 00:40, 5 December 2012 (EET)

Yan -

Hi Galazzo. You don't understand what i mean : you write

Don't create a BitmapImage or WriteableBitmap on the UI thread

But i say

you must create BitmapImage or WriteableBitmap in the UI thread because BitmapImage  and WriteableBitmap  can only be used in UI thread.
In your code, you use dispatcher to execute your code in UI thread.

yan_ 10:46, 6 December 2012 (EET)

Yan -

Another point, When you loop on pixels, normally this code :

var pixels =   MainPage.CapturedImage.Pixels;
var width = MainPage.CapturedImage.PixelWidth;
var height = MainPage.CapturedImage.PixelHeight
for (int y = 0; y < height; y++)
for (int x = 0; x <width ; x++)
Pixels[x + (y * width )];

is faster than (approximately two times)

for (int y = 0; y < MainPage.CapturedImage.PixelHeight; y++)
for (int x = 0; x < MainPage.CapturedImage.PixelWidth; x++)
MainPage.CapturedImage.Pixels[x + (y * MainPage.CapturedImage.PixelWidth)];

yan_ 13:52, 11 December 2012 (EET)

Hamishwillee - Subedited/Reviewed

Hi Sebastiano

I finally got around to subediting this. I think you've done a superb job, of creating a fairly clear explanation of a complex topic. You can also tell your brother that he does indeed look more like an Elk than Elena :-)

The main improvement I would make is that your introduction covers ONLY the algorithm part of this article, while you also integrated the implementation into a camera lens. As this is both interesting, and what makes this WP8 centric, I think you should add a line in the Abstract explaining this.

Great job.



hamishwillee 05:51, 12 December 2012 (EET)

Hamishwillee - PS

I would also add more links to the Lenses documentation on Dev Center, probably in a "SeeAlso"

hamishwillee 06:13, 12 December 2012 (EET)

Galazzo -

@hamish Thanks for your job

@yan Thanks for your suggestion, is useful, anyway consider that a lot of improvements can be done about performances. The article was focused on the algorithm and I didn't special care on code optimization, more I think that the best improvement can be reached adding C++ support and worth to treat in a separate article, so I added a link to your article "C++ support in Windows Phone 8 sdk" in my "See Also" section.

Suggestion on how to improve the work are always welcomed as further features you think would be great to have.

Thanks to All,


galazzo 01:53, 14 December 2012 (EET)

Prateekjaiswal - License Term

Can i use your code in commercial application ?

or is it licensed ?

prateekjaiswal (talk) 21:30, 16 August 2013 (EEST)

Hamishwillee - Up to galazzo

Note that usage of code here is according to the terms and conditions

Sebastiano (galazzo) can choose to separately grant you other rights as he retains copyright and ownership of his own work.

hamishwillee (talk) 09:07, 19 August 2013 (EEST)

Galazzo -

Hi Prateekjaiswal,

You can use the code for commercial use but please add reference to this work and give me evidence where you used the code.

Thanks for your interest,


galazzo (talk) 11:48, 19 August 2013 (EEST)