From 99fbdf42e8a8b88329be06990327874419753047 Mon Sep 17 00:00:00 2001 From: Matthew Hill Date: Wed, 8 Jan 2014 22:09:42 -0700 Subject: [PATCH 1/4] Update README.md --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4f2d1dc..3305cb0 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,9 @@ Where: OpenAlpr Command Line Utility ``` -For example, the following output is created by analyzing the plate image at this URL: http://www.openalpr.com/images/demoscreenshots/plate3.png +For example, the following output is created by analyzing this image: +![Plate Image](http://www.openalpr.com/images/demoscreenshots/plate3.png "Input image") + The library is told that this is a Missouri (MO) license plate which validates the plate letters against a regional template. @@ -101,13 +103,13 @@ After cloning this GitHub repository, you should download and extract Tesseract Update the src/CMakeLists.txt file in the OpenALPR project. Update the following lines to match the directories of your libraries on your system: - * SET(OpenCV_DIR "../libraries/opencv/") - * SET(Tesseract_DIR "/home/mhill/projects/alpr/libraries/tesseract-ocr") + - SET(OpenCV_DIR "../libraries/opencv/") + - SET(Tesseract_DIR "/home/mhill/projects/alpr/libraries/tesseract-ocr") Finally, in the src directory, execute the following commands: - * cmake ./ - * make + - cmake ./ + - make If all went well, there should be an executable named *alpr* along with *libopenalpr.a* that can be linked into your project. From 61a475415499ef6f96e91fc0fbaa2bba89e154f4 Mon Sep 17 00:00:00 2001 From: Matthew Hill Date: Wed, 8 Jan 2014 22:11:11 -0700 Subject: [PATCH 2/4] Update README.md --- README.md | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 3305cb0..47d4f49 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,34 @@ Check out a live online demo here: http://www.openalpr.com/demo.html User Guide ----------- + OpenALPR includes a command line utility. Simply typing "alpr [image file path]" is enough to get started recognizing license plate images. +For example, the following output is created by analyzing this image: +![Plate Image](http://www.openalpr.com/images/demoscreenshots/plate3.png "Input image") + + +The library is told that this is a Missouri (MO) license plate which validates the plate letters against a regional template. + +``` +user@linux:~/openalpr$ alpr ./samplecar.png -t mo -r ~/openalpr/runtime_dir/ + +plate0: top 10 results -- Processing Time = 58.1879ms. + - PE3R2X confidence: 88.9371 template_match: 1 + - PE32X confidence: 78.1385 template_match: 0 + - PE3R2 confidence: 77.5444 template_match: 0 + - PE3R2Y confidence: 76.1448 template_match: 1 + - P63R2X confidence: 72.9016 template_match: 0 + - FE3R2X confidence: 72.1147 template_match: 1 + - PE32 confidence: 66.7458 template_match: 0 + - PE32Y confidence: 65.3462 template_match: 0 + - P632X confidence: 62.1031 template_match: 0 + - P63R2 confidence: 61.5089 template_match: 0 + +``` + +Detailed command line usage: + ``` user@linux:~/openalpr$ alpr --help @@ -66,28 +92,6 @@ Where: OpenAlpr Command Line Utility ``` -For example, the following output is created by analyzing this image: -![Plate Image](http://www.openalpr.com/images/demoscreenshots/plate3.png "Input image") - - -The library is told that this is a Missouri (MO) license plate which validates the plate letters against a regional template. - -``` -user@linux:~/openalpr$ alpr ./samplecar.png -t mo -r ~/openalpr/runtime_dir/ - -plate0: top 10 results -- Processing Time = 58.1879ms. - - PE3R2X confidence: 88.9371 template_match: 1 - - PE32X confidence: 78.1385 template_match: 0 - - PE3R2 confidence: 77.5444 template_match: 0 - - PE3R2Y confidence: 76.1448 template_match: 1 - - P63R2X confidence: 72.9016 template_match: 0 - - FE3R2X confidence: 72.1147 template_match: 1 - - PE32 confidence: 66.7458 template_match: 0 - - PE32Y confidence: 65.3462 template_match: 0 - - P632X confidence: 62.1031 template_match: 0 - - P63R2 confidence: 61.5089 template_match: 0 - -``` Compiling ----------- From 54fba1907851fc2871a18b3a2d09bcd6549b9a17 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Tue, 14 Jan 2014 19:47:10 -0700 Subject: [PATCH 3/4] Tweaked CMakeLists for Windows support --- src/CMakeLists.txt | 47 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 06628d5..36cc41d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,14 +7,16 @@ IF (WIN32) add_definitions( -DWINDOWS) add_definitions( -DNOMINMAX) - SET(OpenCV_DIR "C:\\projects\\alpr\\libraries\\opencv") - SET(Tesseract_DIR "C:\\projects\\alpr\\libraries\\tesseract-3.02") + SET(OpenCV_DIR "C:\\projects\\openalpr\\libraries\\opencv") + SET(Tesseract_DIR "C:\\projects\\openalpr\\libraries\\tesseract-ocr") include_directories( - ${Tesseract_DIR}/include/tesseract - + ${Tesseract_DIR}/api + ${Tesseract_DIR}/ccutil/ + ${Tesseract_DIR}/ccstruct/ + ${Tesseract_DIR}/ccmain/ ) - link_directories( ${Tesseract_DIR}/lib/ ) + link_directories( ${Tesseract_DIR}/vs2008/LIB_Release/ ) ELSE() SET(OpenCV_DIR "../libraries/opencv/") @@ -43,13 +45,34 @@ include_directories(./openalpr ) set(CMAKE_CSS_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall ") ADD_EXECUTABLE( alpr main.cpp ) -TARGET_LINK_LIBRARIES(alpr - openalpr - support - ${OpenCV_LIBS} - tesseract - ) - + + +IF (WIN32) + # Extra linker dependencies for Windows + TARGET_LINK_LIBRARIES(alpr + openalpr + support + ${OpenCV_LIBS} + libtesseract302-static + liblept168 + liblept168-static-mtdll + libpng143-static-mtdll + libjpeg8c-static-mtdll + giflib416-static-mtdll + libtiff394-static-mtdll + zlib125-static-mtdll + ws2_32.lib + ) + +ELSE() + + TARGET_LINK_LIBRARIES(alpr + openalpr + support + ${OpenCV_LIBS} + tesseract + ) +ENDIF() add_subdirectory(openalpr) add_subdirectory(misc_utilities) From 5853a41a3efa3a99fd9d9a32d4ebe18522a4ed48 Mon Sep 17 00:00:00 2001 From: Matthew Hill Date: Tue, 14 Jan 2014 19:49:42 -0700 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 47d4f49..8f454da 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Where: Compiling ----------- -OpenALPR has been compiled successfully on Linux, however other operating systems should also work. +OpenALPR compiles and runs on Linux, Mac OSX and Windows. OpenALPR requires the following additional libraries: