Re: Sorting 2D CvMat* Matrix

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: Sorting 2D CvMat* Matrix

Actually, I was wondering if OpenCV itself has the function thinking
sth within opencv is faster than what we code. Since i didn't find it
in opencv, I did it on my own. Instead of creating an extra matrix, i
just created a temp row to store one of the rows for swapping. Thanks
for the reply.
--- In [hidden email], "Lim Yeen Fei" <cloud_roti_canai@...>

> --- In [hidden email], "anjan_nepal" <anjan_nepal@> wrote:
> >
> > hi,
> > I need to arrange the rows (records) of a matrix according to the
> > sorting of one of the columns. Is there any way to do that simply? If
> > you didn't get what i'm trying to say, i'm searching for exactly sth
> > that the sortrows() function in matlab does.
> >
> you can create an extra matrix with size of your data row, then use it
> as buffer for swapping between rows. or create another full size matrix
> and fill it up with arranged rows