Here are the benchmark results after corrections using the createImg() method of the ImageMomentsTest.java class to create a test image.
Hu moment benchmark results:
1 2 3 4 5 6 7
ImageJ-Ops: +0.00130386 +8.61540e-11 +2.40612e-14 +1.24688e-13 -6.61044e-27 +1.13102e-18 +1.71626e-27
Matlab: +0.00130386 +8.61540e-11 +2.40612e-14 +1.24688e-13 -6.61044e-27 +1.13102e-18 +1.71626e-27
Difference: -4.33681e-19 +4.62963e-23 +9.55468e-27 -4.63976e-26 +2.94017e-39 -5.77779e-33 +1.55403e-39
Pull request coming soon that illustrates the changes in code.
The remaining discrepancies between MATLAB and imagej-ops were due to numerical precision differences. Using a for loop in MATLAB results in imprecision compared to matrix/vector math in MATLAB.
Hope this helps.