Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

so, using java, try something like this:

String video_url = "???";
VideoCapture cap = new VideoCapture(video_url);
long t0 = Core.getTickCount();

while (cap.isOpened()) {
    Mat im = new Mat();
    // read continuously, else you get stale images
    if (! cap.read(im)) 
         break;  // end of video reached

    long t1 = Core.getTickCount();
    double seconds = (double)(t1-t0) / Core.getTickFrequency();
    if (seconds >= 10) {
        t0 = t1; // reset timer
        // 
        // process your frame for OCR
        //
    }
}