Sorry bout the confusion.

<vector<vector<CvRect>>foo;
Changing everything to CvRect.

need foo to grow 5 rows and 1 column on demand. thats the real issue