Created
April 6, 2016 03:42
-
-
Save chaonan99/ba9638d1c04d86e2deb547fe8f30ceac to your computer and use it in GitHub Desktop.
A simple demo of screen capture using Matlab and java AWT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
robo = java.awt.Robot; | |
t = java.awt.Toolkit.getDefaultToolkit(); | |
rectangle = java.awt.Rectangle(t.getScreenSize()); | |
image = robo.createScreenCapture(rectangle); | |
filehandle = java.io.File('capture.png'); | |
javax.imageio.ImageIO.write(image,'png',filehandle); | |
im = imread('capture.png'); | |
imshow(im); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment