Split function [closed]
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].
Have you read minMaxLoc doc ? Use parameter 4 and 5
Got correct results...Thanks!!