Search in sources :

Example 56 with GrayF32

use of boofcv.struct.image.GrayF32 in project BoofCV by lessthanoptimal.

the class ShowImageDerivative method main.

public static void main(String[] args) {
    ShowImageDerivative<GrayF32, GrayF32> app = new ShowImageDerivative<>(GrayF32.class, GrayF32.class);
    // ShowImageDerivative<GrayU8, GrayS16> app
    // = new ShowImageDerivative<GrayU8,GrayS16>(GrayU8.class,GrayS16.class);
    List<PathLabel> inputs = new ArrayList<>();
    inputs.add(new PathLabel("shapes", UtilIO.pathExample("shapes/shapes01.png")));
    inputs.add(new PathLabel("sunflowers", UtilIO.pathExample("sunflowers.jpg")));
    inputs.add(new PathLabel("beach", UtilIO.pathExample("scale/beach02.jpg")));
    inputs.add(new PathLabel("xray", UtilIO.pathExample("xray01.jpg")));
    app.setInputList(inputs);
    // wait for it to process one image so that the size isn't all screwed up
    while (!app.getHasProcessedImage()) {
        Thread.yield();
    }
    ShowImages.showWindow(app, "Image Derivative", true);
}
Also used : GrayF32(boofcv.struct.image.GrayF32) PathLabel(boofcv.io.PathLabel) ArrayList(java.util.ArrayList)

Example 57 with GrayF32

use of boofcv.struct.image.GrayF32 in project BoofCV by lessthanoptimal.

the class VisualizeAverageDownSample method main.

public static void main(String[] args) {
    BufferedImage original = UtilImageIO.loadImage(UtilIO.pathExample("simple_objects.jpg"));
    Planar<GrayF32> input = new Planar<>(GrayF32.class, original.getWidth(), original.getHeight(), 3);
    ConvertBufferedImage.convertFromPlanar(original, input, true, GrayF32.class);
    Planar<GrayF32> output = new Planar<>(GrayF32.class, original.getWidth() / 3, original.getHeight() / 3, 3);
    Planar<GrayF32> output2 = new Planar<>(GrayF32.class, original.getWidth() / 3, original.getHeight() / 3, 3);
    AverageDownSampleOps.down(input, output);
    new FDistort(input, output2).scaleExt().apply();
    BufferedImage outputFull = ConvertBufferedImage.convertTo_F32(output, null, true);
    BufferedImage outputFull2 = ConvertBufferedImage.convertTo_F32(output2, null, true);
    ShowImages.showWindow(original, "Original");
    ShowImages.showWindow(outputFull, "3x small average");
    ShowImages.showWindow(outputFull2, "3x small bilinear");
}
Also used : GrayF32(boofcv.struct.image.GrayF32) FDistort(boofcv.abst.distort.FDistort) Planar(boofcv.struct.image.Planar) BufferedImage(java.awt.image.BufferedImage) ConvertBufferedImage(boofcv.io.image.ConvertBufferedImage)

Example 58 with GrayF32

use of boofcv.struct.image.GrayF32 in project BoofCV by lessthanoptimal.

the class DenoiseAccuracyStudyApp method loadImage.

private void loadImage(String imagePath) {
    BufferedImage in = UtilImageIO.loadImage(imagePath);
    image = ConvertBufferedImage.convertFrom(in, (GrayF32) null);
}
Also used : GrayF32(boofcv.struct.image.GrayF32) BufferedImage(java.awt.image.BufferedImage) ConvertBufferedImage(boofcv.io.image.ConvertBufferedImage)

Example 59 with GrayF32

use of boofcv.struct.image.GrayF32 in project BoofCV by lessthanoptimal.

the class VisualizeAssociationAlgorithmsApp method main.

