In a previous question Karsten 7. proposed an elegant image-manipulation solution on how to overlay two images.
However in the following case the method does not properly work and needs refinement. Let me be more specific:
An image of real galaxy
And here is an image of a numerical simulation
As you can see, there is a problem with the first image. More precisely, the entire galaxy is slightly titled to the right.
Is there a way to fit the numerical simulation image on top of the real galaxy? The green and red arms should be rotated, stretched, moved and whatever is necessary, so as to fit exactly to the arms of the real galaxy.
The output should be something similar like this
Any suggestions?
img1
andimg2
:ImageAdd[img1, ImageApply[If[Min[#] > 0.5, {0, 0, 0, 0}, Append[#, 1]] &, img2]]
, but that particular fit looks awful to me. Is it good enough for you? If not, why not, and how should I evaluate whether a particular alignment of the images is 'good enough'? If you just want to overlay them by eye, I'd suggest using photoshop or the gimp. $\endgroup$ – nben Aug 17 '16 at 17:27