convert vector to mat