public static void main(String[] args) {
    Class imageType = GrayF32.class;
    VisualizeAssociationAlgorithmsApp app = new VisualizeAssociationAlgorithmsApp(imageType);
    List<PathLabel> inputs = new ArrayList<>();
    inputs.add(new PathLabel("Cave", UtilIO.pathExample("stitch/cave_01.jpg"), UtilIO.pathExample("stitch/cave_02.jpg")));
    inputs.add(new PathLabel("Kayak", UtilIO.pathExample("stitch/kayak_02.jpg"), UtilIO.pathExample("stitch/kayak_03.jpg")));
    inputs.add(new PathLabel("Forest", UtilIO.pathExample("scale/rainforest_01.jpg"), UtilIO.pathExample("scale/rainforest_02.jpg")));
    inputs.add(new PathLabel("Building", UtilIO.pathExample("stitch/apartment_building_01.jpg"), UtilIO.pathExample("stitch/apartment_building_02.jpg")));
    inputs.add(new PathLabel("Trees Rotate", UtilIO.pathExample("stitch/trees_rotate_01.jpg"), UtilIO.pathExample("stitch/trees_rotate_03.jpg")));
    app.setPreferredSize(new Dimension(1000, 500));
    app.setSize(1000, 500);
    app.setInputList(inputs);
    // wait for it to process one image so that the size isn't all screwed up
    while (!app.getHasProcessedImage()) {
        Thread.yield();
    }
    ShowImages.showWindow(app, "Associated Features", true);
}
Also used : GrayF32(boofcv.struct.image.GrayF32) PathLabel(boofcv.io.PathLabel) ArrayList(java.util.ArrayList)

Example 60 with GrayF32

use of boofcv.struct.image.GrayF32 in project BoofCV by lessthanoptimal.

the class VisualizeAssociationMatchesApp method main.

public static void main(String[] args) {
    Class imageType = GrayF32.class;
    Class derivType = GImageDerivativeOps.getDerivativeType(imageType);
    VisualizeAssociationMatchesApp app = new VisualizeAssociationMatchesApp(imageType, derivType);
    List<PathLabel> inputs = new ArrayList<>();
    inputs.add(new PathLabel("Cave", UtilIO.pathExample("stitch/cave_01.jpg"), UtilIO.pathExample("stitch/cave_02.jpg")));
    inputs.add(new PathLabel("Kayak", UtilIO.pathExample("stitch/kayak_02.jpg"), UtilIO.pathExample("stitch/kayak_03.jpg")));
    inputs.add(new PathLabel("Forest", UtilIO.pathExample("scale/rainforest_01.jpg"), UtilIO.pathExample("scale/rainforest_02.jpg")));
    inputs.add(new PathLabel("Building", UtilIO.pathExample("stitch/apartment_building_01.jpg"), UtilIO.pathExample("stitch/apartment_building_02.jpg")));
    inputs.add(new PathLabel("Trees Rotate", UtilIO.pathExample("stitch/trees_rotate_01.jpg"), UtilIO.pathExample("stitch/trees_rotate_03.jpg")));
    app.setPreferredSize(new Dimension(1000, 500));
    app.setSize(1000, 500);
    app.setInputList(inputs);
    // wait for it to process one image so that the size isn't all screwed up
    while (!app.getHasProcessedImage()) {
        Thread.yield();
    }
    ShowImages.showWindow(app, "Associated Features", true);
}
Also used : GrayF32(boofcv.struct.image.GrayF32) PathLabel(boofcv.io.PathLabel) ArrayList(java.util.ArrayList)

Aggregations

GrayF32 (boofcv.struct.image.GrayF32)530 Test (org.junit.Test)291 BufferedImage (java.awt.image.BufferedImage)81 ConvertBufferedImage (boofcv.io.image.ConvertBufferedImage)76 GrayU8 (boofcv.struct.image.GrayU8)49 Planar (boofcv.struct.image.Planar)34 ArrayList (java.util.ArrayList)28 ImageBorder_F32 (boofcv.core.image.border.ImageBorder_F32)20 ImageGray (boofcv.struct.image.ImageGray)20 File (java.io.File)20 CameraPinholeRadial (boofcv.struct.calib.CameraPinholeRadial)19 Se3_F64 (georegression.struct.se.Se3_F64)18 TupleDesc_F64 (boofcv.struct.feature.TupleDesc_F64)17 GrayS8 (boofcv.struct.image.GrayS8)16 ListDisplayPanel (boofcv.gui.ListDisplayPanel)14 PathLabel (boofcv.io.PathLabel)14 Kernel2D_F32 (boofcv.struct.convolve.Kernel2D_F32)13 GrayS16 (boofcv.struct.image.GrayS16)13 GrayS32 (boofcv.struct.image.GrayS32)13 Point2D_F64 (georegression.struct.point.Point2D_F64)13