diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a4253f..ea0f96a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8) project (EasyPR) -list(APPEND CMAKE_CXX_FLAGS "-std=c++0x") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") find_package(OpenCV REQUIRED) diff --git a/src/core/plate_locate.cpp b/src/core/plate_locate.cpp index ddd8602..3bf12be 100644 --- a/src/core/plate_locate.cpp +++ b/src/core/plate_locate.cpp @@ -1583,8 +1583,9 @@ int CPlateLocate::plateLocate(Mat src, vector& resultVec, int index) //large the rect for more if (!verifySizes(mr)) { - cv::Mat& roi = dst_blue(safeBoundRect); + cv::Mat roi = dst_blue(safeBoundRect); roi.setTo(0); + cv::swap(roi, dst_blue); } else { @@ -1637,8 +1638,9 @@ int CPlateLocate::plateLocate(Mat src, vector& resultVec, int index) //large the rect for more if (!verifySizes(mr)) { - cv::Mat& roi = dst_yellow(safeBoundRect); + cv::Mat roi = dst_yellow(safeBoundRect); roi.setTo(0); + cv::swap(roi, dst_yellow); } else {