Reshaping nxnx3 Mat Object to 3xn.n

asked 2013-07-30 04:45:52 -0600

Haleema gravatar image

updated 2013-07-30 04:47:38 -0600

Hi,

I have to multiply each and every pixel held in a mat object by a 3x3 Matrix (each pixel as in R, G, B values are to be processed. RGB values will make a 3x1 matrix, hence the matrix multiplication)

I don't want to use for-loops because that makes the code inefficient. So, one way I found out is to change nxnx3 Mat object to 3xn.n, can anybody tell me how to do that?

Thanks!

edit retag flag offensive close merge delete