Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think your problem is as simple as a missing bracket... Here:

else if( atImageList < (int)imageList.size() ) **{**

I think your problem is as simple as a missing bracket... Here:

else if( atImageList < (int)imageList.size() ) **{**

UPD: I just noticed your usage of brackets to change the scope of the variables. I guess your code has some weird syntactic glitch or I am misunderstanding C++. To make sure, i would set all the brackets like this:

Mat nextImage(); // missing ; here?
{
Mat result;
if( inputCapture.isOpened() )
{
  Mat view0;
  inputCapture >> view0;
  view0.copyTo(result);
} 
else if( atImageList < (int)imageList.size() ) 
{
   result = imread(imageList[atImageList++], CV_LOAD_IMAGE_COLOR);
    return result;
}
}

I think your problem is as simple as a missing bracket... Here:

else if( atImageList < (int)imageList.size() ) **{**

UPD: I just noticed your usage of brackets to change the scope of the variables. I guess your code has some weird syntactic glitch or I am misunderstanding C++. To make sure, i would set all the brackets like this:

Mat nextImage(); // missing ; here?
{
Mat result;
if( inputCapture.isOpened() )
{
  Mat view0;
  inputCapture >> view0;
  view0.copyTo(result);
} 
else if( atImageList < (int)imageList.size() ) 
{
   result = imread(imageList[atImageList++], CV_LOAD_IMAGE_COLOR);
CV_LOAD_IMAGE_COLOR);     
}
return result;
}
}