so there is OpenCV for Java now...! Can anyone tell me how to open Videofiles with it ?
I tryed and look all over the internet, but found nothing. The documentation
here is an example :
public static void main(String[] args) {
Mat frame = new Mat();
VideoCapture camera = new VideoCapture("C:/Users/SAAD/Desktop/motion.mp4");
JFrame jframe = new JFrame("Title");
jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel vidpanel = new JLabel();
jframe.setContentPane(vidpanel);
jframe.setVisible(true);
while (true) {
if (camera.read(frame)) {
ImageIcon image = new ImageIcon(Mat2bufferedImage(frame));
vidpanel.setIcon(image);
vidpanel.repaint();
}
}
}`
if you are using Windows add C:\opencv\build\x86\vc11\bin to the Path variable