So, I was using javaCV before. This is the code i use for color tracking
CvMoments moments = new CvMoments();
cvMoments(imgThreshold, moments, 1);
double momX10 = cvGetSpatialMoment(moments, 1, 0);
double momY01 = cvGetSpatialMoment(moments, 0, 1);
double area = cvGetCentralMoment(moments, 0, 0);
When I use OpenCV 2.4.4, I convert the code into this
Moments moments = new Moments();
moments(imgThreshold,true);
but its not working.
And what is the replacement of cvGetSpatialMoment?