A common thing to do in machine learning is to have the first column of a dataset represent the class that the corresponding row belongs to for a data point.
Basically, I have a cv::Mat and I want to efficiently create a cv::Mat containing that matrix with the first column removed. Is there a more efficient way of doing this than looping over the columns and rows and adding the elements one by one with mat.at<data_type>(row, col) = elem; ?
See Mat::operator() from OpenCV documentation.