Equirec2Perspec icon indicating copy to clipboard operation
Equirec2Perspec copied to clipboard

How to reverse the process like Perspec2Equirec?

Open meet1919 opened this issue 3 years ago • 1 comments

Hi @fuenwang , Thanks for the amazing research. I have followed your work on Bifuse++ and 360 layout visualizer. You are awesome.

I have been looking at the Equirec2Perspec.py and wanted to reverse the process.

Image 1 - Original image

Image 2 - Perspective perspective

What if I made some changes in the 2nd image (output of Equi2Perspec.py) and want to stitch it back to the original (Image 1). How can I do that?

I assume that there will be some transformations that needs to be done on the Image 2 (perspective image) to change the projection lines and replace the patch with the updated one.

meet1919 avatar Mar 17 '23 06:03 meet1919

Hi,

I didn't implement Perspec2Equirec funtion. But I have implemented the funtion to transform a cubemap back to equirectangular. Basically, you could assume each perspective image as a plane, and calculate the intersection points of rays toward these plane from a equirectangular projection. You can refer to this code for more details. https://github.com/fuenwang/PanoramaUtility/blob/master/Utils/Cube2Equirec.py#L70

fuenwang avatar Mar 18 '23 09:03 fuenwang