WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-15-2008, 12:38 AM
rophat rophat is offline
Member
 
Join Date: Aug 2008
Posts: 3
Thanks for the prompt reply! It helps a lot!
Reply With Quote
  #2  
Old 08-18-2008, 12:11 AM
rophat rophat is offline
Member
 
Join Date: Aug 2008
Posts: 3
Another question

Hi,

Back to the marker/tracking question:

I know it's probably OK to render the virutal object in another location rather than stick it on the marker (i.e. apply some tranformations). However, if the marker is used as a tracking reference, i mean for matching the 2D projection of the marker and the virutal object, how do you then work out the projection angle of the virtual object when it is placed at another location?

For example, if we place the marker on the wall, how do you make the virtual object stand vertically on the table rather then sticking horizontally on the marker on the wall? Of course, this is a simple case because of they are roughly right-angled, we will appreciate a more general approach.

We will definitely wriite Vizard into our budget plan if this can be solved.

Many thanks!
Reply With Quote
  #3  
Old 08-18-2008, 05:11 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You can use the ARCamera.setGlobalMarker() command to use a marker as a global reference frame. For example, if you have a marker that is 300mm wide and hanging on the wall 1 meter away and 0.5 meters above the table, then you would use the following code:
Code:
import viz
viz.go()

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

#Create camera from texture
camera = ar.addWebCamera()

#Create marker from pattern file
marker = camera.addMarker('ar/patt.worldviz',width=300)

#Generate matrix of marker in global reference frame
m = viz.Matrix()
m.setPosition(0,0.5,1)
m.setEuler(0,-90,0)

#Use marker as global reference frame for camera
camera.setGlobalMarker(marker,m)

#Add object that should appear on table
viz.add('logo.ive')
If you are not using a camera parameter file that has been calibrated for your camera then the offset positions won't exactly match the physical positions. So you might need to tweak them for the object to appear at the correct location.
Reply With Quote
Reply

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
General question and question regarding arrays dan12345 Vizard 1 01-15-2008 10:15 AM
Another general (curious) Questions... k_iwan Vizard 5 08-29-2006 03:44 PM
General Questions about Vizard: World Viz dav Vizard 5 08-28-2006 03:44 PM
Antialiasing questions oodini Vizard 1 12-06-2005 12:08 PM
Vizard 2.51 beta testing questions Gladsomebeast Vizard 2 03-03-2005 05:09 PM


All times are GMT -7. The time now is 06:26 PM.


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