Ask Your Question

DreamRunner's profile - activity

2013-07-17 18:04:06 -0600 received badge  Editor (source)
2013-07-17 17:56:29 -0600 answered a question CvCreateFileCapture in Java
Your code should be like this.
    public class CapturingExample{
    CvCapture capture;
    IplImage frame;
    public void Capturing() {  
    capture = cvCreateCameraCapture(-1);
    if(capture!=null)
    {
        while(true)
        {
            frame = cvQueryFrame(capture);
            cvShowImage("heloo", frame.asCvMat());

            cvSaveImage("hi.jpg", frame.asCvMat());//just saving image..

        }
    }

    else System.out.println("errro");
  }

     public static void main(final String[] args) {
     CapturingExample example = new CapturingExample();
     example.Capturing();
    }
}

Here you can get some hints for converting opencv to javacv. Hints for Converting OpenCV C/C++ code to JavaCV