diff --git a/src/openalpr/detection/detectorcuda.cpp b/src/openalpr/detection/detectorcuda.cpp index 5ba1c94..1818e1c 100644 --- a/src/openalpr/detection/detectorcuda.cpp +++ b/src/openalpr/detection/detectorcuda.cpp @@ -34,7 +34,8 @@ namespace alpr #if OPENCV_MAJOR_VERSION == 2 if( this->cuda_cascade.load( get_detector_file() ) ) #else - if( this->cuda_cascade->create( get_detector_file() ) ) + cuda_cascade = cuda::CascadeClassifier::create(get_detector_file()); + if( !this->cuda_cascade.get()->empty() ) #endif { this->loaded = true;