Search in sources :

Example 11 with GrayF64

use of boofcv.struct.image.GrayF64 in project BoofCV by lessthanoptimal.

the class TestImageLocalNormalization method compareToExpected.

private void compareToExpected(GrayF origInput, Kernel1D origKernel, GrayF found) {
    GrayF64 input = new GrayF64(width, height);
    GConvertImage.convert(origInput, input);
    PixelMath.divide(input, maxPixelValue, input);
    for (int y = 0; y < height; y++) {
        for (int x = 0; x < width; x++) {
            double f = GeneralizedImageOps.get(found, x, y);
            double expected = compute(x, y, input, origKernel);
            assertEquals(x + " " + y, expected, f, 1e-4);
        }
    }
}
Also used : GrayF64(boofcv.struct.image.GrayF64)

Aggregations

GrayF64 (boofcv.struct.image.GrayF64)11 Test (org.junit.Test)4 GrayF32 (boofcv.struct.image.GrayF32)2 ConvertBufferedImage (boofcv.io.image.ConvertBufferedImage)1 InterleavedF64 (boofcv.struct.image.InterleavedF64)1 RectangleLength2D_F32 (georegression.struct.shapes.RectangleLength2D_F32)1 BufferedImage (java.awt.image.BufferedImage)1