compute linear transform by fiducial markers