Search in sources :

Example 1 with DescribePointPixelRegionNCC

use of boofcv.alg.feature.describe.DescribePointPixelRegionNCC in project BoofCV by lessthanoptimal.

the class TestTldTemplateMatching method computeNccDescriptor.

@Test
public void computeNccDescriptor() {
    TldTemplateMatching alg = new TldTemplateMatching(interpolate);
    alg.setImage(input);
    NccFeature found = alg.createDescriptor();
    alg.computeNccDescriptor(found, 2, 3, 17, 18);
    NccFeature expected = alg.createDescriptor();
    DescribePointPixelRegionNCC descriptor = FactoryDescribePointAlgs.pixelRegionNCC(15, 15, GrayU8.class);
    descriptor.setImage(input);
    descriptor.process(7 + 2, 7 + 3, expected);
    assertEquals(expected.mean, found.mean, 1e-8);
}
Also used : DescribePointPixelRegionNCC(boofcv.alg.feature.describe.DescribePointPixelRegionNCC) NccFeature(boofcv.struct.feature.NccFeature) Test(org.junit.Test)

Aggregations

DescribePointPixelRegionNCC (boofcv.alg.feature.describe.DescribePointPixelRegionNCC)1 NccFeature (boofcv.struct.feature.NccFeature)1 Test (org.junit.Test)1