I have an image represented with a Numpy array, i.e. each pixel is an array [r,g,b]. Now, I want to convert it in YUV using matrix multiplication and trying not to use loops.
self.yuv=self.rgb
self.yuv=dot([[ 0.299, 0.587, 0.114 ],
[-0.14713, -0.28886, 0.436 ],
[ 0.615, -0.51499, -0.10001]],
self.yuv[:,:])
I get the error - objects not aligned. I guess that's because self.yuv[i,j] is not a vertical vector. transpose doesn't help.
Any ideas?