Example #1
0
  public static void huMoments(String filename) {

    normalisedMoments(filename);
    Mat m = Imgcodecs.imread(filename, Imgcodecs.CV_LOAD_IMAGE_ANYCOLOR);

    double[] mo = Shape.huMoments(m, m);
    for (int i = 0; i < mo.length; i++) {
      System.out.println("hu" + (i + 1) + " = " + mo[i]);
    }
  }