Skip to content
This repository was archived by the owner on Feb 21, 2021. It is now read-only.
This repository was archived by the owner on Feb 21, 2021. It is now read-only.

InvocationTargetException thrown in defining the VideoCapture Object #13

Open

Description

@amarlearning

InvocationTargetException is thrown in creating an instance of VideoCapture class.

Operating System: Ubuntu 16.04
JDK Version : JDK 1.8.152

screenshot from 2018-03-11 13-26-30

screenshot from 2018-03-11 13-27-00

Activity

  1. self-assigned this
    on Mar 11, 2018
  2. luigidr commented on Mar 11, 2018

    @luigidr
    Member

    It seems that the problem is in the linking between the Java method and the underlying C++ function.

    Which IDE are you using? Do you properly set up the location of the native library for the OpenCV jar?
    e.g., http://opencv-java-tutorials.readthedocs.io/en/latest/01-installing-opencv-for-java.html#set-up-opencv-for-java-in-eclipse?

  3. amarlearning commented on Mar 11, 2018

    @amarlearning
    Author

    Did you used the pre-compiled version of OpenCV in Ubuntu?

    @luigidr I downloaded the 3.4.1 source folder of OpenCV from here and then installed it using CMake and Apache Ant.

    Which IDE are you using?

    I am using Eclipse Oxygen.2 Release (4.7.2).

    Do you properly set up the location of the native library for the OpenCV jar?

    Native library for the OpenCV jar path : /opencv-3.4.1/builds/lib. I think its correct because this (http://opencv-java-tutorials.readthedocs.io/en/latest/02-first-java-application-with-opencv.html#create-a-simple-application) is running fine. I think the native library path for OpenCV jar is correct.

  4. luigidr commented on Mar 11, 2018

    @luigidr
    Member

    Thanks, @amarlearning. I just tried the program with the same OpenCV version and IDE on macOS and Windows and it works without any problem.

    Are you using the OpenJDK? Does this program work: https://github.com/opencv-java/fourier-transform?
    It doesn't use VideoCapture but it's made with JavaFX: I would like to exclude any problem with your environment (JDK, JavaFX, ...) before trying this program in Ubuntu.

  5. amarlearning commented on Mar 11, 2018

    @amarlearning
    Author

    Are you using the OpenJDK?

    I am using the Oracle version.

    Does this program work: https://github.com/opencv-java/fourier-transform?

    I will try to run this program and will respond back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions