change recognizer output format
This commit is contained in:
@@ -37,8 +37,8 @@ int main()
|
||||
auto results = uns::EasyOCR_CPP::FullAuto(img);
|
||||
for (const auto& [index, info] : results)
|
||||
{
|
||||
const auto& [text, conf] = info;
|
||||
std::cout << "Box " << index << ": \"" << uns::EOCR_SupportTools::WtoA(text) << "\" Confidence=" << conf << "\n";
|
||||
const auto& [text, conf, rect] = info;
|
||||
printf("Result %d: Text = {%s}, Box = [%d, %d, %d, %d], Confidence = %.3f\n", (int)index, uns::EOCR_SupportTools::WtoA(text).c_str(), rect.tl().x, rect.tl().y, rect.br().x, rect.br().y, conf);
|
||||
}
|
||||
|
||||
uns::EasyOCR_CPP::CleanupOCR();
|
||||
|
||||
@@ -32,8 +32,9 @@ namespace uns
|
||||
EN_CH
|
||||
};
|
||||
|
||||
using EOCR_Result = std::pair<std::wstring, float>;
|
||||
using EOCR_ResultSet = std::map<size_t, EOCR_Result>;
|
||||
using EOCR_Result = std::tuple<std::wstring, float>;
|
||||
using EOCR_Result_Single = std::tuple<std::wstring, float, cv::Rect>;
|
||||
using EOCR_ResultSet = std::map<size_t, EOCR_Result_Single>;
|
||||
using EOCRD_Rects = std::vector<std::vector<cv::Point2f>>;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user