test_class.file: service/interactivespaces-service-core/src/test/java/interactivespaces/service/image/blob/BasicBlobDetectorTest.java
test_class.identifier: BasicBlobDetectorTest
test_case.body: @Test
    public void testBlobDetector() {
      // Unfortunately the auto format changes takes away the grid that makes this
      // noticable where the blobs are.
      // 8x8 grid.
      int[] data =
          new int[] { 0, 0, 8, 9, 8, 0, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 8, 8, 8, 0, 0, 0, 0,
              0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
  
      BlobDetector detector = new BasicBlobDetector();
  
      BlobDetectionResult blobs = detector.getBlobs(data, 8, 8, new BlobSampleClassifier() {
        @Override
        public boolean isSeedPoint(int sample) {
          return sample == 9;
        }
  
        @Override
        public boolean isBlobPoint(int sample) {
          return sample == 8;
        }
      });
  
      List<Rectangle2> boundingRectangles = blobs.getBoundingRectangles();
      System.out.println(boundingRectangles);
  
      List<Rectangle2> expected = Lists.newArrayList(new Rectangle2(2.0, 6.0, 3.0, 1.0), new Rectangle2(1.0, 2.0, 3.0, 2.0));
      Assert.assertEquals(expected.size(), boundingRectangles.size());
      for (int i = 0; i < expected.size(); i++) {
        Assert.assertTrue(expected.get(i).equal(boundingRectangles.get(i), 0.01));
      }
    }
test_case.class_method_signature: BasicBlobDetectorTest.testBlobDetector()
test_case.full_signature: @Test public void testBlobDetector()
test_case.identifier: testBlobDetector
test_case.invocations: getBlobs getBoundingRectangles println newArrayList assertEquals size size size assertTrue equal get get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBlobDetector()
focal_class.file: service/interactivespaces-service-core/src/main/java/interactivespaces/service/image/blob/BasicBlobDetector.java
focal_class.identifier: BasicBlobDetector
focal_class.interfaces: implements BlobDetector
focal_class.class_method_signature: BasicBlobDetector.getBlobs(int[] data, int numRows, int numColumns, BlobSampleClassifier sampler)
focal_class.full_signature: @Override public BlobDetectionResult getBlobs(int[] data, int numRows, int numColumns, BlobSampleClassifier sampler)
focal_class.identifier: getBlobs
focal_class.modifiers: @Override public
focal_class.parameters: (int[] data, int numRows, int numColumns, BlobSampleClassifier sampler)
focal_class.return: BlobDetectionResult
focal_class.signature: BlobDetectionResult getBlobs(int[] data, int numRows, int numColumns, BlobSampleClassifier sampler)
focal_method.body: @Override
    public BlobDetectionResult getBlobs(int[] data, int numRows, int numColumns, BlobSampleClassifier sampler) {
      BlobTask task = new BlobTask(data, numRows, numColumns, sampler);
  
      return task.findBlobs();
    }
focal_method.class_method_signature: BasicBlobDetector.getBlobs(int[] data, int numRows, int numColumns, BlobSampleClassifier sampler)
focal_method.full_signature: @Override public BlobDetectionResult getBlobs(int[] data, int numRows, int numColumns, BlobSampleClassifier sampler)
focal_method.identifier: getBlobs
focal_method.invocations: findBlobs
focal_method.modifiers: @Override public
focal_method.parameters: (int[] data, int numRows, int numColumns, BlobSampleClassifier sampler)
focal_method.return: BlobDetectionResult
focal_method.signature: BlobDetectionResult getBlobs(int[] data, int numRows, int numColumns, BlobSampleClassifier sampler)