Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

if complexity is your problem, cut it into pieces !

Mat nextImage() {
    // 1st try:
    if( inputCapture.isOpened() ) {
        Mat result, view0;
        inputCapture >> view0;
        view0.copyTo(result);
        return result;
    }
    // 2nd try:
    if( atImageList < (int)imageList.size() ) {
        return imread(imageList[atImageList++], CV_LOAD_IMAGE_COLOR);
    }
    // fallback
    return Mat();
}