In this research, we use the concept of simulated annealing to design the optimized reference image, and to combine with a Mach-Zehnder joint transform correlator (MZJTC) for identifying the different deformation of the target. First, we fetch out 15 black and white butterfly diagram images every 2° by rotate on from -14° to 14°, where the original image is used as the target image and the others are as training images. In the beginning, the system yields one reference image by minimum average correlation energy (MACE) method. Then we apply the convergence characteristic of simulated annealing (SA) in Mach-Zehnder joint transform correlator. Finally it can accurately determine the location of the target image when the system minimizes the correlation plane energy to yield the sharp correlation peak.