Added rgb2tensor export function