Home > Back-end >  Inside of opencv imread () reads the images
Inside of opencv imread () reads the images

Time:11-05

Oh, well, the great god know Mat imageSource=imread (" "); How do you write to 13 pictures in folder can read it again, rather than just reading a picture 13 times repeated, fill like this Mat imageSource=imread (" left01. JPG "); A picture repeated 13
For (int I=0; The I!=image_count; I++)
{
STD: : cout<" Frame # "& lt; InitUndistortRectifyMap (cameraMatrix distCoeffs, R, cameraMatrix image_size, CV_32FC1, mapx, mapy);
StrStm. The clear ();
ImageFileName. The clear ();
String filePath="chess";
StrStmStrStm> ImageFileName;
FilePath +=imageFileName;
FilePath +=". BMP ";
Mat imageSource=imread (" left01. JPG ");//this line how to fill out
Mat newimage=imageSource. Clone ();
.
}
STD: : cout<" Save the end "& lt; return ;
}

CodePudding user response:

File name regularly, such as
Left01. JPG
Left02. JPG
Left03. JPG
Can use sprintf function to construct the filename,

CodePudding user response:

What's structure..., please? Can you put the sample come out? I just contact with these do not understand, forgive me, my pictures are really regular
Left01. JPG
Left02. JPG
.
Left13. JPG
thank you

CodePudding user response:

If you want to output the printf function
Left01. JPG
Left02. JPG
.
Left13. JPG
The file name, use a for loop, you will lose? As the sprintf,

CodePudding user response:

Uh... Can, but should have that kind of imread (" left0 + I + JPG "), this form of, what I want is this kind of form, hey hey...

CodePudding user response:

Baidu printf format control, two Numbers, less than zero,

CodePudding user response:

Filename to fill in the vector container, traverse the vector read pictures
  • Related