Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

get values of nonZero elements of a 2-dim cv::Mat

I want to get values of nonZero elements of a 2-dim cv::Mat and put the result on a cv::Mat. How I can do this ? I used following code to get the index of nonZero elements :

cv::vector<cv::vec2i> nonzero ;

cv::findNonZero(mask,nonzero);