diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c630a5..7b90deb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,18 +84,12 @@ if(QT_VERSION_MAJOR EQUAL 6) qt_finalize_executable(checks-parser) endif() -# include(FetchContent) -# FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git -# GIT_TAG 3b15fa82ea74739b574d705fea44959b58142eb8) -# FetchContent_MakeAvailable(cpr) -# target_link_libraries(checks-parser PRIVATE cpr::cpr) - - find_package(PkgConfig REQUIRED) -pkg_search_module(opencv REQUIRED IMPORTED_TARGET opencv) -target_link_libraries(checks-parser PRIVATE PkgConfig::opencv) +find_package(OpenCV REQUIRED) + +include_directories("/usr/include/opencv4") + target_link_libraries(checks-parser PRIVATE -ltesseract) target_link_libraries(checks-parser PRIVATE -lcurl) - - +target_link_libraries(checks-parser PRIVATE ${OpenCV_LIBS}) diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user index 76dd4af..bf27976 100644 --- a/CMakeLists.txt.user +++ b/CMakeLists.txt.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -102,13 +102,13 @@ 2 false - -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} --DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake --DCMAKE_GENERATOR:STRING=Ninja --DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} + -DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} -DCMAKE_BUILD_TYPE:STRING=Debug +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} 0 /home/leca/projects/qt/checks-parser/build/Desktop-Debug @@ -159,13 +159,13 @@ 2 false - -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} --DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake --DCMAKE_GENERATOR:STRING=Ninja --DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} + -DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} -DCMAKE_BUILD_TYPE:STRING=Release +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} /home/leca/projects/qt/checks-parser/build/Desktop-Release @@ -213,13 +213,13 @@ 2 false - -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} --DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake --DCMAKE_GENERATOR:STRING=Ninja --DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} + -DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} /home/leca/projects/qt/checks-parser/build/Desktop-RelWithDebInfo @@ -267,13 +267,13 @@ 2 false - -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} --DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake --DCMAKE_GENERATOR:STRING=Ninja --DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} + -DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} 0 /home/leca/projects/qt/checks-parser/build/Desktop-Profile @@ -322,13 +322,13 @@ 2 false - -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} --DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake --DCMAKE_GENERATOR:STRING=Ninja --DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} --DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} + -DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} -DCMAKE_BUILD_TYPE:STRING=MinSizeRel +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} /home/leca/projects/qt/checks-parser/build/Desktop-MinSizeRel diff --git a/TODO b/TODO index 3578955..d4fa7d2 100644 --- a/TODO +++ b/TODO @@ -6,8 +6,14 @@ Complete module "image-to-text": make use of tesseract/opencv (https://learnopencv.com/deep-learning-based-text-recognition-ocr-using-tesseract-and-opencv/); [done] Add features: autodetect store type - auto download of stores modules - auto download of ofd modules - settings, a window for editing settings. + auto download of stores modules [done] + auto download of ofd modules [done] + settings, a window for editing settings. [done] + add ability to control contrast and rotation of a check image before passing it to OCR Refactor: - Get rid of CPR, use libcurl instead + Get rid of CPR, use libcurl instead [done] +Build: + Write script for AppImage deployment + Find out dependencies packet names on different distros + Ensure success of building on most popular distros + Try to compile it on Windows