Split function [closed]

asked 2017-08-30 08:55:22 -0600

vps gravatar image

updated 2017-08-30 09:48:15 -0600

LBerger gravatar image

Hi all,

I am finding the nonzero element. Non zero element indexes are stored in the matrix. After that I am spiting the matrix. So, I can get the minimum column value. I am able to get the minimum column value but I need the value row which associated to the column value.

Mat image, image_nonzero, splitmat[2];
findnonzero(image, image_nonzero);
split (image_nonzero, splitmat );
double columnmin, columnmax;
minMaxLoc(splitmat[0], &columnmin, &columnmax);
cout << "minimum column value " << columnmin <<endl;

Now, I need the row value which is associated with minimum column value in splitmat[1].

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by LBerger
close date 2017-08-31 09:42:03.688347

Comments

Have you read minMaxLoc doc ? Use parameter 4 and 5

LBerger gravatar imageLBerger ( 2017-08-30 09:51:11 -0600 )edit

Got correct results...Thanks!!

vps gravatar imagevps ( 2017-08-31 09:25:11 -0600 )edit