diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..ac98151 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required(VERSION 2.6) + +project (EasyPR) + +list(APPEND CMAKE_CXX_FLAGS "-std=c++0x") + +find_package(OpenCV REQUIRED) + +aux_source_directory(./src SOURCE_FILES) + +set(SOURCE_FILES + src/main.cpp + src/core/chars_identify.cpp + src/core/chars_recognise.cpp + src/core/chars_segment.cpp + src/core/features.cpp + src/core/plate_detect.cpp + src/core/plate_judge.cpp + src/core/plate_locate.cpp + src/core/plate_recognize.cpp + src/test/accuracy_test.cpp + src/test/test.cpp + src/train/ann_train.cpp + src/train/svm_train.cpp + src/util/deface.cpp + src/util/general_test_prepare.cpp + src/util/generate_gdts.cpp + src/util/learn_prepare.cpp + src/util/mc_data_prepare.cpp + src/util/util.cpp +) + +add_executable(EasyPR ${SOURCE_FILES}) +target_link_libraries(EasyPR ${OpenCV_LIBS}) \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index c2fd715..805d25a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -241,4 +241,4 @@ int svmMain() } // SVM ѵÁ·ÃüÁîÐÐ -//////////////////////////////////////////////////////////// \ No newline at end of file +//////////////////////////////////////////////////////////// diff --git a/src/test/test.cpp b/src/test/test.cpp index c50cc4b..ec9fcb0 100644 --- a/src/test/test.cpp +++ b/src/test/test.cpp @@ -132,6 +132,7 @@ int test_plate_locate() imshow("plate_locate", resultMat); waitKey(0); } + destroyWindow("plate_locate"); } return result; @@ -168,6 +169,7 @@ int test_plate_judge() imshow("plate_judge", resultMat); waitKey(0); } + destroyWindow("plate_judge"); } CPlateJudge ju; @@ -186,6 +188,7 @@ int test_plate_judge() imshow("plate_judge", resultMat); waitKey(0); } + destroyWindow("plate_judge"); } return resultJu; @@ -210,6 +213,7 @@ int test_chars_segment() imshow("chars_segment", resultMat); waitKey(0); } + destroyWindow("chars_segment"); } return result; @@ -257,10 +261,6 @@ int test_chars_identify() } cout << "Identify Correct!" << endl; - cout << "Enter 1 for coninue:"; - int a = 0; - cin >> a; - return result; } @@ -286,6 +286,7 @@ int test_plate_detect() imshow("plate_detect", resultMat); waitKey(0); } + destroyWindow("plate_detect"); } return result; @@ -307,10 +308,6 @@ int test_chars_recognise() cout << "charsRecognise: " << charsRecognise << endl; } - cout << "Enter 1 for coninue:"; - int a = 0; - cin >> a; - return result; } @@ -343,9 +340,5 @@ int test_plate_recognize() if (result != 0) cout << "result:" << result << endl; - cout << "Enter 1 for coninue:"; - int a = 0; - cin >> a; - return result; }