How to unwrap a cubemap from a sphere?

I’m trying to use a cubemap for a 360 view for a pixel comparison.
Unfortunately, cube maps distort the view so that they can be mapped onto a cube or sphere.

My goal is to go from something like


to something like
ImageB
like unwrapping a globe.

I need the pixels to be the size they would be if they were in the center of the camera at capture.
Another thing that would work for my case is if I could get the amount that each UV position gets distorted upon capture and make a dataset of those values to use for scoring in my pixel comparison.

I would greatly appreciate any help! :slight_smile: