Search in sources :

Example 1 with BorderType

use of boofcv.core.image.border.BorderType in project BoofCV by lessthanoptimal.

the class TestFactoryWaveletDaub method biorthogonal_F32_inverse.

@Test
public void biorthogonal_F32_inverse() {
    for (BorderType type : borderTypes) {
        for (int i = 5; i <= 5; i += 2) {
            WaveletDescription<WlCoef_F32> desc = FactoryWaveletDaub.biorthogonal_F32(i, type);
            checkBiorthogonal_F32(desc);
        }
    }
}
Also used : WlCoef_F32(boofcv.struct.wavelet.WlCoef_F32) BorderType(boofcv.core.image.border.BorderType) Test(org.junit.Test)

Example 2 with BorderType

use of boofcv.core.image.border.BorderType in project BoofCV by lessthanoptimal.

the class TestFactoryWaveletDaub method transform_biorthogonal_I32.

@Test
public void transform_biorthogonal_I32() {
    for (BorderType type : borderTypes) {
        for (int i = 5; i <= 5; i += 2) {
            WaveletDescription<WlCoef_I32> desc = FactoryWaveletDaub.biorthogonal_I32(i, type);
            checkEncodeDecode_I32(desc);
        }
    }
}
Also used : WlCoef_I32(boofcv.struct.wavelet.WlCoef_I32) BorderType(boofcv.core.image.border.BorderType) Test(org.junit.Test)

Example 3 with BorderType

use of boofcv.core.image.border.BorderType in project BoofCV by lessthanoptimal.

the class PermuteWaveletCompare method runTest.

private void runTest(int widthIn, int heightIn, int widthOut, int heightOut, boolean swapSize) {
    if (swapSize) {
        int t = widthIn;
        widthIn = widthOut;
        widthOut = t;
        t = heightIn;
        heightIn = heightOut;
        heightOut = t;
    }
    ImageGray input = GeneralizedImageOps.createSingleBand(inputType, widthIn, heightIn);
    ImageGray found = GeneralizedImageOps.createSingleBand(outputType, widthOut, heightOut);
    ImageGray expected = GeneralizedImageOps.createSingleBand(outputType, widthOut, heightOut);
    GImageMiscOps.fillUniform(input, rand, 0, 50);
    // test different descriptions lengths and offsets, and borders
    for (BorderType type : BorderType.values()) {
        for (int o = 0; o <= 2; o++) {
            for (int l = 2 + o; l <= 5; l++) {
                // System.out.println("type "+type+" o = "+o+" l = "+l);
                GImageMiscOps.fill(found, 0);
                GImageMiscOps.fill(expected, 0);
                // create a random wavelet.  does not have to be a real once
                // since it just is checking that two functions produce the same output
                WaveletDescription<?> desc = createDesc(-o, l, type);
                applyValidation(desc, input, expected);
                // make sure it works on sub-images
                BoofTesting.checkSubImage(this, "innerTest", false, input, found, expected, desc);
            }
        }
    }
}
Also used : ImageGray(boofcv.struct.image.ImageGray) BorderType(boofcv.core.image.border.BorderType)

Example 4 with BorderType

use of boofcv.core.image.border.BorderType in project BoofCV by lessthanoptimal.

the class TestFactoryWaveletDaub method biorthogonal_I32_inverse.

@Test
public void biorthogonal_I32_inverse() {
    for (BorderType type : borderTypes) {
        for (int i = 5; i <= 5; i += 2) {
            WaveletDescription<WlCoef_I32> desc = FactoryWaveletDaub.biorthogonal_I32(i, type);
            checkBiorthogonal_I32(desc);
        }
    }
}
Also used : WlCoef_I32(boofcv.struct.wavelet.WlCoef_I32) BorderType(boofcv.core.image.border.BorderType) Test(org.junit.Test)

Example 5 with BorderType

use of boofcv.core.image.border.BorderType in project BoofCV by lessthanoptimal.

the class TestFactoryWaveletDaub method transform_biorthogonal_F32.

@Test
public void transform_biorthogonal_F32() {
    for (BorderType type : borderTypes) {
        for (int i = 5; i <= 5; i += 2) {
            WaveletDescription<WlCoef_F32> desc = FactoryWaveletDaub.biorthogonal_F32(i, type);
            checkEncodeDecode_F32(desc);
        }
    }
}
Also used : WlCoef_F32(boofcv.struct.wavelet.WlCoef_F32) BorderType(boofcv.core.image.border.BorderType) Test(org.junit.Test)

Aggregations

BorderType (boofcv.core.image.border.BorderType)6 Test (org.junit.Test)4 WlCoef_F32 (boofcv.struct.wavelet.WlCoef_F32)2 WlCoef_I32 (boofcv.struct.wavelet.WlCoef_I32)2 GrayF32 (boofcv.struct.image.GrayF32)1 ImageGray (boofcv.struct.image.ImageGray)1 Function (deepboof.Function)1 ParseBinaryTorch7 (deepboof.io.torch7.ParseBinaryTorch7)1 Tensor_F32 (deepboof.tensors.Tensor_F32)1 File (java.io.File)1