I have written the snippet code below to save multiple images with different names but it doesn't work.
Thanks in advance for your help.
#include
#include
#include
........
int nBlur[] = {5, 7, 13};
BOOST_FOREACH( int i, nBlur)
{
std::string str = boost::lexical_cast(i); // convert i to string
string imgF = "imgBlur" + i;
const char *imgFile = imgF.c_str();
GaussianBlur(imgGray, imgGrayBlur, Size(i,i), 0, 0 );
//imshow("Blurring image", imgGrayBlur);
Mat blurred(imgGrayBlur);
imwrite(imgFile+".png", imgGrayBlur);
}
↧