optimization of Image Reconstruction Algorithm using Genetic Algorithm in Matlab
One simple approach would be taking the mean square error (MSE) by using

fitness_1 = mean((inputimage(:) - reconstructedimage_1(:)).^2)


though, as your image size won't change, you can ommit the mean and use sum instead.

fitness_1 = sum((inputimage(:) - reconstructedimage_1(:)).^2)


In general you want to have some kind of distance measure. Look at Wikipedia (especially at Other distances) for more sophisticated approaches.