use of boofcv.alg.feature.detect.interest.SiftDetector in project BoofCV by lessthanoptimal.
the class TestWrapSiftDetector method testAllImageTypes.
@Test
public void testAllImageTypes() {
for (Class type : types) {
SiftDetector detector = FactoryInterestPointAlgs.sift(null, null);
WrapSiftDetector alg = new WrapSiftDetector(detector, type);
new GeneralInterestPointDetectorChecks(alg, false, true, type) {
}.performAllTests();
}
}
use of boofcv.alg.feature.detect.interest.SiftDetector in project BoofCV by lessthanoptimal.
the class DebugSiftDetectorApp method main.
public static void main(String[] args) {
BufferedImage input = UtilImageIO.loadImage(UtilIO.pathExample("sunflowers.jpg"));
// BufferedImage input = UtilImageIO.loadImage(UtilIO.pathExample("shapes/shapes01.png");
GrayF32 gray = ConvertBufferedImage.convertFromSingle(input, null, GrayF32.class);
NonMaxSuppression nonmax = FactoryFeatureExtractor.nonmax(new ConfigExtract(3, 1, 1, true, true, true));
NonMaxLimiter extractor = new NonMaxLimiter(nonmax, 400);
SiftScaleSpace imageSS = new SiftScaleSpace(-1, 5, 3, 2.75);
SiftDetector alg = new SiftDetector(imageSS, 10, extractor);
alg.process(gray);
System.out.println("total features found: " + alg.getDetections().size());
VisualizeFeatures.drawScalePoints(input.createGraphics(), alg.getDetections().toList(), 1);
// ListDisplayPanel dog = new ListDisplayPanel();
// for( int i = 0; i < alg.getScaleSpace().getDog().length; i++ ) {
// int scale = i % (alg.getScaleSpace().getNumScales()-1);
// int octave = i / (alg.getScaleSpace().getNumScales()-1);
//
// BufferedImage img = VisualizeImageData.colorizeSign(alg.getScaleSpace().getDog()[i],null,-1);
// dog.addImage(img,octave+" "+scale);
// }
//
// ListDisplayPanel ss = new ListDisplayPanel();
// for( int i = 0; i < alg.getScaleSpace().getScale().length; i++ ) {
// int scale = i % alg.getScaleSpace().getNumScales();
// int octave = i / alg.getScaleSpace().getNumScales();
//
// BufferedImage img = VisualizeImageData.grayMagnitude(alg.getScaleSpace().getScale()[i],null,255);
// ss.addImage(img,octave+" "+scale);
// }
// ShowImages.showWindow(dog, "Octave DOG");
// ShowImages.showWindow(ss, "Octave Scales");
ShowImages.showWindow(input, "Found Features", true);
System.out.println("Done");
}
Aggregations