Search in sources :

Example 1 with DetectorFastNaive

use of boofcv.alg.feature.detect.intensity.DetectorFastNaive in project BoofCV by lessthanoptimal.

the class GenericImplFastIntensity method compareToNaiveDetection.

@Test
public void compareToNaiveDetection() {
    GrayU8 input = new GrayU8(40, 50);
    GImageMiscOps.fillUniform(input, rand, 0, 50);
    GrayF32 intensity = new GrayF32(input.width, input.height);
    DetectorFastNaive validator = new DetectorFastNaive(3, minContinuous, detectDifference);
    validator.process(input);
    alg.process(input, intensity);
    assertEquals(validator.getCandidates().size, alg.getCandidates().size);
    for (int i = 0; i < validator.getCandidates().size(); i++) {
        Point2D_I16 v = validator.getCandidates().get(i);
        Point2D_I16 a = alg.getCandidates().get(i);
        assertEquals(v.x, a.x);
        assertEquals(v.y, a.y);
    }
}
Also used : GrayF32(boofcv.struct.image.GrayF32) DetectorFastNaive(boofcv.alg.feature.detect.intensity.DetectorFastNaive) Point2D_I16(georegression.struct.point.Point2D_I16) GrayU8(boofcv.struct.image.GrayU8) Test(org.junit.Test)

Aggregations

DetectorFastNaive (boofcv.alg.feature.detect.intensity.DetectorFastNaive)1 GrayF32 (boofcv.struct.image.GrayF32)1 GrayU8 (boofcv.struct.image.GrayU8)1 Point2D_I16 (georegression.struct.point.Point2D_I16)1 Test (org.junit.Test)1