| 79 | void read_lane_file(const string &file_name, vector<vector<Point2f>> &lanes, vector<uint8_t> &lane_flags); |
| 80 | void visualize(string &full_im_name, vector<vector<Point2f>> &anno_lanes, vector<vector<Point2f>> &detect_lanes, vector<int> anno_match, int width_lane, string visualize_path); |
| 81 | int32_t createDirectory(const std::string &directoryPath) |
| 82 | { |
| 83 | uint32_t dirPathLen = directoryPath.length(); |
| 84 | if (dirPathLen > MAX_PATH_LEN) |
| 85 | { |
| 86 | return -1; |
| 87 | } |
| 88 | char tmpDirPath[MAX_PATH_LEN] = { 0 }; |
| 89 | for (uint32_t i = 0; i < dirPathLen; ++i) |
| 90 | { |
| 91 | tmpDirPath[i] = directoryPath[i]; |
| 92 | if (tmpDirPath[i] == '\\' || tmpDirPath[i] == '/') |
| 93 | { |
| 94 | if (ACCESS(tmpDirPath, 0) != 0) |
| 95 | { |
| 96 | int32_t ret = MKDIR(tmpDirPath); |
| 97 | if (ret != 0) |
| 98 | { |
| 99 | return ret; |
| 100 | } |
| 101 | } |
| 102 | } |
| 103 | } |
| 104 | return 0; |
| 105 | } |
| 106 | |
| 107 | int main(int argc, char **argv) |
| 108 | { |