Good morning,
When I copy a part of a cv::Mat of size 5000X46357 and type=CV_32F to a cv::Mat of size 100X46357 and type=CV_32F, it take 3ms. To reduce this time, I initialize the cv::Mat of size 100X46357 to ones, but this take 7ms and it doesn't reduce the time of copy. Is it normal that cv::Mat::ones take this time?
I have also a problem with this matrix when I pass it in a function after the copy, if I don't initialize it with ones, the function take 9.5ms but if I initialize with ones, the function take 2.5ms; is it normal that the initialization of the matrix outside the function affect the time of the function?
My final problem is that I do a matrix operation who take 0.014ms and when I affect this operation to a matrix, it take 4.7ms. The result matrix has a size of 2X46357 and type=CV_32F .
So, is it normal that allocation and give data to a matrix take too much time?
Thank you for your respond.