Giter VIP home page Giter VIP logo

Comments (1)

lingxuxiong avatar lingxuxiong commented on July 21, 2024

The latest example code requires exactly OpenCV version 3.0.0 installed, if not, compiling will most probably end up with CMake errors similar to what follows:

  Could not find a configuration file for package "OpenCV" that is compatible
  with requested version "3.0.0".

  The following configuration files were considered but not accepted:

    /Users/nling/opencv/installation/OpenCV-master-debug/lib/cmake/opencv4/OpenCVConfig.cmake, version: 4.5.2

it means, the installed version is not matched with the required one. to fix this, you need to remove the specific OpenCV version or change it to the same version as installed on the dev machine.

# ./example/CMakeLists.txt
find_package(OpenCV REQUIRED COMPONENTS core imgcodecs imgproc highgui)

or

find_package(OpenCV 4.5.2 REQUIRED COMPONENTS core imgcodecs imgproc highgui)

Btw, if libomp is not installed on MacOS, OpenMP related error will arise,

(base) ➜  build git:(master) ✗ cmake ..
-- CMAKE_INSTALL_PREFIX = /usr/local
-- Found OpenCV: /Users/nling/opencv/installation/OpenCV-master-debug (found version "4.5.2") found components: core imgcodecs imgproc highgui
CMake Error at /usr/local/lib/python3.9/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
  Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)

ran brew install libomp fixed it, see MacOS, CMake and OpenMP for more details.

from mobile-lpr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.