Added fiducial check

Now checks the number of fiducials before using it to calculate the
transformation matrix.