I am getting a (non perspective) transformation from tracking data. The transforms are accurate, but there is small jitter that I would like to get rid of.
Now the obvious thing is to use Decompose (Transform), put a damper on translate, scale and rotate (the rotate one on cyclic) and then back to a transform (with Transform (3D) ) or so).
My problem is that both Scale and Rotate values jump around between being negative and positive. The thing here: I know that Scale is 1,1,1, but sometimes, it goes to -1 randomly. Looks like:
Now, first part of the question: is there something like decompose that doesn’t try to decompose scale? So I tell it that it’s not scaled in any way?
Second part: How do I ‘scale’ these rotation values correctly? I was thinking of multiplying the scale and rotation values, but that doesn’t work as I expected.
Take a look at the Hysterisis node, it is meant for exactly those scenarios (jittery input).
For the scale you can just use RootMeanSquare, to always keep it positive. The rotation I guess goes between -0.5 and 0.5, so if you convert them to cartesian coordinates and back to rotation, you will get the right result. Then add hysterisis to smooth it out.
you could also dig into the decompose code of slimdx or sharpdx, it should not be too complicated to write a dynamic plugin and ignore the scale part.
but i think that the sign flip does not necessarily come from the decompose, but rather from the solver of the tracking. so check the matrix before the decompose and see if it also flips signs. if yes, you need to filter before the solver, for example filter the input points or so…