transform mat to 3 vect x,y,w
clear up