2

这段代码:

int main() {
    Mat input_img = imread("abcdef.png", CV_8UC1); // Image of size 1000*800
    Moments moment = moments(input_img, false);
    double humm[7];
    HuMoments(moment, humm);
    for (int i = 0; i<7; i++)
        cout << humm[i] << endl;
}

打印出来:

0.000789284
1.24093e-07
2.37587e-15
1.48852e-15
-3.19408e-31
4.09704e-20
-2.78098e-30

这是错误的。胡的不变量矩不小。我只记得在某个地方读过,第一个时刻通常>100,第二个>60……我错过了什么吗?

4

0 回答 0