Fix AMD and OpenVINO

This commit is contained in:
2026-04-08 13:45:52 +10:00
parent a4a8caaa86
commit 69787b0ff0
15 changed files with 1209 additions and 132 deletions

View File

@@ -963,7 +963,9 @@ namespace ANSCENTER {
// Run license plate detection
cv::Mat activeFrame = frame(detectedArea);
fprintf(stderr, "[ALPR] RunInference: calling lpd %dx%d cam=%s\n", activeFrame.cols, activeFrame.rows, cameraId.c_str());
std::vector<Object> lprOutput = _lpDetector->RunInference(activeFrame, cameraId);
fprintf(stderr, "[ALPR] RunInference: lpd done, %zu detections cam=%s\n", lprOutput.size(), cameraId.c_str());
for (size_t _di = 0; _di < lprOutput.size(); ++_di) {
ANS_DBG("ALPR_Track", "cam=%s det[%zu] tid=%d box=(%d,%d,%d,%d) conf=%.2f",
cameraId.c_str(), _di, lprOutput[_di].trackId,
@@ -1005,7 +1007,9 @@ namespace ANSCENTER {
cv::Mat alignedLPR = frame(lprPos);// .clone();
// OCR inference
fprintf(stderr, "[ALPR] RunInference: calling OCR on plate %dx%d cam=%s\n", alignedLPR.cols, alignedLPR.rows, cameraId.c_str());
std::string ocrText = DetectLicensePlateString(alignedLPR, cameraId);
fprintf(stderr, "[ALPR] RunInference: OCR done, text='%s' cam=%s\n", ocrText.c_str(), cameraId.c_str());
if (ocrText.empty()) {
continue;