需要的包:
bridj-0.7.0.jar、webcam-capture-0.3.12.jar、
slf4j-api-1.8.0-beta2.jar、slf4j-simple-1.8.0-beta2.jar
下载:链接:https://pan.baidu.com/s/1CRipriIFrStb4CuW6czPYw
提取码:nhtk
后两个包记录日志的,参考http://www.pianshen.com/article/4059131568/
源代码参考:http://www.cnblogs.com/cnweiblog/p/4602207.html
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import com.github.sarxos.webcam.Webcam;
import com.github.sarxos.webcam.WebcamPanel;
import com.github.sarxos.webcam.WebcamResolution;
import com.github.sarxos.webcam.WebcamUtils;
import com.github.s