use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class EquirectangularCylinderApp method main.
public static void main(String[] args) {
ImageType type = ImageType.pl(3, GrayU8.class);
List<PathLabel> examples = new ArrayList<>();
examples.add(new PathLabel("Half Dome 01", UtilIO.pathExample("spherical/equirectangular_half_dome_01.jpg")));
examples.add(new PathLabel("Half Dome 02", UtilIO.pathExample("spherical/equirectangular_half_dome_02.jpg")));
examples.add(new PathLabel("Glow Sticks", UtilIO.pathExample("spherical/equirectangular_glowsticks.jpg")));
EquirectangularCylinderApp app = new EquirectangularCylinderApp(examples, type);
app.openFile(new File(examples.get(0).getPath()));
app.display("Equirectanglar to Cylindrical");
}
use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class FisheyePinholeApp method main.
public static void main(String[] args) {
ImageType type = ImageType.pl(3, GrayU8.class);
List<PathLabel> examples = new ArrayList<>();
examples.add(new PathLabel("Dining Room", UtilIO.pathExample("fisheye/theta/front_table.jpg")));
examples.add(new PathLabel("Hike", UtilIO.pathExample("fisheye/theta/front_hike.jpg")));
FisheyePinholeApp app = new FisheyePinholeApp(examples, type);
app.openFile(new File(examples.get(0).getPath()));
app.display("Fisheye to Pinhole Camera");
}
use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class VisualizeHogDescriptorApp method main.
public static void main(String[] args) {
List<String> examples = new ArrayList<>();
examples.add(UtilIO.pathExample("segment/berkeley_horses.jpg"));
examples.add(UtilIO.pathExample("segment/berkeley_man.jpg"));
examples.add(UtilIO.pathExample("shapes/shapes01.png"));
examples.add(UtilIO.pathExample("shapes/shapes02.png"));
ImageType imageType = ImageType.single(GrayF32.class);
VisualizeHogDescriptorApp app = new VisualizeHogDescriptorApp(examples, imageType);
app.openFile(new File(examples.get(0)));
app.display("Hog Descriptor Visualization");
}
use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class VisualizeImageHogCellApp method main.
public static void main(String[] args) {
List<String> examples = new ArrayList<>();
examples.add(UtilIO.pathExample("shapes/shapes01.png"));
examples.add(UtilIO.pathExample("shapes/shapes02.png"));
examples.add(UtilIO.pathExample("segment/berkeley_horses.jpg"));
examples.add(UtilIO.pathExample("segment/berkeley_man.jpg"));
ImageType imageType = ImageType.single(GrayF32.class);
VisualizeImageHogCellApp app = new VisualizeImageHogCellApp(examples, imageType);
app.openFile(new File(examples.get(0)));
app.display("Hog Descriptor Unnormalized Cell");
}
use of boofcv.struct.image.ImageType in project BoofCV by lessthanoptimal.
the class ExampleJCodecDisplayFrames method main.
public static void main(String[] args) {
String fileName = UtilIO.pathExample("background/highway_bridge_jitter.mp4");
ImageType type = ImageType.pl(3, GrayU8.class);
// ImageType type = ImageType.single(GrayU8.class);
// ImageType type = ImageType.pl(3, GrayF32.class);
// ImageType type = ImageType.single(GrayF32.class);
JCodecSimplified sequence = new JCodecSimplified<>(fileName, type);
BufferedImage out;
if (sequence.hasNext()) {
ImageBase frame = sequence.next();
out = new BufferedImage(frame.width, frame.height, BufferedImage.TYPE_INT_RGB);
ConvertBufferedImage.convertTo(frame, out, false);
} else {
throw new RuntimeException("No first frame?!?!");
}
ImagePanel gui = new ImagePanel(out);
ShowImages.showWindow(gui, "Video!", true);
long totalNano = 0;
while (sequence.hasNext()) {
long before = System.nanoTime();
ImageBase frame = sequence.next();
totalNano += System.nanoTime() - before;
ConvertBufferedImage.convertTo(frame, out, false);
gui.repaint();
try {
Thread.sleep(22);
} catch (InterruptedException e) {
}
}
System.out.println("Only read FPS = " + (totalNano / 1000000.0) / sequence.getFrameNumber());
}
Aggregations