From d5a5f8264a7d79a5d0e4f94ce0e92ed738d42668 Mon Sep 17 00:00:00 2001 From: syan Date: Wed, 11 Dec 2019 10:30:13 +0800 Subject: [PATCH] Update PlateDetection.cpp --- Prj-Linux/lpr/src/PlateDetection.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Prj-Linux/lpr/src/PlateDetection.cpp b/Prj-Linux/lpr/src/PlateDetection.cpp index a25f4db..9d0e6e2 100644 --- a/Prj-Linux/lpr/src/PlateDetection.cpp +++ b/Prj-Linux/lpr/src/PlateDetection.cpp @@ -11,6 +11,8 @@ namespace pr{ std::vector platesRegions; cv::Size minSize(min_w,min_w/4); cv::Size maxSize(max_w,max_w/4); + if (&processImage == NULL) + return; cascade.detectMultiScale( processImage, platesRegions, 1.1, 3, cv::CASCADE_SCALE_IMAGE,minSize,maxSize); for(auto plate:platesRegions)