Log in or register to post comments

Objects shaking violently

November 2, 2011 - 9:45am #1

I am using Unity extension
Mac OS X 10.6.5
X code version 3.2.5
Unity 3.4
built from MacBook Prop, built onto an Ipad2 running ios 5.

Using the unity extension, in a built scene using Augmented reality, I am getting a lot of shaking from projected objects. Instead of siting firmly on or around the image marker, the bounce around violently. I have no lights, my AR camera device mode setting is set to default, and the world center mode is set to auto, playing around changing these seems to have no effect

This is similar to a previos post about a tall, however, I do not have the option of altering the projected objects shape.

I will try and lay the objects horizontally on the marker, instead of standing upright, to see if that helps. Otherwise, is there some setting that cen be changed to help fix this.

Objects shaking violently

November 20, 2012 - 2:27pm #9

I have similar problem and I developed solution based on median filter. Current object position is calculated also in base of previous positions.

Disadvantage of this method is that object loses some of its sensitivity. In my case remembering (buffering) 10 previous frames gives good results. 

 

Example:

Lets say that current frame number is n, modelViewMatrix is MVM and buffer length is 3. Current frame position will be:

(MVMn-3 + MVMn-2 + MVMn-1 + MVMn)/4

 

It should be write with epsilon, but I don't know how to do it on this forum. I think idea is simple.

Objects shaking violently

July 9, 2012 - 2:37pm #8

You'll need to implement any smoothing to the pose matrix from the Trackable. Some methods to investigate are statistical averaging, and low pass filtering of the changes in matrix values.

The pose matrix that QCAR delivers is a 3x4 row-major matrix. The 3x3 sub-matrix in left three columns is a pure rotation matrix (ortho-normal), whereas the right-most column is the translation vector. The pose matrix represents the pose of the target as seen from the camera. Hence, the translation vector says where the target is as seen from the camera. A value of <0,0,0> means that camera and target are at the same position, whereas a value of <0,0,10> means that the target is 10 units away into the viewing direction of the camera (an seen in the middle of the camera image). The rotation matrix says how the target is rotated with respect to the camera plane. An identity matrix means that the target is parallel to the camera plane. This pose matrix tells where the target is with respect to the camera. This is exactly what is needed to draw an augmentation. However, it does not tell how the camera is placed with respect to the target. If that is needed then the pose matrix needs to be inverted, which can easily be done by: [R | t]' = [R' | -R't] Here, R and t are the rotation matrix and translation vector and ' is the matrix inverse. Please note that since R is a pure rotation matrix (ortho-normal) the inverse is the same as the transposed and hence trivial to calculate. Here is an image of the coordinate system set up by the pose matrix: https://ar.qualcomm.at/resources/images/coordinateSystems.jpg

Objects shaking violently

June 28, 2012 - 12:34pm #7

Could please add the links to where these other discussions are taken place. It's hard to search or navigate this forum to find what you need. I have the same issue. My objects are smaller than the marker. I am outdoors when testing my AR so the sun is providing more than adequate lighting. I am 1.5 to 2 feet away from the markers so they are in range. 

 

How do we go about smoothing out the performance via scripting if there is no adjustment we can make from the inspector in Unity. 

 

Thanks

Objects shaking violently

June 28, 2012 - 12:34pm #6

Could please add the links to where these other discussions are taken place. It's hard to search or navigate this forum to find what you need. I have the same issue. My objects are smaller than the marker. I am outdoors when testing my AR so the sun is providing more than adequate lighting. I am 1.5 to 2 feet away from the markers so they are in range. 

 

How do we go about smoothing out the performance via scripting if there is no adjustment we can make from the inspector in Unity. 

 

Thanks

Re: Objects shaking violently

December 19, 2011 - 4:26am #5

Thanks, I'll have a look at that and see if it helps. Would be nice if other people how already dealt with shaking issues would post their experience.

Re: Objects shaking violently

December 19, 2011 - 3:54am #4

(I've sent a private message just to discover whether I know you given the user name)

The control to do this is in your hands - first try to keep the object size smaller than the target, and on a flat non-relective surface with minimal shadows and reasonable lighting conditions - all this helps. Make sure your target scores well in the "My Trackables" portal.

If you still want smoothing after that you can use the poseMatrix and average it, or its vector components, over a short period (albeit slowing reaction times), or use a multitarget, which can assist stability. Also, depending on your use case, you can use the poseMatrix to influence an animation of the object so that if you lose detection then your augmentation moves gracefully to a rest point or the next detection point.

There are various posts in the forum with more details on these techniques, and maybe other developers may share their experiences with you.

Re: Objects shaking violently

December 19, 2011 - 3:33am #3

What is the difference between the camera device mode settings?

I have a 5 star marker here and the tracking is very shaky too (ipad2).

Are there any parameter tweaks you can do (e.g. in FLARToolkit you have some settings to reduce shaking by 'only update marker if its move x amount of pixels', 'smoothing of positions over time',.) ?

Re: Objects shaking violently

November 2, 2011 - 10:12am #2

Hi briand3d,

Yes, do take a look at earlier posts in detail as there is a lot of discussion and ideas about this.

The first thing is to ensure that the target is as large as possible in the camera view - most shaking problems are caused when the target is at the edge of detection. Glossy paper, non-planar surfaces, poor lighting and shadows can degrade detection/tracking performance.

Log in or register to post comments