Suppose you have several small images, all cropped from a single large image. Each small image is some subrectangle of the large image. The small images have sufficient overlap with each other. However, you don't have the large image: given the small images, how do you recover the large image? Is there software to automate this?
Assume we are dealing with lossless image formats such as PNG. There is no rotation, perspective distortion, or any other fuzzing involved, each input image is an exact crop of the desired output image.
Somewhat more precisely, find an image X, possibly with some "blank" pixels, such that:
- Every input image is a subrectangle of X.
- Every pixel of X is either "blank" or comes from at least one of the input images.
- X is "as small as possible".
The first two requirements are precise, I have not made the third one perfectly precise. The third requirement is to rule out trivial solutions such as simply putting the input images side-by-side in some order. Blank pixels are allowed since the input images may not line up perfectly to form a rectangle. For example, if the inputs are
ABC EFG DEF HIJ
I'd expect the output to be
ABC DEFG HIJ
(Here each letter represents a pixel of a specific colour. For example perhaps each A is a white pixel, each B is a black pixel, and so on.)
A use case is combining several screenshots of something which you can pan (such as a map or a game).
A brief Google search did not yield software to do this. There are panorama-stitching tools like Hugin, but they are "too intelligent" and I'm not sure if they can be made to satisfy the "every input image must be an exact crop of the output" requirement.