MCPcopy Create free account
hub / github.com/devilsen/CZXing / saveMat

Function saveMat

czxing/src/main/cpp/MatUtils.h:16–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14CZXING_BEGIN_NAMESPACE()
15
16static 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
31unsigned int m_FileIndex;
32

Callers 3

saveIncreaseMatFunction · 0.85
readByteMethod · 0.85
readBitmapMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected