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

regarding output #12

Open
pankajkmr22 opened this issue Aug 4, 2023 · 3 comments
Open

regarding output #12

pankajkmr22 opened this issue Aug 4, 2023 · 3 comments

Comments

@pankajkmr22
Copy link

This is very well written I really thanks a lot
This code is very helpful for me but i am not able to see the output (perspective images)
I have used this code (below), foe showing output but the perspective image is not showing

I requested to please suggest to me or write a code for showing the perspective images.

if name == 'main':
img = im.imread('/content/drive/MyDrive/Street View 360_1.jpg')
equ = Equirectangular('/content/drive/MyDrive/Street View 360_1.jpg') # Load equirectangular image
img = equ.GetPerspective(60, 0, 0, 720, 1080) # Specify parameters(FOV, theta, phi, height, width)
#persp.toEquirectangular(img, center_point)

@guyanf
Copy link

guyanf commented Aug 7, 2023

`
from PIL import Image # +++++++
import Equirec2Perspec as E2P

if name == 'main':
equ = E2P.Equirectangular('src/image.jpg') # Load equirectangular image

#
# FOV unit is degree
# theta is z-axis angle(right direction is positive, left direction is negative)
# phi is y-axis angle(up direction positive, down direction negative)
# height and width is output image dimension
#
img = equ.GetPerspective(60, 0, 0, 720, 1080)  # Specify parameters(FOV, theta, phi, height, width)

img = img[:, :, ::-1]  # +++++++
img1 = Image.fromarray(img.astype('uint8')).convert('RGB')  # ++++++

img1.save("./out_img.jpg")  # +++++

`

You must add the line " # +++++".

@pankajkmr22
Copy link
Author

Thank you so much sir for your response

@pankajkmr22
Copy link
Author

pankajkmr22 commented Aug 7, 2023 via email

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