My question is similiar to the one a cv::Mat of std::vector ... how do I?
I need a matrix where each element is a std::vector. This matrix is the output of calculations done on a series of images of the same size (like a video ). Many of the calculations are typical cv functions (convert to gray scale, box filter etc. ) and the value of the pixel is then added to the vector. I do not know before hand how many images I will have and in any case, I cannot use the channel concept as images may be more than 512.
One of the suggested answers there was to use a Mat of pointers. So if I try the following, will it work?
This will be on Windows machines and I understand that the pointer size INT-PTR 64 bits wide. I could then use CV_64 but only CV_64F is defined. Since I will not be doing any calculations with this matrix, can I use this to store the pointers. I am thinking that before I read the first image, I will get the size, create this matrix, use "new std::vector" to create the vector for each pixel and store that pointer in the element. In the loop for my calculations I use the same access offset for to read the original images and to store the output in the vector. When I am done with the vectors, I need to delete these before I release the cv::mat.
I appreciate any input from those who know more about opencv than I do - this is really from the first application with opencv.