disable ALPR checker by default

This commit is contained in:
2026-05-05 04:37:23 +10:00
parent 91d81cbd88
commit d03c2c1138
8 changed files with 1192 additions and 12 deletions
+4 -2
View File
@@ -1231,8 +1231,10 @@ namespace ANSCENTER
// ALPRChecker voting + ensureUniquePlateText dedup.
bool ANSALPR_OCR::shouldUseALPRChecker(const cv::Size& imageSize,
const std::string& cameraId) {
// Force disabled via SetALPRCheckerEnabled(false) → never use.
if (!_enableALPRChecker) return false;
// Force disabled via SetALPRCheckerEnabled(false) → never use. Relaxed
// atomic load: tear-free read is all we need, "next frame sees the new
// value" is the intended contract.
if (!_enableALPRChecker.load(std::memory_order_relaxed)) return false;
// Small images are always pipeline crops — skip auto-detection.
if (imageSize.width < ImageSizeTracker::MIN_FULLFRAME_WIDTH) return false;