use of boofcv.struct.feature.BrightFeature in project BoofCV by lessthanoptimal.
the class TestCompleteSift method basic.
/**
* Doesn't do much more than see if it blows up and the expected size of objects is returned
*/
@Test
public void basic() {
GrayF32 image = new GrayF32(300, 290);
GImageMiscOps.fillUniform(image, rand, 0, 200);
CompleteSift alg = createAlg();
alg.process(image);
assertEquals(128, alg.getDescriptorLength());
GrowQueue_F64 orientations = alg.getOrientations();
FastQueue<ScalePoint> locations = alg.getLocations();
FastQueue<BrightFeature> descriptions = alg.getDescriptions();
assertTrue(orientations.size > 10);
assertEquals(orientations.size, locations.size);
assertEquals(orientations.size, descriptions.size);
}
use of boofcv.struct.feature.BrightFeature in project BoofCV by lessthanoptimal.
the class TestAssociateSurfBasic method createDesc.
private BrightFeature createDesc(boolean laplace, double value) {
BrightFeature ret = new BrightFeature(64);
ret.white = laplace;
ret.value[0] = value;
return ret;
}
use of boofcv.struct.feature.BrightFeature in project BoofCV by lessthanoptimal.
the class ExampleMultiviewSceneReconstruction method detectImageFeatures.
/**
* Detect image features in all the images. Save location, description, and color
*/
private void detectImageFeatures(List<BufferedImage> colorImages) {
System.out.println("Detecting Features in each image. Total " + colorImages.size());
for (int i = 0; i < colorImages.size(); i++) {
System.out.print("*");
BufferedImage colorImage = colorImages.get(i);
FastQueue<BrightFeature> features = new SurfFeatureQueue(64);
FastQueue<Point2D_F64> pixels = new FastQueue<>(Point2D_F64.class, true);
GrowQueue_I32 colors = new GrowQueue_I32();
detectFeatures(colorImage, features, pixels, colors);
imageVisualFeatures.add(features);
imagePixels.add(pixels);
imageColors.add(colors);
}
System.out.println();
}
use of boofcv.struct.feature.BrightFeature in project BoofCV by lessthanoptimal.
the class ExampleFundamentalMatrix method computeMatches.
/**
* Use the associate point feature example to create a list of {@link AssociatedPair} for use in computing the
* fundamental matrix.
*/
public static List<AssociatedPair> computeMatches(BufferedImage left, BufferedImage right) {
DetectDescribePoint detDesc = FactoryDetectDescribe.surfStable(new ConfigFastHessian(1, 2, 200, 1, 9, 4, 4), null, null, GrayF32.class);
// DetectDescribePoint detDesc = FactoryDetectDescribe.sift(null,new ConfigSiftDetector(2,0,200,5),null,null);
ScoreAssociation<BrightFeature> scorer = FactoryAssociation.scoreEuclidean(BrightFeature.class, true);
AssociateDescription<BrightFeature> associate = FactoryAssociation.greedy(scorer, 1, true);
ExampleAssociatePoints<GrayF32, BrightFeature> findMatches = new ExampleAssociatePoints<>(detDesc, associate, GrayF32.class);
findMatches.associate(left, right);
List<AssociatedPair> matches = new ArrayList<>();
FastQueue<AssociatedIndex> matchIndexes = associate.getMatches();
for (int i = 0; i < matchIndexes.size; i++) {
AssociatedIndex a = matchIndexes.get(i);
AssociatedPair p = new AssociatedPair(findMatches.pointsA.get(a.src), findMatches.pointsB.get(a.dst));
matches.add(p);
}
return matches;
}
use of boofcv.struct.feature.BrightFeature in project BoofCV by lessthanoptimal.
the class TestDetectDescribeMultiFusion method checkWithOrientation.
@Test
public void checkWithOrientation() {
final InterestPointDetector<GrayF32> detector = FactoryInterestPoint.fastHessian(null);
final OrientationImage ori = FactoryOrientationAlgs.nogradient(5, 5, GrayF32.class);
final DescribeRegionPoint<GrayF32, BrightFeature> desc = FactoryDescribeRegionPoint.surfStable(null, GrayF32.class);
new GenericTestsDetectDescribeMulti(GrayF32.class, BrightFeature.class) {
@Override
public DetectDescribeMulti createDetDesc() {
DetectDescribePoint ddp = new DetectDescribeFusion(detector, ori, desc);
return new DetectDescribeSingleToMulti(ddp);
}
}.allTests();
}
Aggregations