Search in sources :

Example 36 with PathLabel

use of boofcv.io.PathLabel in project BoofCV by lessthanoptimal.

the class ShowRectifyCalibratedApp method changeInput.

@Override
public void changeInput(String name, int index) {
    PathLabel refs = inputRefs.get(index);
    StereoParameters param = CalibrationIO.load(media.openFile(refs.getPath(0)));
    BufferedImage origLeft = media.openImage(refs.getPath(1));
    BufferedImage origRight = media.openImage(refs.getPath(2));
    configure(origLeft, origRight, param);
}
Also used : PathLabel(boofcv.io.PathLabel) StereoParameters(boofcv.struct.calib.StereoParameters) BufferedImage(java.awt.image.BufferedImage) ConvertBufferedImage(boofcv.io.image.ConvertBufferedImage)

Example 37 with PathLabel

use of boofcv.io.PathLabel in project BoofCV by lessthanoptimal.

the class DemoBinaryBlobLabelOpsApp method main.

public static void main(String[] args) {
    DemoBinaryBlobLabelOpsApp app = new DemoBinaryBlobLabelOpsApp(GrayF32.class);
    List<PathLabel> inputs = new ArrayList<>();
    inputs.add(new PathLabel("particles", UtilIO.pathExample("particles01.jpg")));
    inputs.add(new PathLabel("shapes", UtilIO.pathExample("shapes/shapes01.png")));
    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, "Label Binary Blobs", true);
    System.out.println("Done");
}
Also used : PathLabel(boofcv.io.PathLabel) ArrayList(java.util.ArrayList)

Example 38 with PathLabel

use of boofcv.io.PathLabel in project BoofCV by lessthanoptimal.

the class DemoImageThresholdingApp method main.

public static void main(String[] args) {
    java.util.List<PathLabel> examples = new ArrayList<>();
    examples.add(new PathLabel("particles", UtilIO.pathExample("particles01.jpg")));
    examples.add(new PathLabel("shapes", UtilIO.pathExample("shapes/shapes01.png")));
    examples.add(new PathLabel("stained", UtilIO.pathExample("segment/stained_handwriting.jpg")));
    examples.add(new PathLabel("Chessboard Movie", UtilIO.pathExample("fiducial/chessboard/movie.mjpeg")));
    DemoImageThresholdingApp app = new DemoImageThresholdingApp(examples, GrayF32.class);
    app.openExample(examples.get(0));
    app.display("Thresholding Demo");
}
Also used : PathLabel(boofcv.io.PathLabel) ArrayList(java.util.ArrayList)

Example 39 with PathLabel

use of boofcv.io.PathLabel in project BoofCV by lessthanoptimal.

the class FourierVisualizeApp method main.

public static void main(String[] args) {
    FourierVisualizeApp app = new FourierVisualizeApp(ImageDataType.F32);
    // FourierVisualizeApp app = new FourierVisualizeApp(ImageTypeInfo.F64);
    java.util.List<PathLabel> inputs = new ArrayList<>();
    inputs.add(new PathLabel("lena", UtilIO.pathExample("standard/lena512.jpg")));
    inputs.add(new PathLabel("boat", UtilIO.pathExample("standard/boat.jpg")));
    inputs.add(new PathLabel("fingerprint", UtilIO.pathExample("standard/fingerprint.jpg")));
    inputs.add(new PathLabel("shapes", UtilIO.pathExample("shapes/shapes01.png")));
    inputs.add(new PathLabel("sunflowers", UtilIO.pathExample("sunflowers.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, "Discrete Fourier Transform", true);
}
Also used : PathLabel(boofcv.io.PathLabel) ArrayList(java.util.ArrayList)

Example 40 with PathLabel

use of boofcv.io.PathLabel in project BoofCV by lessthanoptimal.

the class VisualizePyramidDiscreteApp method main.

public static void main(String[] args) {
    VisualizePyramidDiscreteApp<GrayF32> app = new VisualizePyramidDiscreteApp<>(GrayF32.class);
    List<PathLabel> inputs = new ArrayList<>();
    inputs.add(new PathLabel("lena", UtilIO.pathExample("standard/lena512.jpg")));
    inputs.add(new PathLabel("boat", UtilIO.pathExample("standard/boat.jpg")));
    inputs.add(new PathLabel("fingerprint", UtilIO.pathExample("standard/fingerprint.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 Discrete Pyramid", true);
}
Also used : GrayF32(boofcv.struct.image.GrayF32) PathLabel(boofcv.io.PathLabel) ArrayList(java.util.ArrayList)

Aggregations

PathLabel (boofcv.io.PathLabel)51 ArrayList (java.util.ArrayList)48 GrayF32 (boofcv.struct.image.GrayF32)14 File (java.io.File)10 ImageType (boofcv.struct.image.ImageType)7 GrayU8 (boofcv.struct.image.GrayU8)4 ConvertBufferedImage (boofcv.io.image.ConvertBufferedImage)3 BufferedImage (java.awt.image.BufferedImage)3 BufferedReader (java.io.BufferedReader)2 IOException (java.io.IOException)2 SquareImage_to_FiducialDetector (boofcv.abst.fiducial.SquareImage_to_FiducialDetector)1 LensDistortionRadialTangential (boofcv.alg.distort.radtan.LensDistortionRadialTangential)1 ConfigFiducialBinary (boofcv.factory.fiducial.ConfigFiducialBinary)1 ConfigFiducialImage (boofcv.factory.fiducial.ConfigFiducialImage)1 ConfigThreshold (boofcv.factory.filter.binary.ConfigThreshold)1 StereoParameters (boofcv.struct.calib.StereoParameters)1 ActionListener (java.awt.event.ActionListener)1 FileReader (java.io.FileReader)1 Reader (java.io.Reader)1 List (java.util.List)1