To capture video from a web-camera, I used the example code from the DisplayWebcamVideo.java
It was amended resolution:
params.setValue ("video_size", "640x480");
To save images added to the line:
private static void updateJavaWindow (BufferedImage javaImage)
{
mScreen.setImage (javaImage);
ImageIO.write (javaImage, "jpg", new File (fileOut));
}
All the remains, but while maintaining the periodic part of the image is painted gray. Besides, if I understood correctly, before saving the next frame - the previous image is deleted from the HDD, then create a new one. As a result, sometimes the image with a web-camera and are not stored in the folder where sozhranenie should happen - not the desired file.
Can you please tell how to properly save images from the WEB-cameras?