From 125db633619a0b4c7bd1d498ea2bf1cefa4f73d3 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 09 二月 2023 18:54:13 +0800 Subject: [PATCH] '远程OCR' --- ConsoleApplication/OpenCLExcuter.cpp | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ConsoleApplication/OpenCLExcuter.cpp b/ConsoleApplication/OpenCLExcuter.cpp index a07205a..b16ac4c 100644 --- a/ConsoleApplication/OpenCLExcuter.cpp +++ b/ConsoleApplication/OpenCLExcuter.cpp @@ -517,7 +517,7 @@ clReleaseMemObject(memObject3); clReleaseMemObject(memObject4); clReleaseMemObject(memObject5); - std::cout << " 耗时:" << (clock() - time_0) << std::endl; + //std::cout << " 耗时:" << (clock() - time_0) << std::endl; } void OpenCLExcuter::splitL2NumNew(cv::Mat img, IntDataInfo pos, UcharDataInfo result, UcharDataInfo types, unsigned char* zero, int num_width, int num_height, int ele_count_per_line, int length_per_num) { @@ -619,7 +619,7 @@ excuteError(); throw st; } - std::cout << " 耗时:" << (clock() - time_0) << std::endl; + //std::cout << " 耗时:" << (clock() - time_0) << std::endl; } @@ -726,7 +726,7 @@ - std::cout << " 耗时:" << (clock() - time_0) << std::endl; + //std::cout << " 耗时:" << (clock() - time_0) << std::endl; } @@ -841,7 +841,7 @@ - std::cout << " 耗时:" << (clock() - time_0) << std::endl; + //std::cout << " 耗时:" << (clock() - time_0) << std::endl; } @@ -933,7 +933,7 @@ clReleaseMemObject(memObject2); clReleaseMemObject(memObject3); clReleaseMemObject(memObject4); - std::cout << " 耗时:" << (clock() - time_0) << std::endl; + //std::cout << " 耗时:" << (clock() - time_0) << std::endl; } catch (string st) { clReleaseKernel(kernel); @@ -1479,6 +1479,11 @@ clReleaseKernel(kernel); } catch (string st) { + //保存错误的图片 + //string path = "C:\\Users\\Administrator\\Desktop\\ocr\\error\\"; + //path.append(to_string(clock())).append("_"); + //path.append(to_string(rand())).append(".png"); + //cv::imwrite(path, img); clReleaseMemObject(memObject1); clReleaseMemObject(memObject2); clReleaseKernel(kernel); -- Gitblit v1.8.0