我创建了一个结构:
struct clusters_t {
cv::Mat ids;
cv::Mat means;
vector<cv::mat> covs;
cv::Mat weights;
} clusters;
我在填写&#34; covs&#34;时遇到问题。我保留了内存,就像我在下面显示但是......我怎么能在垫子的矢量中复制一个垫子?
clusters.covs.clear();
clusters.covs.reserve(0);
cv::Mat matrix;
newCovs.copyTo(clusters.covs.at(0)); //<-- DOESN'T WORK... HOW CAN I COPY matrix inside the vector?