Usages of

org.openimaj.feature.local.matcher.FastBasicKeypointMatcher.FastBasicKeypointMatcher(?)
public Snap() { loadMapData(); engine = new DoGSIFTEngine(); // engine.getOptions().setDoubleInitialImage(false); final FastBasicKeypointMatcher<Keypoint> innerMatcher = new FastBasicKeypointMatcher<Keypoint>(8); matcher = new ConsistentLocalFeatureMatcher2d<Keypoint>(innerMatcher); final RobustAffineTransformEstimator estimator = new RobustAffineTransformEstimator(0.5); matcher.setFittingModel(estimator); matcher.setModelFeatures(mapData); }
public static void main(String[] args) throws IOException { final FImage image1 = ImageUtilities.readF(new URL( "http://punch-records.co.uk/files/2013/01/Coca-cola-logo-eps-vector-nocturnar-com.jpg")); final FImage image2 = ImageUtilities .readF(new URL( "http://i133.photobucket.com/albums/q78/KylePix/Car%20Shows%20and%20Races/Los%20Angeles%2011/111124-4937CocaColaMotorcycle.jpg")); final DoGSIFTEngine engine = new DoGSIFTEngine(); engine.getOptions().setDoubleInitialImage(true); final LocalFeatureList<Keypoint> keys1 = engine.findFeatures(image1); final LocalFeatureList<Keypoint> keys2 = engine.findFeatures(image2); final FastBasicKeypointMatcher<Keypoint> matcher = new FastBasicKeypointMatcher<Keypoint>(6); matcher.setModelFeatures(keys1); matcher.findMatches(keys2); final List<Pair<Keypoint>> matches = filterDuplicatePoints(matcher.getMatches()); DisplayUtilities.display(MatchingUtilities.drawMatches(image1, image2, matches, 0F)); final DTConsistencyInfo info = DTConsistency.computeTriangulationInfo(matches); final MBFImage i1 = MBFImage.createRGB(image2); final MBFImage i2 = MBFImage.createRGB(image1); i1.drawLines(info.firstCommonEdges, 5, RGBColour.BLUE); i2.drawLines(info.secondCommonEdges, 5, RGBColour.BLUE); for (final Shape s : info.firstTrianglulation) i1.drawShape(s, RGBColour.RED); for (final Shape s : info.secondTrianglulation) i2.drawShape(s, RGBColour.RED); DisplayUtilities.display(i1); DisplayUtilities.display(i2); }
public static void main(String[] args) throws IOException { FImage image1 = ImageUtilities.readF(new File("/Users/jsh2/Desktop/1.JPG")); FImage image2 = ImageUtilities.readF(new File("/Users/jsh2/Desktop/2.JPG")); image1 = ResizeProcessor.halfSize(image1); image2 = ResizeProcessor.halfSize(image2); DoGSIFTEngine sift = new DoGSIFTEngine(); sift.getOptions().setDoubleInitialImage(false); LocalFeatureList<Keypoint> sift1 = sift.findFeatures(image1); LocalFeatureList<Keypoint> sift2 = sift.findFeatures(image2); FastBasicKeypointMatcher<Keypoint> innermatcher = new FastBasicKeypointMatcher<Keypoint>(8); ConsistentLocalFeatureMatcher2d<Keypoint> matcher = new ConsistentLocalFeatureMatcher2d<Keypoint>(innermatcher); matcher.setFittingModel(new RANSAC<Point2d, Point2d>(new AffineTransformModel(5), 1000, new RANSAC.BestFitStoppingCondition(), true)); matcher.setModelFeatures(sift1); matcher.findMatches(sift2); //DisplayUtilities.display(MatchingUtilities.drawMatches(image1, image2, matcher.getMatches(), 1f)); ImageUtilities.write(MatchingUtilities.drawMatches(new MBFImage(image1,image1,image1), new MBFImage(image2,image2,image2), matcher.getAllMatches(), RGBColour.RED), new File("/Users/jsh2/Desktop/matches-sift.png")); ASIFTEngine asift = new ASIFTEngine(); LocalFeatureList<Keypoint> asift1 = asift.findKeypoints(image1); LocalFeatureList<Keypoint> asift2 = asift.findKeypoints(image2); matcher.setModelFeatures(asift1); matcher.findMatches(asift2); // DisplayUtilities.display(MatchingUtilities.drawMatches(image1, image2, matcher.getMatches(), 1f)); ImageUtilities.write(MatchingUtilities.drawMatches(new MBFImage(image1,image1,image1), new MBFImage(image2,image2,image2), matcher.getAllMatches(), RGBColour.RED, matcher.getMatches(), RGBColour.BLUE), new File("/Users/jsh2/Desktop/matches-asift.png")); }
Usage snippet has been bookmarked! Review your bookmarks
Thank you! Review your likes