For some reason, the python script you provided doesn't work for me.
I have tried with different images, that i know at which altitude above ground they were take but the script is giving wrong values.
For instance, one of the photos was at 30m above ground, the elevation value for that...