Initial OCR to support ALPR mode with country support
This commit is contained in:
@@ -147,5 +147,11 @@ std::vector<OCRPredictResult> PaddleOCRV5RTEngine::ocr(const cv::Mat& image) {
|
||||
}
|
||||
}
|
||||
|
||||
TextLine PaddleOCRV5RTEngine::recognizeOnly(const cv::Mat& croppedImage) {
|
||||
std::lock_guard<std::recursive_mutex> lock(_mutex);
|
||||
if (!recognizer_ || croppedImage.empty()) return { "", 0.0f };
|
||||
return recognizer_->Recognize(croppedImage);
|
||||
}
|
||||
|
||||
} // namespace rtocr
|
||||
} // namespace ANSCENTER
|
||||
|
||||
@@ -31,6 +31,9 @@ public:
|
||||
// Run full OCR pipeline: detect → crop → [classify →] recognize
|
||||
std::vector<OCRPredictResult> ocr(const cv::Mat& image);
|
||||
|
||||
// Run recognizer only on a pre-cropped text image (no detection step)
|
||||
TextLine recognizeOnly(const cv::Mat& croppedImage);
|
||||
|
||||
// Configuration setters
|
||||
void SetDetMaxSideLen(int v) { detMaxSideLen_ = v; }
|
||||
void SetDetDbThresh(float v) { detDbThresh_ = v; }
|
||||
|
||||
Reference in New Issue
Block a user