Convert Mat.type and convert Mat to vector
Hello
1) Given a Mat M and vector< double > v, how do I extract the 1st column and store it in a vector ? I have tried M.col(0).copyTo(v) but I am getting an error "Heap Corruption Detected". I am however, able to do so if v is a Mat itself. I just want to know why I cant convert it to a vector.
2) Do i have to take note of anything when using convertTo(OutputArray m, int rtype, double alpha=1, double beta=0 ) ? Like if i were to convert 64F to 8U for display purposes, do I have to perform the scaling operation or does the function takes care of it i.e. I do not have to worry about anything.
3) Is it more efficient to process vectors or Matrices ? Eg a vector< vector< int >> vs a 2D Mat and a vector< int > vs a 1D Mat (row or column Mat). I know http://docs.opencv.org/2.4/doc/tutori... covers how to process matrices efficiently but I also want to know if it is faster to process a vector or a matrix.
Thanks !