Search in sources :

Example 26 with Point2D_I16

use of georegression.struct.point.Point2D_I16 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)

Example 27 with Point2D_I16

use of georegression.struct.point.Point2D_I16 in project BoofCV by lessthanoptimal.

the class TestQueueCorner method add_get.

/**
 * Tests add() and get()
 */
@Test
public void add_get() {
    QueueCorner queue = new QueueCorner(20);
    assertEquals(0, queue.size());
    queue.add(1, 2);
    assertEquals(1, queue.size());
    Point2D_I16 pt = queue.get(0);
    assertEquals(1, pt.getX());
    assertEquals(2, pt.getY());
}
Also used : Point2D_I16(georegression.struct.point.Point2D_I16) Test(org.junit.Test)

Aggregations

Point2D_I16 (georegression.struct.point.Point2D_I16)27 QueueCorner (boofcv.struct.QueueCorner)12 GrayF32 (boofcv.struct.image.GrayF32)7 ScalePoint (boofcv.struct.feature.ScalePoint)5 ConfigExtract (boofcv.abst.feature.detect.extract.ConfigExtract)3 NonMaxSuppression (boofcv.abst.feature.detect.extract.NonMaxSuppression)3 Test (org.junit.Test)3 ImageBorder_F32 (boofcv.core.image.border.ImageBorder_F32)2 FactoryIntensityPoint (boofcv.factory.feature.detect.intensity.FactoryIntensityPoint)2 FactoryDetectPoint (boofcv.factory.feature.detect.interest.FactoryDetectPoint)2 ConvertBufferedImage (boofcv.io.image.ConvertBufferedImage)2 LineParametric2D_F32 (georegression.struct.line.LineParametric2D_F32)2 Point2D_F64 (georegression.struct.point.Point2D_F64)2 BufferedImage (java.awt.image.BufferedImage)2 DescribeRegionPoint (boofcv.abst.feature.describe.DescribeRegionPoint)1 ConfigGeneralDetector (boofcv.abst.feature.detect.interest.ConfigGeneralDetector)1 DetectorFastNaive (boofcv.alg.feature.detect.intensity.DetectorFastNaive)1 EasyGeneralFeatureDetector (boofcv.alg.feature.detect.interest.EasyGeneralFeatureDetector)1 GeneralFeatureDetector (boofcv.alg.feature.detect.interest.GeneralFeatureDetector)1 OrientationImageAverage (boofcv.alg.feature.orientation.OrientationImageAverage)1