Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to element-wise multiplication of Mat.

    Mat A;
    Mat B;
    Mat C;

    C = A * B; //element_wise;

Expected result:
Assume

    A =  [a, b, c; 
          d, e, f; 
          g, h, i]; 

    B =  [1, 2, 3; 
          4, 5, 6; 
          7, 8, 9]; 

    C =  [a * 1, b * 2, c * 3; 
          d * 4, e * 5, f * 6; 
          g * 7, h * 8, i * 9]; 

    Can I use the cv::multiply(A, B, C); ?