Brightness and contrast VS Gamma, is it possible to identify the gamma "correction amount"? Trichoplax question aroused my curiosity and the answers in this question also reminded me why I sometimes use different gamma "amounts" to enhance images.

Therefore, is it possible to determine the amount of gamma applied to an image by knowing its source (the original image)? I.e. can the mathematical formula be applied to compare two images and determine the difference in gamma "amount"?

Example: which of the following have a different gamma amount (I'll give you a non-edible cookie if you find out, and sorry trichoplax for snatching your ball):
If I get correctly what you are asking you basically just need to find the G in this equation: 

$$Image_{out} = Image_{in}^G$$

This could be easily solved as 

$$G = \frac{\log{Image_{out}}}{\log{Image_{in}}}$$

Because usually gamma is applied in a uniform fashion on the image, you can just pick any two non zero pixel values (one for source and one for destination) to find out the gamma value applied.  

EDIT: As @ChristianRau pointed out, if you don't actually know if the image has been modified with gamma correction, you have to take an higher amount of samples and trying to fit a gamma function on those. If a fit to a gamma function results in too many significant outliers, then probably gamma correction wasn't the function applied.