Using JavaCV with Kotlin

前端 未结 3 1321
感情败类
感情败类 2021-01-23 11:06

I\'m currently attempting to start a project using JavaCV in Kotlin. I\'m using IntelliJ Idea as my IDE. I\'m using JavaCV 1.3.2 and OpenCV 3.20. This is my setup for the modul

3条回答
  •  耶瑟儿~
    2021-01-23 12:04

    Handling this error is no different in Kotlin from Java; you need to specify the path to the native libraries for opencv. By default on Windows it will look for the native libraries in whatever is set in your PATH environment variable.

    You can also explicitly specify which directory to look for the native libraries by specifying the system property java.library.path (as indicated by the error message).

    For example, you can add a run configuration like this:

    Where ${PATH_TO_DYNAMIC_LIB} would be where ever the native lib opencv_imgproc320.dll is - I think in your case it would be C:/Users/ms/IdeaProjects/CVTest/opencv/build/java/x64.

提交回复
热议问题