OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Wed, 03 Apr 2013 03:50:48 -0500Mat per-element operation: vector-matrix multiplicationhttp://answers.opencv.org/question/10619/mat-per-element-operation-vector-matrix-multiplication/**I** is an *mxn* matrix and each element of **I** is a *1x3* vector (**I** is a 3-channel Mat image actually).
**M** is a *3x3* matrix.
**J** is an matrix having the same dimension as **I** and is computed as follows: each element of **J** is the vector-matrix product of the corresponding (i.e. having the same coordinates) element of **I** and **M**.
I.e. if *v1(r1,g1,b1)* is an element of **I** and *v2(r2,g2,b2)* is its corresponding element of **J**, then *v2* = *v1* * **M** (this is a vector-matrix product, not a per-element product).
Question: How to compute **J** efficiently (in terms of speed)?
Thank you for your help. NesbitWed, 03 Apr 2013 03:50:48 -0500http://answers.opencv.org/question/10619/