Search in sources :

Example 1 with CompareDerivativeToConvolution

use of boofcv.alg.filter.derivative.CompareDerivativeToConvolution in project BoofCV by lessthanoptimal.

the class TestGradientPrewitt_Shared method compareToConvolve_F32.

@Test
public void compareToConvolve_F32() throws NoSuchMethodException {
    CompareDerivativeToConvolution validator = new CompareDerivativeToConvolution();
    validator.setTarget(GradientPrewitt_Shared.class.getMethod("process", GrayF32.class, GrayF32.class, GrayF32.class));
    validator.setKernel(0, GradientPrewitt.kernelDerivX_F32);
    validator.setKernel(1, GradientPrewitt.kernelDerivY_F32);
    GrayF32 input = new GrayF32(width, height);
    ImageMiscOps.fillUniform(input, rand, 0, 10);
    GrayF32 derivX = new GrayF32(width, height);
    GrayF32 derivY = new GrayF32(width, height);
    validator.compare(false, input, derivX, derivY);
}
Also used : CompareDerivativeToConvolution(boofcv.alg.filter.derivative.CompareDerivativeToConvolution) GrayF32(boofcv.struct.image.GrayF32) Test(org.junit.Test)

Example 2 with CompareDerivativeToConvolution

use of boofcv.alg.filter.derivative.CompareDerivativeToConvolution in project BoofCV by lessthanoptimal.

the class TestGradientTwo1_Standard method compareToConvolve_I8.

@Test
public void compareToConvolve_I8() throws NoSuchMethodException {
    CompareDerivativeToConvolution validator = new CompareDerivativeToConvolution();
    validator.setTarget(GradientTwo1_Standard.class.getMethod("process", GrayU8.class, GrayS16.class, GrayS16.class));
    validator.setKernel(0, GradientTwo1.kernelDeriv_I32, true);
    validator.setKernel(1, GradientTwo1.kernelDeriv_I32, false);
    GrayU8 input = new GrayU8(width, height);
    ImageMiscOps.fillUniform(input, rand, 0, 10);
    GrayS16 derivX = new GrayS16(width, height);
    GrayS16 derivY = new GrayS16(width, height);
    validator.compare(false, input, derivX, derivY);
}
Also used : CompareDerivativeToConvolution(boofcv.alg.filter.derivative.CompareDerivativeToConvolution) GrayS16(boofcv.struct.image.GrayS16) GrayU8(boofcv.struct.image.GrayU8) Test(org.junit.Test)

Example 3 with CompareDerivativeToConvolution

use of boofcv.alg.filter.derivative.CompareDerivativeToConvolution in project BoofCV by lessthanoptimal.

the class TestHessianSobel_Shared method compareToConvolve_F32.

@Test
public void compareToConvolve_F32() throws NoSuchMethodException {
    CompareDerivativeToConvolution validator = new CompareDerivativeToConvolution();
    validator.setTarget(HessianSobel_Shared.class.getMethod("process", GrayF32.class, GrayF32.class, GrayF32.class, GrayF32.class));
    validator.setKernel(0, HessianSobel.kernelXX_F32);
    validator.setKernel(1, HessianSobel.kernelYY_F32);
    validator.setKernel(2, HessianSobel.kernelXY_F32);
    GrayF32 input = new GrayF32(width, height);
    ImageMiscOps.fillUniform(input, rand, 0, 10);
    GrayF32 derivXX = new GrayF32(width, height);
    GrayF32 derivYY = new GrayF32(width, height);
    GrayF32 derivXY = new GrayF32(width, height);
    validator.compare(false, input, derivXX, derivYY, derivXY);
}
Also used : CompareDerivativeToConvolution(boofcv.alg.filter.derivative.CompareDerivativeToConvolution) GrayF32(boofcv.struct.image.GrayF32) Test(org.junit.Test)

Example 4 with CompareDerivativeToConvolution

use of boofcv.alg.filter.derivative.CompareDerivativeToConvolution in project BoofCV by lessthanoptimal.

the class TestHessianSobel_Shared method compareToConvolve_I8.

@Test
public void compareToConvolve_I8() throws NoSuchMethodException {
    CompareDerivativeToConvolution validator = new CompareDerivativeToConvolution();
    validator.setTarget(HessianSobel_Shared.class.getMethod("process", GrayU8.class, GrayS16.class, GrayS16.class, GrayS16.class));
    validator.setKernel(0, HessianSobel.kernelXX_I32);
    validator.setKernel(1, HessianSobel.kernelYY_I32);
    validator.setKernel(2, HessianSobel.kernelXY_I32);
    GrayU8 input = new GrayU8(width, height);
    ImageMiscOps.fillUniform(input, rand, 0, 10);
    GrayS16 derivXX = new GrayS16(width, height);
    GrayS16 derivYY = new GrayS16(width, height);
    GrayS16 derivXY = new GrayS16(width, height);
    validator.compare(false, input, derivXX, derivYY, derivXY);
}
Also used : CompareDerivativeToConvolution(boofcv.alg.filter.derivative.CompareDerivativeToConvolution) GrayS16(boofcv.struct.image.GrayS16) GrayU8(boofcv.struct.image.GrayU8) Test(org.junit.Test)

Example 5 with CompareDerivativeToConvolution

use of boofcv.alg.filter.derivative.CompareDerivativeToConvolution in project BoofCV by lessthanoptimal.

the class TestHessianThree_Standard method compareToConvolve_I8.

@Test
public void compareToConvolve_I8() throws NoSuchMethodException {
    CompareDerivativeToConvolution validator = new CompareDerivativeToConvolution();
    validator.setTarget(HessianThree_Standard.class.getMethod("process", GrayU8.class, GrayS16.class, GrayS16.class, GrayS16.class));
    validator.setKernel(0, HessianThree.kernelXXYY_I32, true);
    validator.setKernel(1, HessianThree.kernelXXYY_I32, false);
    validator.setKernel(2, HessianThree.kernelCross_I32);
    GrayU8 input = new GrayU8(width, height);
    ImageMiscOps.fillUniform(input, rand, 0, 10);
    GrayS16 derivXX = new GrayS16(width, height);
    GrayS16 derivYY = new GrayS16(width, height);
    GrayS16 derivXY = new GrayS16(width, height);
    validator.compare(false, input, derivXX, derivYY, derivXY);
}
Also used : CompareDerivativeToConvolution(boofcv.alg.filter.derivative.CompareDerivativeToConvolution) GrayS16(boofcv.struct.image.GrayS16) GrayU8(boofcv.struct.image.GrayU8) Test(org.junit.Test)

Aggregations

CompareDerivativeToConvolution (boofcv.alg.filter.derivative.CompareDerivativeToConvolution)14 Test (org.junit.Test)14 GrayS16 (boofcv.struct.image.GrayS16)7 GrayU8 (boofcv.struct.image.GrayU8)7 GrayF32 (boofcv.struct.image.GrayF32)6 GrayS32 (boofcv.struct.image.GrayS32)1