WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   One webcam for AR in HMD (https://forum.worldviz.com/showthread.php?t=4442)

infouser 12-13-2012 04:02 AM

One webcam for AR in HMD
 
Hello,

Could you help with the code to use one generic webcam to create augmented reality background for both eyes in HMD?

Thanks.

Jeff 12-17-2012 09:47 AM

The Display Background Texture 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:
Code:

#Create background quad and apply a texture
background = addBackgroundQuad()
texture = viz.add('lake3.jpg')
background.texture(texture)

With:
Code:

#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


All times are GMT -7. The time now is 11:17 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC