Your question isn't clear but I think I understand what your attempting to do. Well it's one of two things. I will assume that you have only one finger print or face within the image. If you have more you will have to separate each one to perform the second operation correctly.
1st:
If you want to find the original image data from a binary map (the output of 1's and 0's) you need to loop through your output data and simply reference it's x,y data to the image:
Bitmap my_new_image = new Bitmap(original_image.Width, original_image.Height);
for (int y = 0; y < myImage.Height; y++)
{
for (int x = 0; x < myImage.Width; x++)
{
Color c = output_data.GetPixel(x, y);
if(output_data.R == 255 && output_data.G == 255 && output_data.B == 255)
{
my_new_Image.SetPixel(x, y, original_image.GetPixel(x, y););
}
myImage.SetPixel(x, y, Color.FromArgb(luma, luma, luma));
}
}
2nd:
Now the alternative is you want a rectangle where the finger or face is located within the original image. Again you have to loop through your result data instead here you want to record the top left position of data and the bottom right position of data it's easily done.
int X_min = myImage.Width, X_max = 0;
int Y_min = myImage.Height, Y_max = 0;
for (int y = 0; y < myImage.Height; y++)
{
for (int x = 0; x < myImage.Width; x++)
{
Color c = output_data.GetPixel(x, y);
if(output_data.R == 255 && output_data.G == 255 && output_data.B == 255)
{
if(x>X_max) X_max = x;
if(x if(x>Y_max) Y_max = y;
if(x>Y_min) Y_min = y;
}
}
}
Rectangle location = new Rectangle(X_min, Y_min, X_max, Y_max);
Since you mention face detection and you are doing complex image processing in c# I would recommend transferring to
EMGU [
^] which is c# wrapper for opencv image processing library. It will allow simpler programming of image processing algorithms and the Haar Classifiers for face detection are more efficient and output location like the 2nd process I have mentioned here is a good article
Multiple face detection and recognition in real time[
^].
I hope this helps,
Cheers
Chris