Conversation
…s non-continuous, and thus all the pixel-wise functions process it correctly (i.e. row-by-row, not as a single row, where integer overflow may occur when computing the total number of elements)
|
BTW, Do we want to fix "continuous" / "contiguous" mess? Memory block is contiguous. Related StackOverflow questions:
|
|
yes, definitely. And it's not a mess at all. On small images (like 20x20) this trick with Size size = mat.size();
if( mat.isContinuous() ) { size.width *= size.height; size.height = 1; }
can accelerate processing by 10-20% in the case of simple functions. And it's put in many places of the library and in the user code as well. Obviously, this trick can only be done with |
…t makes testing slower by 1 minute (on our buildbot)
|
I mean this typo: -continous
+contiguousOne more reference: https://docs.scipy.org/doc/numpy-1.10.0/reference/generated/numpy.ascontiguousarray.html |
…rder to reduce the test execution time
|
Do I understand correctly that huge arrays (matrix 1xN) are still not supported by cv::Mat? Or is it somehow solved too? |
make sure that the matrix with more than
INT_MAXelements is marked as non-continuous, and thus all the pixel-wise functions process it correctly (i.e. row-by-row, not as a single row, where integer overflow may occur when computing the total number of elements).resolves #10211