I have a large database of streetside panoramic images (similar to google maps). Each image is a stitched panorama. I convert this panorama from equirectangular to a cubic projection and obtain six 2048x2048 planar images. Does anyone know how can I calculate focal length for these images? I understand that the planar images are obtained from 'virtual cameras' but I am at a loss as to how to obtain focal distance from these virtual cameras.
What you know is the field-of-view. Any 4 images in a row covers exactly 360 degrees with no overlap, unlike the source images to produce the original stitched panorama.
So 4 images covering 360 means that image has 90 degree angle of view horizontally and vertically. The diagonal angle of view can be deduced by the Pythagoras Theorem to be just over 127°.
What you are missing is the sensor-size in order to change an angle-of-view into a focal-length. Keep in mind that the square images have an aspect-ratio of 1:1 when doing your calculations. You can find the necessary formulas here, which you can use once your data is complete.