WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #1  
Old 06-05-2012, 06:07 AM
goro goro is offline
Member
 
Join Date: May 2012
Posts: 33
This simple code flips the texture but it doesn't solve the purpose..
Code:
import viz
viz.go()

ar = viz.add('artoolkit.dle')
camera = ar.addWebCamera()

camera.background.setEuler([180,0,0])
camera.background.setPosition([640,0,0])

marker = camera.addMarker('ar/patt.worldviz',width = 1000)

logo = viz.add('logo.ive')

viz.link(marker,logo)
Marker positions miss match with the image if we go with this code.
Reply With Quote
  #2  
Old 06-05-2012, 03:52 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You will need to "flip" the position/rotation values of the markers as well. You can use the link.swapPos and link.swapEuler commands to accomplish this. Here is some sample code:
Code:
import viz
viz.go()

#Add ARToolkit extension
ar = viz.add('artoolkit.dle')

#Create camera using first available webcam
camera = ar.addWebCamera()

#Flip background quad
camera.background.setEuler([180,0,0])
camera.background.setPosition([camera.texture.getSize()[0],0,0])

#Create a matrix marker with the specified id
marker = camera.addMatrixMarker(0,width=1000)

#Add logo model
logo = viz.add('logo.ive')

#Link logo model to marker sensor
link = viz.link(marker,logo)

#Swap X position and yaw,roll of euler rotation
link.swapPos([-1,2,3],target=viz.LINK_POS_OP)
link.swapEuler([-1,2,-3],target=viz.LINK_ORI_OP)
Reply With Quote
Reply

Tags
artoolkit, camera, flip, flip horizontally, webcam

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
User keyboard input without halting the program Zhi Vizard 2 06-23-2011 12:53 PM
Controlling User Input ohad Vizard 1 03-15-2010 05:16 PM
How to input several model files and then save one output file mspusch Vizard 1 07-15-2008 10:30 PM
problems with webcam plug-in v-clizzin Plug-in development 2 01-25-2008 03:06 PM
problem with input boxes shai Vizard 6 08-15-2005 10:51 AM


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


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