1. A computer-implemented method for automatically grouping related images, comprising: using a general-purpose computing device to perform the following method: inputting a set of unordered images containing a collection of unordered and unorganized images; analyzing metadata associated with each image in the unordered image set to determine the related images; generating a potential image subset containing the related images based on results of the metadata analysis; analyzing and verifying the potential image subset by opening each image of the potential image subset and examining each pixel of each image to determine a type of spatial relationship between the pixels and an amount of spatial overlap of pixels in images of the potential image subset; and automatically determining whether the potential image subset is a panorama, which contains a significant amount of motion between images, has spatial overlap, and contains images that cover different portions of a scene; if the potential image subset is a panorama, then grouping the images in the potential image subset that are panoramas for processing by a first image processing technique comprising: an image stitching technique that is used to stitch the images in the potential image subset together and create a panorama; automatically determining whether the potential image subset is a true image stack, which contains images having spatial overlap and capturing the same scene but has little or no camera motion between images; if the potential image subset is a true image stack, then grouping the images in the potential image subset that are true image stacks for processing by a second image processing technique comprising: (a) a best picture selection technique or an image merging technique, if the potential image subset is a true stack; (b) a high-dynamic range technique, if the potential image subset is a multiple exposure stack; (c) a photomontage technique that takes a collection similar images and creates a single composite image, if images of the potential image subset have similar exposure.