Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

i don't see the reason for the size restriction (bug ?), but you'll have to work around it by either

// using the * operator, like:
Mat cov = img * transposed;

or:

// full blown gemm:
gemm(img, transposed, 1, noArray(), 0, cov);

however, a conversion to float or double (before the transpose()) is mandatory:

img.convertTo(img, CV_32F);

i don't see the reason for the size restriction (bug ?), (though it says so in the docs), but you'll have to work around it by either

// using the * operator, like:
Mat cov = img * transposed;

or:

// full blown gemm:
gemm(img, transposed, 1, noArray(), 0, cov);

however, a conversion to float or double (before the transpose()) is mandatory:

img.convertTo(img, CV_32F);