First time here? Check out the FAQ!
answered 2019-04-04 20:17:03 -0600
You want to use cv::moments using a.col(i), where i is the column number.
The output is a structure that contains the moments. The y location of the mass center (the mean) is m01/m00.