Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I finally got into the code to understand why this bug occurred, and I think I figured it out, finally. But I don't know how to submit it so everybody's opencv is fixed in next release.

The problem was in file /ROOT/modules/core/src/out.cpp, at lines 151, 168, 190, 207, and 226, when calling the writeMat() method. The last parameter called singleLine is a Boolean which is true if the data matrix has only one line, so as not to print the final \n if it is the case.

But each time this function is called, the number of colons is given instead of the number of lines !

therefore the correction of the code would be changing writeMat(out, m, ';', ' ', m.cols == 1); into writeMat(out, m, ';', ' ', m.rows == 1); or similar process at each of the lines given above.

I tested it and it works fine !