Meaning of mu in moment search.

asked 2015-12-02 05:25:00 -0600

zms gravatar image

Hello, I went through my code and then I counter this. Err what is the meaning of mu(contours.size)? What I understand from this code, it will find the moment for every contours found. But what is the meaning of mu? TQ

vector<moments> mu(contours.size() ); for( int i = 0; i < contours.size(); i++ ) { mu[i] = moments( contours[i], false ); }

edit retag flag offensive close merge delete

Comments

2

It's the variable name. When using vector<moments> mu(contours.size());, you're just defining the variable and setting its size to the size of the vector of found contours

LorenaGdL gravatar imageLorenaGdL ( 2015-12-02 05:38:07 -0600 )edit
berak gravatar imageberak ( 2015-12-02 09:55:20 -0600 )edit
2

@berak it looks (see here) you are using "bad link". Good one should be http://docs.opencv.org/3.0.0/d0/d49/t... ;)

pklab gravatar imagepklab ( 2015-12-02 10:06:31 -0600 )edit

^ ah, true. thanks for reminding !

berak gravatar imageberak ( 2015-12-02 10:12:55 -0600 )edit

thanks everyone!!

zms gravatar imagezms ( 2015-12-03 06:18:13 -0600 )edit