Search in sources :

Example 1 with AssociateDescription

use of boofcv.abst.feature.associate.AssociateDescription in project BoofCV by lessthanoptimal.

the class ExampleAssociatePoints method main.

public static void main(String[] args) {
    Class imageType = GrayF32.class;
    // Class imageType = GrayU8.class;
    // select which algorithms to use
    DetectDescribePoint detDesc = FactoryDetectDescribe.surfStable(new ConfigFastHessian(1, 2, 300, 1, 9, 4, 4), null, null, imageType);
    // sift(new ConfigCompleteSift(0,5,600));
    ScoreAssociation scorer = FactoryAssociation.defaultScore(detDesc.getDescriptionType());
    AssociateDescription associate = FactoryAssociation.greedy(scorer, Double.MAX_VALUE, true);
    // load and match images
    ExampleAssociatePoints app = new ExampleAssociatePoints(detDesc, associate, imageType);
    BufferedImage imageA = UtilImageIO.loadImage(UtilIO.pathExample("stitch/kayak_01.jpg"));
    BufferedImage imageB = UtilImageIO.loadImage(UtilIO.pathExample("stitch/kayak_03.jpg"));
    app.associate(imageA, imageB);
}
Also used : DetectDescribePoint(boofcv.abst.feature.detdesc.DetectDescribePoint) GrayF32(boofcv.struct.image.GrayF32) ConfigFastHessian(boofcv.abst.feature.detect.interest.ConfigFastHessian) AssociateDescription(boofcv.abst.feature.associate.AssociateDescription) ScoreAssociation(boofcv.abst.feature.associate.ScoreAssociation) BufferedImage(java.awt.image.BufferedImage) ConvertBufferedImage(boofcv.io.image.ConvertBufferedImage)

Example 2 with AssociateDescription

use of boofcv.abst.feature.associate.AssociateDescription in project BoofCV by lessthanoptimal.

the class ExampleDetectDescribe method main.

public static void main(String[] args) {
    Class imageType = GrayF32.class;
    DetectDescribePoint detDesc = createFromPremade(imageType);
    // DetectDescribePoint detDesc = createFromComponents(imageType);
    // Might as well have this example do something useful, like associate two images
    ScoreAssociation scorer = FactoryAssociation.defaultScore(detDesc.getDescriptionType());
    AssociateDescription associate = FactoryAssociation.greedy(scorer, Double.MAX_VALUE, true);
    // load and match images
    ExampleAssociatePoints app = new ExampleAssociatePoints(detDesc, associate, imageType);
    BufferedImage imageA = UtilImageIO.loadImage(UtilIO.pathExample("stitch/kayak_01.jpg"));
    BufferedImage imageB = UtilImageIO.loadImage(UtilIO.pathExample("stitch/kayak_03.jpg"));
    app.associate(imageA, imageB);
}
Also used : DetectDescribePoint(boofcv.abst.feature.detdesc.DetectDescribePoint) GrayF32(boofcv.struct.image.GrayF32) AssociateDescription(boofcv.abst.feature.associate.AssociateDescription) ScoreAssociation(boofcv.abst.feature.associate.ScoreAssociation) BufferedImage(java.awt.image.BufferedImage)

Aggregations

AssociateDescription (boofcv.abst.feature.associate.AssociateDescription)2 ScoreAssociation (boofcv.abst.feature.associate.ScoreAssociation)2 DetectDescribePoint (boofcv.abst.feature.detdesc.DetectDescribePoint)2 GrayF32 (boofcv.struct.image.GrayF32)2 BufferedImage (java.awt.image.BufferedImage)2 ConfigFastHessian (boofcv.abst.feature.detect.interest.ConfigFastHessian)1 ConvertBufferedImage (boofcv.io.image.ConvertBufferedImage)1