I\'m new in the world of Stackoverflow and in OpenCV programming. I\'ve made some projects with OpenCV Bindings for Java (the opencv.org officials, not JavaCV), like object
The problem was simply that camera need time to initialize. I've added
Thread.sleep(1000);
after
VideoCapture camera = new VideoCapture(0);