Equirec2Perspec
Equirec2Perspec copied to clipboard
regarding output
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)
` 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 " # +++++".
Thank you so much sir for your response
Thank you so much sir for your response. This code is very important for usRegardsPankaj KumarPh.D Research scholarDepartment of Civil Engineering(Specialization: Transportation Engineering)Indian Institute of Technology KanpurKanpur - 208016, U.P. , INDIAContact: +91- 6202689789On Aug 7, 2023 07:59, Thomas @.***> wrote: ` 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 " # +++++".
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>