View Full Version : One webcam for AR in HMD
infouser
12-13-2012, 04:02 AM
Hello,
Could you help with the code to use one generic webcam to create augmented reality background for both eyes in HMD?
Thanks.
The Display Background Texture (http://kb.worldviz.com/articles/813) article includes an example script that applies a static texture to the background. Just replace the static texture object with your camera texture object.
Replace:
#Create background quad and apply a texture
background = addBackgroundQuad()
texture = viz.add('lake3.jpg')
background.texture(texture)
With:
#Create background quad and apply camera texture
background = addBackgroundQuad()
video = viz.add('VideoCamera.dle')
cam = video.addWebcam()
background.texture(cam)
infouser
12-18-2012, 05:43 AM
Thanks again, it works
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.