Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 97e24c31f2 | |||
| f66ce7e2e8 |
@@ -157,20 +157,57 @@ void AbstractAnalysis::create_dir_allocate_images()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractAnalysis::read_dir_create_list(string folder_path)
|
|
||||||
|
|
||||||
|
|
||||||
|
bool cmp_file(string f0, string f1)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
int v0 = atoi(f0.substr(0, f0.find("_")).c_str());
|
||||||
|
|
||||||
|
int v1 = atoi(f1.substr(0, f1.find("_")).c_str());
|
||||||
|
|
||||||
|
return v0 < v1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void AbstractAnalysis::read_dir_create_list(string folder_path)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
File dir(folder_path);
|
File dir(folder_path);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(dir.exists() && dir.isDirectory()) {
|
if(dir.exists() && dir.isDirectory()) {
|
||||||
|
|
||||||
vector<string> list;
|
vector<string> list;
|
||||||
|
|
||||||
dir.list(list);
|
dir.list(list);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
std::sort(list.begin(), list.end(), cmp_file);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for(int i = 0; i < list.size(); i++) {
|
for(int i = 0; i < list.size(); i++) {
|
||||||
|
|
||||||
string filepath = folder_path + "/" + list[i];
|
string filepath = folder_path + "/" + list[i];
|
||||||
|
|
||||||
_saved_filenames_analysis.push_back(filepath);
|
_saved_filenames_analysis.push_back(filepath);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void AbstractAnalysis::saveImageAnalysis(string filename)
|
void AbstractAnalysis::saveImageAnalysis(string filename)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -65,5 +65,8 @@ protected:
|
|||||||
//this is the temporary container to allow us to convert and save out greyscale images
|
//this is the temporary container to allow us to convert and save out greyscale images
|
||||||
ofxCvColorImage cvConvertorImage;
|
ofxCvColorImage cvConvertorImage;
|
||||||
|
|
||||||
|
unsigned char * imagePixels;
|
||||||
|
int vectorCount;
|
||||||
|
ofVec2f * vectorField;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user