Remove 3D effect

Jan 25, 2011 at 7:01 AM

Hi,

I have created sample application using the SLARToolkit. As per the marker moment it adjust the image. I want to disable the 3D effect so that image will remain flat on the screen. Can anyone help me to disable the 3D effect?

 

Thanks,

Coordinator
Jan 25, 2011 at 9:30 AM

You will have to look into the Matrix3D struct and reset all the elements for the 3rd dimension before you apply the perspective transformation. Since it's a matrix you can't extract the scale and rotation, because they are multiplied, but You can easily extract the translation from the matrix (Offset properties): http://msdn.microsoft.com/en-us/library/system.windows.media.media3d.matrix3d(v=vs.95).aspx

Or you can use the coordinates of the Square property that is provided in a DetectionResult. See the SLARToolkit sample about how it's used there to draw a red rectangle around the marker. 

 

- Rene Schulte