Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Spilit function

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;< p="">

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

Spilit function

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;< p="">

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

Spilit Split function

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;< p="">
<<endl;

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