Im trying to run CannyEdgeDetector.java
example: This Example
public static void main(String args[]) {
BufferedImage img = null;
try {
img = ImageIO.read(new File("paper3.png"));
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
CannyEdgeDetector detector = new CannyEdgeDetector();
detector.setSourceImage(img);
detector.process();
BufferedImage edges = detector.getEdgesImage();
File saveFile = new File("out.png");
try {
ImageIO.write(edges, "png", saveFile);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
im getting Exception in thread "main" java.lang.IllegalArgumentException: Unsupported image type: 6