Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

capture image to slow with java

open webcam, read and releas takes about 600ms. Is there a way to speed-up?

click to hide/show revision 2
added more info and code snippet

capture image to slow with java

open webcam, read and releas takes about 600ms. Is there a way to speed-up?speed-up? Using it on Windows 7 with latest java and recent opencv:

VideoCapture webcam = new VideoCapture();
boolean opened = webcam.opened();
if (opened) {
    return null;
}
try {
    webcam.open(0);
} catch (Exception e) {
    return null;
}

if (!webcam.opened()) {
    return null;
}
try {
    Mat frame = new Mat();
    webcam.read(frame);
    //do somethinig
    webcam.release();
} catch (Exception e) {
    null
}
return null;

capture image to slow with java

open webcam, read and releas takes about 600ms. Is there a way to speed-up? Using it on Windows 7 with latest java and recent opencv:

VideoCapture webcam = new VideoCapture();
boolean opened = webcam.opened();
if (opened) {
    return null;
}
try {
    webcam.open(0);
} catch (Exception e) {
    return null;
}

if (!webcam.opened()) {
    return null;
}
try {
    Mat frame = new Mat();
    webcam.read(frame);
    //do somethinig
    webcam.release();
} catch (Exception e) {
    null
}
return null;

capture image to slow with java

open webcam, read and releas takes about 600ms. Is there a way to speed-up? Using it on Windows 7 with latest java and recent opencv:

VideoCapture webcam = new VideoCapture();
boolean opened = webcam.opened();
if (opened) {
    return null;
}
try {
    webcam.open(0);
} catch (Exception e) {
    return null;
}

if (!webcam.opened()) {
    return null;
}
try {
    Mat frame = new Mat();
    webcam.read(frame);
    //do somethinig
    webcam.release();
} catch (Exception e) {
    null
}
return null;