1. An image processing device comprising: a processor; and a memory storing computer-readable instructions therein, the computer-readable instructions, when executed by the processor, causing the image processing device to perform: acquiring first image data representing a first image having a plurality of pixels and second image data representing a second image having a plurality of pixels, the second image including a search region, a plurality of candidate regions being included in a part of the search region; selecting a candidate region from among the plurality of candidate regions in the search region; calculating, for the selected candidate region, a degree of similarity between a reference region and the selected candidate region, the reference region being a part of the first image; identifying a corresponding region in the search region, the corresponding region corresponding to the reference region; determining whether a first variance condition is met, the first variance condition indicating that variance among pixel values of pixels in a determination region is greater than or equal to a prescribed first value, the determination region including at least one of at least a part of the search region and at least a part of the reference region; and generating combined image data by using the first image data and the second image data, the combined image data representing a combined image in which the first image is combined with the second image by overlapping the reference region with the identified corresponding region, wherein in a first case where the first variance condition is met, the calculating is repeatedly performed while the selecting changes a selection of a candidate region from among the plurality of candidate regions until the calculating finds a degree of similarity greater than or equal to a reference value, wherein in the first case, once the calculating finds the degree of similarity greater than or equal to the reference value, the candidate region corresponding to the found degree of similarity is identified with the corresponding region, wherein in a second case where the first variance condition is not met, the calculating is repeatedly performed while the selecting changes a selection of a candidate region from among the plurality of candidate regions to obtain at least two degrees of similarity for at least two candidate regions among the plurality of candidate regions, wherein in the second case, the identifying identifies a candidate region having a maximum degree of similarity among the at least two degrees of similarity with the corresponding region.