MATLAB: Image warping / transformation

image processingImage Processing Toolbox

Hello!
As you can see below I have a bw masked image from a cube, with detected corners, in total 12 cornerpoints. Thus, I have the x,y coordinates for each corner as well.
Is it possible to warp each cube face into something similar to the picture below and then extract them into a new picture, and if so how do I do that?:
Thanks in advance!
Related Question