Given an image of (part of) a sphere of known size, can one calculate the distance to the camera based on the relative size of the sphere in the image? My instinct is "no" unless you have some fixed parameters either for the camera, the resulting image, or at least an object in the foreground for reference.
Then you would attempt to calculate the size of the 2D sphere based on the visible segment and use some ratio to determine the distance as compared to the actual known thing.
Am I on the right track or how would you do this? In the example below, we could attempt to fix variable related to the camera or by using the humanoids in the bottom left corner.