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();
}