I’am actually working in a project on android in which I want to extract some specific pixel values (according to a condition, using the threshold method , I have set some pixels to a certain values and all the others to zero) I want to extract all these values different from zero in a vector. I will use this vector of the chosen pixels to do some operation ( the mean value for exemple ) , Is there a method in OpenCV that can help me doing this ?
Thank you 🙂
I don’t know such function but actually it’s not hard to implement it (c++):
And also many OpenCV functions have
InputArray maskparameter so use it! For example:void meanStdDev(InputArray src, OutputArray mean, OutputArray stddev, InputArray mask=noArray())