mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-09 12:40:09 +08:00
Added support for OpenCL GPU acceleration
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "detectorfactory.h"
|
||||
#include "detectormorph.h"
|
||||
#include "detectorocl.h"
|
||||
|
||||
namespace alpr
|
||||
{
|
||||
@@ -21,6 +22,15 @@ namespace alpr
|
||||
return new DetectorCPU(config);
|
||||
#endif
|
||||
}
|
||||
else if (config->detector == DETECTOR_LBP_OPENCL)
|
||||
{
|
||||
#if OPENCV_MAJOR_VERSION == 3
|
||||
return new DetectorOCL(config);
|
||||
#else
|
||||
std::cerr << "Error: OpenCL acceleration requires OpenCV 3.0. " << std::endl;
|
||||
return new DetectorCPU(config);
|
||||
#endif
|
||||
}
|
||||
else if (config->detector == DETECTOR_MORPH_CPU)
|
||||
{
|
||||
return new DetectorMorph(config);
|
||||
|
Reference in New Issue
Block a user