fix black screen when input Mat is large
Merge pull request #883 from bitwangyaoyao:2.4_fixMoments