Hello,I have a problem: load a file video from path with openCV; with webcam all right..with path bad ...don't work ;( this is my code: help me... premetto che con lacquisizione video non ho nessun problema, il problema si pone quando devo caricare un video da locale...ecco il codice
import org.opencv.core.*; import org.opencv.highgui.Highgui; import org.opencv.highgui.VideoCapture;
public class VideoCaptureFile {
public static void main (String args[]){
System.loadLibrary(Core.NATIVE_LIBRARY_NAME); VideoCapture camera = new VideoCapture("C://video.avi");
if(!camera.isOpened()){ System.out.println("Error"); }
Mat frame = new Mat();
while(true){
if (camera.read(frame)){
System.out.println("Frame Obtained");
System.out.println("Captured Frame Width " +
frame.width() + " Height " + frame.height());
Highgui.imwrite("camera.jpg", frame);
System.out.println("OK");
break;
}
}
camera.release();
}
}
OUTPUT :error