【发布时间】:2017-10-14 04:25:45
【问题描述】:
我有一个Mat 类型的"Features" 矩阵,有 20 行和 1 列,我在其中插入了值。
现在我想打乱矩阵的行。有什么方法可以洗牌或a guide on how to do this in Java吗?
int rows = 20;
int cols = 1;
int index = 0;
Mat Features = new Mat(rows, cols, CvType.CV_64F);
for (int i = 0; i < rows; i++) {
if (i < 10)
Features.put(i, 0, responseA[i]);
if (i >= 10) {
Features.put(i, 0, responseB[index]);
index++;
}
}
【问题讨论】: