Ask Your Question
0

Extract specified row from cv::Mat

asked 2012-09-07 00:53:18 -0600

Hyon Lim gravatar image

Hi. I'm looking for good expression equivalent to the following MATLAB matrix manipulation.

p=[1 4 2 3 5 11 7 13 6 12 8 14 17 9 15 18 10 16 19 20] ;%rearrange the columns of A A=A(:,p);

It is really painful when do above job manually. Any idea?

edit retag flag offensive close merge delete

Comments

Can you explain what that does for non-matlab programmers?

Rui Marques gravatar imageRui Marques ( 2012-09-07 04:50:18 -0600 )edit

You can extract specified row from Mat with Mat::row(int y), see more at http://docs.opencv.org/modules/core/doc/basic_structures.html?highlight=mat%3A%3Arow#mat-row, or if it's not, please explain.

Daniil Osokin gravatar imageDaniil Osokin ( 2012-09-07 05:43:33 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2012-09-07 10:08:11 -0600

AlexanderShishkov gravatar image

Please use row(int i) method or rowRange.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-09-07 00:53:18 -0600

Seen: 10,227 times

Last updated: Sep 07 '12