Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to reverse the process like Perspec2Equirec? #10

Open
meet1919 opened this issue Mar 17, 2023 · 1 comment
Open

How to reverse the process like Perspec2Equirec? #10

meet1919 opened this issue Mar 17, 2023 · 1 comment

Comments

@meet1919
Copy link

meet1919 commented Mar 17, 2023

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.

@fuenwang
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants