I'm taking an image processing class at school, and have a project on image stacking. I've taken several images and stacked them in Photoshop, and have gotten a nice photo with depth of field reconstruction. Now I have to get a little more technical with how Photoshop does this. Can you give me a brief idea what algorithms are used to determine what is used for the final image? I'm guessing an algorithm using edge detection is one of them that determines what is in focus.