-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
3,307 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.qt_for_python | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
project(MRZRecognizer VERSION 0.1 LANGUAGES CXX) | ||
|
||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
|
||
set(CMAKE_AUTOUIC ON) | ||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
|
||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
if (CMAKE_HOST_WIN32) | ||
link_directories("${PROJECT_SOURCE_DIR}/platform/windows/lib/") | ||
elseif(CMAKE_HOST_UNIX) | ||
link_directories("${PROJECT_SOURCE_DIR}/platform/linux/") | ||
endif() | ||
include_directories("${PROJECT_SOURCE_DIR}/include/") | ||
|
||
find_package(Qt5 COMPONENTS Widgets REQUIRED) | ||
find_package(Qt5MultimediaWidgets REQUIRED) | ||
|
||
set(PROJECT_SOURCES | ||
main.cpp | ||
mainwindow.cpp | ||
mainwindow.h | ||
mainwindow.ui | ||
myvideosurface.h | ||
myvideosurface.cpp | ||
work.h | ||
work.cpp | ||
mrzinfo.h | ||
mrzinfo.cpp | ||
) | ||
|
||
add_executable(${PROJECT_NAME} ${PROJECT_SOURCES}) | ||
|
||
if (CMAKE_HOST_WIN32) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Widgets Qt5::MultimediaWidgets "DynamsoftLabelRecognizerx64") | ||
elseif(CMAKE_HOST_UNIX) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Widgets Qt5::MultimediaWidgets "DynamsoftLabelRecognizer") | ||
endif() | ||
|
||
# Copy DLLs | ||
if(CMAKE_HOST_WIN32) | ||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory | ||
"${PROJECT_SOURCE_DIR}/platform/windows/bin/" | ||
$<TARGET_FILE_DIR:${PROJECT_NAME}>) | ||
endif() | ||
|
||
# Copy template | ||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory | ||
"${PROJECT_SOURCE_DIR}/template/" | ||
$<TARGET_FILE_DIR:${PROJECT_NAME}>) | ||
|
||
# Copy model files | ||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory | ||
"${PROJECT_SOURCE_DIR}/model" | ||
$<TARGET_FILE_DIR:${PROJECT_NAME}>/model) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Qt Desktop Passport Scanner | ||
A desktop passport scanner app built with [Dynamsoft OCR SDK](https://www.dynamsoft.com/label-recognition/overview/), [Qt](https://www.qt.io/) and a USB web camera. | ||
|
||
## Trial License | ||
Get a [trial license](https://www.dynamsoft.com/customer/license/trialLicense/?product=dcv&package=cross-platform) to activate passport scanning functions. | ||
|
||
![sdk license key](https://www.dynamsoft.com/blog/wp-content/uploads/2021/09/passport-scanner-license-key.png) | ||
|
||
## Download | ||
- Qt | ||
- [Windows](https://www.qt.io/download) | ||
- Linux | ||
|
||
```bash | ||
sudo apt-get install qt5-default qtmultimedia5-dev | ||
``` | ||
|
||
- [Dynamsoft Label Recognizer 2.0 for Windows and Linux](https://www.dynamsoft.com/barcode-reader/downloads/) | ||
|
||
## Build and Run | ||
|
||
![Qt desktop passport scanner](https://www.dynamsoft.com/blog/wp-content/uploads/2021/09/passport-scanner-qt-mrz.png) | ||
|
||
**Windows** | ||
|
||
Add `Qt/5.12.11/mingw73_64/bin` and `Qt/Tools/mingw73_64/bin` to system path. | ||
|
||
Run the following commands: | ||
|
||
```bash | ||
mkdir build | ||
cd build | ||
cmake -G "MinGW Makefiles" .. | ||
cmake --build . | ||
MRZRecognizer.exe | ||
``` | ||
|
||
**Linux** | ||
|
||
```bash | ||
mkdir build | ||
cd build | ||
cmake .. | ||
cmake --build . | ||
./MRZRecognizer | ||
``` | ||
|
||
## Blog | ||
[Building Desktop Passport Scanner with Qt and USB Camera](https://www.dynamsoft.com/codepool/passport-scanner-qt-desktop-camera.html) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.