add dll version and its usage
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
#include "pch.h"
|
||||
#include "OCRConfig.h"
|
||||
|
||||
uns::OCRConfig uns::G_OCRConfig;
|
||||
|
||||
uns::OCRConfig::OCRConfig()
|
||||
{
|
||||
language = easyocr::CharsetType::EN;
|
||||
gpu_usage = easyocr::GPUUsage::PreferGPU;
|
||||
}
|
||||
|
||||
uns::OCRConfig::OCRConfig(const std::wstring& detect_model, const std::wstring& reco_model, easyocr::CharsetType language, easyocr::GPUUsage gpu)
|
||||
{
|
||||
gpu_usage = gpu;
|
||||
this->language = language;
|
||||
detect_model_path = detect_model;
|
||||
recognize_model_path = reco_model;
|
||||
}
|
||||
|
||||
uns::easyocr::GPUUsage uns::OCRConfig::GetGPUUsage() const
|
||||
{
|
||||
return gpu_usage;
|
||||
}
|
||||
|
||||
uns::easyocr::CharsetType uns::OCRConfig::GetLanguage() const
|
||||
{
|
||||
return language;
|
||||
}
|
||||
|
||||
std::wstring uns::OCRConfig::GetDetectModelPath() const
|
||||
{
|
||||
return detect_model_path;
|
||||
}
|
||||
|
||||
std::wstring uns::OCRConfig::GetRecognizeModelPath() const
|
||||
{
|
||||
return recognize_model_path;
|
||||
}
|
||||
|
||||
void uns::OCRConfig::SetGPUUsage(easyocr::GPUUsage usage)
|
||||
{
|
||||
gpu_usage = usage;
|
||||
}
|
||||
|
||||
void uns::OCRConfig::SetLanguage(easyocr::CharsetType type)
|
||||
{
|
||||
language = type;
|
||||
}
|
||||
|
||||
void uns::OCRConfig::SetDetectModelPath(const std::wstring& path)
|
||||
{
|
||||
detect_model_path = path;
|
||||
}
|
||||
|
||||
void uns::OCRConfig::SetRecognizeModelPath(const std::wstring& path)
|
||||
{
|
||||
recognize_model_path = path;
|
||||
}
|
||||
Reference in New Issue
Block a user