How to load multiple iplimages and save with extra words to original words? [closed]
Hi. I am beginner of OpenCV.
And I am using OpenCV 2.
BUT I found the way to load multiple images with cv::glob. However, i found that counting the images but cannot show my several images with iplimages and crushed with the path string after cv::glob .
SO HERE IS MY QUESTION :
1. I want to know show to use the cv:glob for handling load and save with it.
image description
std::vector<cv::String> fn;
cv::glob(".\\result\\*.png", fn);
std::vector<cv::Mat> inputs;
for (auto i = 0; i < fn.size(); i++) {
inputs.push_back(cv::imread(fn[i]));
printf("%d = %s\n",i, fn[i]);
}
- How can i save with extra words to original vocabulary when i am using the cvSaveImage()!
opencv does no more use iplimages since 2010
@berak Oh, really? then I have to use the cv::Mat.
By the way, do you know why the directory path show unclear words after using cv::glob function?
I was using this :
std::vector<cv::string> fn;
cv::glob(".\result\*.png", fn);
std::vector<cv::mat> inputs;
for (auto i = 0; i < fn.size(); i++) {
inputs.push_back(cv::imread(fn[i]));
printf("%d = %s\n",i, fn[i]);
}
Oh, I found the solution when i changed from 'printf("%d = %s\n",i, fn[i]);' into 'std::cout<<i<<" "<<="" fn[i]<<std::endl'.<="" p="">