用cvMoments函数时有一个参数是CvMoments * 结构,但是需要对这个结构初始化,也就是申请内存,用moment = (CvMoments*)malloc( sizeof(CvMoments) 就可解决,这个图像和序列等得初始化是不一样的