|
|
@ -31,20 +31,25 @@ int main(int argc, char *argv[]) |
|
|
|
std::string path = string(argv[4]); |
|
|
|
std::string path = string(argv[4]); |
|
|
|
|
|
|
|
|
|
|
|
//Parse the scaling factors
|
|
|
|
//Parse the scaling factors
|
|
|
|
std::stringstream ss(scales_str); |
|
|
|
|
|
|
|
std::vector<int> scales; |
|
|
|
std::vector<int> scales; |
|
|
|
std::string token; |
|
|
|
|
|
|
|
char delim = ','; |
|
|
|
char delim = ','; |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
std::stringstream ss(scales_str); |
|
|
|
|
|
|
|
std::string token; |
|
|
|
while (std::getline(ss, token, delim)) { |
|
|
|
while (std::getline(ss, token, delim)) { |
|
|
|
scales.push_back(atoi(token.c_str())); |
|
|
|
scales.push_back(atoi(token.c_str())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//Parse the output node names
|
|
|
|
//Parse the output node names
|
|
|
|
ss = std::stringstream(output_names_str); |
|
|
|
|
|
|
|
std::vector<String> node_names; |
|
|
|
std::vector<String> node_names; |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
std::stringstream ss(output_names_str); |
|
|
|
|
|
|
|
std::string token; |
|
|
|
while (std::getline(ss, token, delim)) { |
|
|
|
while (std::getline(ss, token, delim)) { |
|
|
|
node_names.push_back(token); |
|
|
|
node_names.push_back(token); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Load the image
|
|
|
|
// Load the image
|
|
|
|
Mat img = cv::imread(img_path); |
|
|
|
Mat img = cv::imread(img_path); |
|
|
|