1 2 3 4 5 6 7 8 9
cv::Mat A = (cv::Mat_(3, 3) << 1, 2, 3, 4, 5, 6, 7, 8, 9); // create a 3x3 matrix "A" cv::Mat B = A.colRange(0, 2); // extract first two columns of "A"
1 2 4 5 7 8This function is part of the OpenCV package library, which provides image and video processing functions.