Given image files
lights000.rgbe
lights001.rgbe
lights002.rgbe
...
lights899.rgbe
Are all located in a single subfolder. What is the best way to read one file then the next?
Given that my read command for .rgbe
is called readHDR(char* filename)
I have seen several questions regrading this problem but they all use OpenCV. I am not using opencv and .rgbe
is not even a supported OpenCV file extension so that method wouldn't even work.
I saw the following code from a different question:
char* Dataset_Dir( "C:/Data/" ); // Or take it from argv[1]
cv::Mat normal_matrix;
std::vector<cv::Mat>* image_stack;
for( int i=1; i<=endNumber; ++i )
{
// Gives the entire stack of images for you to go through
image_stack->push_back(cv::imread(std::format("%s/%03d-capture.png", Dataset, i), CV_LOAD_IMAGE_COLOR));
normal_matrix = cv::imread(std::format("%s/%03d-capture.png", Dataset, i), CV_LOAD_IMAGE_COLOR);
}
But I cannot find any information on the std::format command or the Dataset_Dir.
Any advice for even how to split the file name string into three parts would be really helpful.
Split into:
char Name = "lights";
int Num = "000";
char File = ".rgbe;