PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
42.82k stars 7.7k forks source link

CMake Error at CMakeLists.txt:47 (find_package): Could not find a package configuration file provided by "OpenCV" #3009

Closed ymzx closed 3 years ago

ymzx commented 3 years ago

-- The CXX compiler identification is GNU 4.8.5 -- The C compiler identification is GNU 4.8.5 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ - works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done CMake Error at CMakeLists.txt:47 (find_package): Could not find a package configuration file provided by "OpenCV" with any of the following names:

OpenCVConfig.cmake
opencv-config.cmake

Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set "OpenCV_DIR" to a directory containing one of the above files. If "OpenCV" provides a separate development package or SDK, be sure it has been installed.

CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.17)

should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred! See also "/home/ocr/paddle_infer_cpp/PaddleOCR-release-2.0-c++/deploy/cpp_infer/build/CMakeFiles/CMakeOutput.log". make: *** No targets specified and no makefile found. Stop. 请问以上可能是什么原因? centos系统 paddle 2.1

LDOUBLEV commented 3 years ago

编译的时候有没有正确指定opencv的package路径,这里需要设置编译好的opencv

image

ymzx commented 3 years ago

编译的时候有没有正确指定opencv的package路径,这里需要设置编译好的opencv

image

有的,严格按照贵司提供的文档操作的,CMakeLists.txt中 image 这个路径下并没有.cmake文件 centos 平台, opencv==4.2,paddle代码最新的版本2.1

yangy996 commented 2 years ago

编译的时候有没有正确指定opencv的package路径,这里需要设置编译好的opencv

image windows下编译也报这个错,不知道哪配置的不对 image