1. An image processing device which obtains a corresponding vector indicating an association from a target block on a first image to a corresponding block on a second image, which is different from the first image, the device comprising at least one processor programmed to: acquire candidate vectors from among corresponding vectors which have been calculated for each of the candidate blocks around a target block; set particles indicating positions on the second image around each of candidate corresponding blocks indicated by each of the acquired candidate vectors using the target block as a reference, and arrange particle vectors indicating each of the particles by using the target block as a reference; calculate a weight based on differences between pixel values of the target block on the first image and pixel values of each block on the second image specified for each of the particles, and give the calculated weight to each of the particle vectors; obtain a solution of the corresponding vector for the target block on the basis of a weighted average over all of the particle vectors; and transmitting the solution of the corresponding vector to an image generator, the image generator being configured to generate one or more images based on the solution of the corresponding vector.