您可以使用Mat::col(int j)方法获取第一列
Mat m;
Mat col1 = m.col(0)
Run Code Online (Sandbox Code Playgroud)
或者,您可以使用Mat::colRange(int startCol, int endCol)不带第一列的原始矩阵:
Mat noCol1 = m.colRange(1, m.cols)
Run Code Online (Sandbox Code Playgroud)
请记住,实际数据不会被复制,而是与原始矩阵共享.要获得该值的副本,您可以使用Mat::clone().