OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Sun, 23 Nov 2014 04:42:51 -0600Simple matrix operation not working : is it normal ?http://answers.opencv.org/question/51340/simple-matrix-operation-not-working-is-it-normal/If I write for example image=255*image, the value of image is not updated (I should get a full white image). Is this normal ? Do I have to go through inner loops to multiply each element ?huehuehueSun, 23 Nov 2014 04:42:51 -0600http://answers.opencv.org/question/51340/Mat 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/