| 14 | CZXING_BEGIN_NAMESPACE() |
| 15 | |
| 16 | static void saveMat(const cv::Mat &mat, const std::string& fileName = "src") { |
| 17 | #ifdef SAVE_MAT |
| 18 | std::string filePath = |
| 19 | "/storage/emulated/0/Android/data/me.devilsen.czxing/cache/" + fileName + |
| 20 | ".jpg"; |
| 21 | cv::Mat resultMat(mat.rows, mat.cols, CV_8UC1, mat.data); |
| 22 | bool saveResult = imwrite(filePath, mat); |
| 23 | if (saveResult) { |
| 24 | LOGE("save result success filePath = %s", filePath.c_str()) |
| 25 | } else { |
| 26 | LOGE("save result fail") |
| 27 | } |
| 28 | #endif |
| 29 | } |
| 30 | |
| 31 | unsigned int m_FileIndex; |
| 32 |
no outgoing calls
no test coverage detected