Ask Your Question

Revision history [back]

What you could do is creating a matrix for each activity and the 100 samples. The creating layers for the actual features using the vector type. Pseudo code would look like:

Mat activities = Mat::zeros(10, 100, CV_8UC1); //change type depending on your feature values
vector<Mat> complete_data;    
for(int i = 0; i < 435; i ++){
    complete_data.push_back(activities);
}

You can now loop over the layers and then iterate through the matrix using the at<uchar> operator.

Or you could do it the other way around and create for sample a 436 x 100 matrix and create a vector of size 10. It can be as dynamic as you prefer.