HanjieLuo / Image-Enhancement-for-SLAM

Image Enhancement for SLAM
GNU General Public License v2.0
46 stars 14 forks source link

error in cmake (Could not find a package configuration file provided by "OpenCV" ) #1

Open nisel opened 3 years ago

nisel commented 3 years ago

error: image CMake Error at src/image_enhance/CMakeLists.txt:3 (find_package): By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "OpenCV", but CMake did not find one.

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.

Sorry I have an error in the process of cmaking. The error is above. Could someone solve my problem?

HanjieLuo commented 3 years ago

Dear Nisel,

The algorithm requires OpenCV 3.4 library, you should install one firstly.

Or, you can set `OpenCV_INCLUDE_DIRS`, `OpenCV_LIBS`, `OpenCV_LIBRARY_DIRS` manually within the CMakeLists.txt file.

```
    set(OpenCV_INCLUDE_DIRS path_to_the_opencv_head)
    set(OpenCV_LIBS path_to_opencv_lib_file)
    set(OpenCV_LIBRARY_DIRS path_to_opencv_lib)
    ```

Best, Hanjie

在 2021年4月20日,下午5:09,nisel @.***> 写道:

error: https://user-images.githubusercontent.com/49194139/115369568-d5745900-a1fa-11eb-851e-ea4a0e226b19.png CMake Error at src/image_enhance/CMakeLists.txt:3 (find_package): By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "OpenCV", but CMake did not find one.

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.

Sorry I have an error in the process of cmaking. The error is above. Could someone solve my problem?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/HanjieLuo/Image-Enhancement-for-SLAM/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEBBWPDRG6HJA4HROOJM66LTJVADVANCNFSM43HXPK7Q.

nisel commented 3 years ago

Dear Nisel, The algorithm requires OpenCV 3.4 library, you should install one firstly. Or, you can set OpenCV_INCLUDE_DIRS, OpenCV_LIBS, OpenCV_LIBRARY_DIRS manually within the CMakeLists.txt file. set(OpenCV_INCLUDE_DIRS path_to_the_opencv_head) set(OpenCV_LIBS path_to_opencv_lib_file) set(OpenCV_LIBRARY_DIRS path_to_opencv_lib) Best, Hanjie 在 2021年4月20日,下午5:09,nisel @.***> 写道: error: https://user-images.githubusercontent.com/49194139/115369568-d5745900-a1fa-11eb-851e-ea4a0e226b19.png CMake Error at src/image_enhance/CMakeLists.txt:3 (find_package): By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "OpenCV", but CMake did not find one. 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. Sorry I have an error in the process of cmaking. The error is above. Could someone solve my problem? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEBBWPDRG6HJA4HROOJM66LTJVADVANCNFSM43HXPK7Q.

Sorry to bother you again! I have solved the problem by write path in CMakeList.txt. image I downloaded OpenCV3.4.1 , like this. image then I modified the CMakeList.txt in image_enhance. At last , I got an error like this. I have googled ,but I couldn't find the right answer. image