Search in sources :

Example 1 with DescribeRegionPointConvert

use of boofcv.abst.feature.describe.DescribeRegionPointConvert in project BoofCV by lessthanoptimal.

the class CompareConvertedDescriptionsApp method main.

public static void main(String[] args) {
    String file1 = UtilIO.pathExample("stitch/kayak_01.jpg");
    String file2 = UtilIO.pathExample("stitch/kayak_02.jpg");
    InterestPointDetector<GrayF32> detector = FactoryInterestPoint.fastHessian(new ConfigFastHessian(1, 10, -1, 2, 9, 4, 4));
    DescribeRegionPoint<GrayF32, TupleDesc_F64> describeA = (DescribeRegionPoint) FactoryDescribeRegionPoint.surfStable(null, GrayF32.class);
    ConvertTupleDesc<TupleDesc_F64, TupleDesc_S8> converter = FactoryConvertTupleDesc.real_F64_S8(describeA.createDescription().size());
    DescribeRegionPoint<GrayF32, TupleDesc_S8> describeB = new DescribeRegionPointConvert<>(describeA, converter);
    ScoreAssociation<TupleDesc_F64> scoreA = FactoryAssociation.scoreSad(TupleDesc_F64.class);
    ScoreAssociation<TupleDesc_S8> scoreB = FactoryAssociation.scoreSad(TupleDesc_S8.class);
    BufferedImage image1 = UtilImageIO.loadImage(file1);
    BufferedImage image2 = UtilImageIO.loadImage(file2);
    visualize("Original", image1, image2, detector, describeA, scoreA);
    visualize("Modified", image1, image2, detector, describeB, scoreB);
    System.out.println("Done");
}
Also used : TupleDesc_S8(boofcv.struct.feature.TupleDesc_S8) ConfigFastHessian(boofcv.abst.feature.detect.interest.ConfigFastHessian) TupleDesc_F64(boofcv.struct.feature.TupleDesc_F64) FactoryDescribeRegionPoint(boofcv.factory.feature.describe.FactoryDescribeRegionPoint) DescribeRegionPoint(boofcv.abst.feature.describe.DescribeRegionPoint) BufferedImage(java.awt.image.BufferedImage) ConvertBufferedImage(boofcv.io.image.ConvertBufferedImage) DescribeRegionPointConvert(boofcv.abst.feature.describe.DescribeRegionPointConvert) GrayF32(boofcv.struct.image.GrayF32)

Aggregations

DescribeRegionPoint (boofcv.abst.feature.describe.DescribeRegionPoint)1 DescribeRegionPointConvert (boofcv.abst.feature.describe.DescribeRegionPointConvert)1 ConfigFastHessian (boofcv.abst.feature.detect.interest.ConfigFastHessian)1 FactoryDescribeRegionPoint (boofcv.factory.feature.describe.FactoryDescribeRegionPoint)1 ConvertBufferedImage (boofcv.io.image.ConvertBufferedImage)1 TupleDesc_F64 (boofcv.struct.feature.TupleDesc_F64)1 TupleDesc_S8 (boofcv.struct.feature.TupleDesc_S8)1 GrayF32 (boofcv.struct.image.GrayF32)1 BufferedImage (java.awt.image.BufferedImage)1