Vectorizing matrix access like Matlab

asked 2014-05-27 10:54:20 -0600

Is there a way to access multiple elements of a matrix in a way that is similar to Matlab? I have a list of indices for one matrix that I want to copy into another matrix using another list of indices. It's a nonlinear mapping so I haven't found an easy way to do this other than in Matlab. I've tried going through the list and copy each item using At, but that is much too slow. Any other options to try?

Thx

edit retag flag offensive close merge delete

Comments

It is clearer and easier for an answer if you provide more information or example. By the way, Matlab is dedicated for matrices' operations and this is not the aim of OpenCV, you may not easily find an optimal solution that is fast and convenient but one of the two: fast and complicated vs. slow and convenient.

tuannhtn gravatar imagetuannhtn ( 2014-05-27 11:06:22 -0600 )edit