View Full Version : lat long mapped video
Brett Lindberg
12-18-2008, 03:54 PM
We have a couple of point grey ladybug cameras that record spherical video.
The video they take is normally saved as a lat-long/cylindrical panoramic mapped video.
We want to use this in an augmented reality setup: is there a good way to use this video as a panorama "skybox" in vizard, instead of the cube-map method?
Brett Lindberg
12-19-2008, 08:21 AM
(Prior to the post, I had textured a large sphere with the video, and it worked fine; it would be better, though, if the "sphere" were at an infinite distance)
farshizzo
12-19-2008, 10:08 AM
I downloaded a sample video from the Point Grey Ladybug website and used the following script to view the video:import viz
import math
viz.go()
#Add panorama video
video = viz.add('video.avi',play=1,loop=1)
#Radius depends on aspect ratio of video
w,h,_ = video.getSize()
HEIGHT = 5.0
RADIUS = (w * HEIGHT) / (float(h) * 2.0 * math.pi)
#Add panorama cylinder
panorama = viz.add('pano_cylinder.ive',scale=(RADIUS,HEIGHT,R ADIUS))
panorama.texture(video)
#Make sure panorama appears at infinite distance
panorama.disable(viz.DEPTH_TEST)
panorama.drawOrder(-100)
#Keep panorama centered around main view
viz.link(viz.MainView,panorama,mask=viz.LINK_POS)
#Setup a panorama camera navigation
import vizcam
vizcam.PanoramaNavigate()I've attached pano_cylinder.ive file to this post. It is simply a cylinder that faces inward. Let me know if this works for you.
Brett Lindberg
02-25-2009, 07:41 PM
Thanks: that worked great!
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.