Skip to content

Instantly share code, notes, and snippets.

@wchargin
Created January 27, 2014 17:47
Show Gist options
  • Save wchargin/8653632 to your computer and use it in GitHub Desktop.
Save wchargin/8653632 to your computer and use it in GitHub Desktop.
package edge;
import java.awt.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;
public class Repeated {
public static void main(String[] args) throws Exception {
File in = new File("/home/mint/image.png");
BufferedImage im = ImageIO.read(in);
for (int i = 1; i < 100; i++) {
// doEdgeDetection(input, useColor, wrapEdges, brightAdjust)
// brightAdjust should be 1 for no adjustment, 0.9 for slight
im = SobelGUI.doEdgeDetection(im, true, false, 0.9);
ImageIO.write(im, new File(String.format("/home/mint/image%04d.png", i)));
System.out.println("Completed frame " + i);
}
}
// doEdgeDetection located at
// https://github.com/WChargin/apcs/blob/edge/EdgeDetectionJava/src/edge/SobelGUI.java#L220
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment