A C/C++ sample of Passport MRZ recognition implemented with Dynamsoft OCR SDK.
-
Configuration for CMake:
# Find OpenCV, you may need to set OpenCV_DIR variable # to the absolute path to the directory containing OpenCVConfig.cmake file # via the command line or GUI find_package(OpenCV REQUIRED)
Get a free trial license and save it to license.txt
.
-
Copy
*.lib
files toplatform/windows/lib
folder and copy*.dll
files toplatform/windows/bin
folder. -
Create a build folder:
mkdir build cd build
-
Configure the project.
-
Command-line app
cmake -DCMAKE_GENERATOR_PLATFORM=x64 ..
-
GUI App with OpenCV
cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DENABLE_OPENCV=TRUE ..
-
-
Build and run the app:
cmake --build . --config release cd release mrz license.txt
-
Install CMake:
sudo apt-get install cmake
-
Copy
*.so
files toplatform/linux
folder. -
Create a build folder:
mkdir build cd build
-
Configure the project.
-
Command-line app
cmake ..
-
GUI App with OpenCV
cmake -DENABLE_OPENCV=TRUE ..
-
-
Build and run the app:
cmake --build . --config release ./mrz license.txt