Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. public class HelowTest {
  2.  
  3. public static void main(String[] args)
  4. {
  5. System.out.println("Welcome to OpenCV " + Core.VERSION);
  6. System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
  7.  
  8. VideoCapture ip_cam = new VideoCapture();
  9.  
  10. ip_cam.open(0);// 1. передача в метод камеры по умолчанию
  11. // ip_cam.open("http://......") 2.вот так кадр с WEB камеры, судя по мануалу, но это не работает.
  12.  
  13. if (!ip_cam.isOpened())
  14. {
  15. System.out.print("Error while trying to open the webcam");
  16. return;
  17. }
  18.  
  19. System.out.println("Success!");
  20.  
  21. ip_cam.release();
  22. }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement