Questions tagged [javacpp]

JavaCPP - a bridge between Java and native C++.

JavaCPP provides efficient access to native C++ inside Java, not unlike the way some C/C++ compilers interact with assembly language.

122 questions
10
votes
1 answer

Getting UnsatisfiedLinkError: no jnilept in java.library.path when I create TessBaseAPI

I am new to java cpp and tesseract-ocr. I am stuck with one issue from couple of hours. I am getting UnsatisfiedLinkError: no jnilept in java.library.path when I create TessBaseAPI. Below is the piece of my code. public static void…
Viraj Nalawade
  • 3,137
  • 3
  • 28
  • 44
9
votes
1 answer

How do I map a function call from c++ to Java using JavaCpp?

I have a c++ header file which contains some functions that the c++ code calls. These function should be mapped to corresponding Java functions. So it is a bit like callbacks, but I cannot figure out how to map them in JavaCpp. So for instance we…
hammer
  • 123
  • 5
8
votes
4 answers

java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.javacpp.avutil

I am using Windows10, eclipse-neon with JDK1.8 version, I am getting the following exception. Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.javacpp.avutil at java.lang.Class.forName0(Native…
Sat
  • 3,520
  • 9
  • 39
  • 66
7
votes
1 answer

Dependency missing from classpath

I have project that collects dependencies for an installer (sbt-install4j) using dependencyClasspath. It works most of the time, except when I have one specific dependency: libraryDependencies += "org.bytedeco" % "javacpp" % "0.10" "javacpp" will…
Jarek
  • 1,513
  • 9
  • 16
5
votes
1 answer

Run C++ code in Java Android app using JavaCPP

I a beginner when it comes to development for Android and I am trying to understand JavaCPP. I want to execute a C++ function from Java inside an Android application. In my example I just use a simple TextView widget that prints what I receive from…
Jacob Krieg
  • 2,834
  • 15
  • 68
  • 140
5
votes
0 answers

java.lang.UnsatisfiedLinkError: dlopen failed: library "../../lib/libtbb.so" not found

I compiled face-recognition and was successfully running on an LG Leon (armv7I). When I installed the app on a MyPhone UNO with similar CPU architecture (armv7I), the error below occurs: 06-03 22:09:41.538…
Dhagz
  • 711
  • 5
  • 24
4
votes
0 answers

How to deal with C++ class and std::future in javacpp?

I am using javacpp https://github.com/bytedeco/javacpp for JNI C++ to Java For example, I have a C++ class using std::future class cppDemo { public: Demo(); int testInt(int number) { return number; } std::future
4
votes
1 answer

Where do we get native library .so files for javacv from?

So I'm having a problem with running some javaCV code, and though I've seen numerous fixes online for it, none have worked. The exact error is java.lang.UnsatisfiedLinkError: /tmp/javacpp/libjniopencv_core.so cannot open shared object file: no…
4
votes
1 answer

JavaCv compare 2 histograms

I’m trying to compare two histograms from grayscale images. I’m using the CV_COMP_CHISQR (0.0 perfect match – 1.0 total mismatch). I normalized both histograms to 1. But when I compare the histograms I get result over 40.0 which make no sense. I…
Du_
  • 915
  • 1
  • 9
  • 16
3
votes
3 answers

JavaCPP builds failing on macOS after Xcode 12.2 update due to missing JavaVM framework

I recently updated to Xcode version 12.2 from 12.1. My maven build of a javacpp project began failing at that point on the clang++ step the following command and error: clang++ -I/Users//git/-javacpp/src/main/cpp…
NaderNader
  • 1,038
  • 1
  • 11
  • 16
3
votes
0 answers

Get word level bounding boxes in JavaCpp Tessearact

I am trying to extract the bounding boxes of each word from the javacpp tesseract. This appears to be the bounding box call (my full code below): boolean box = ri.BoundingBox(RIL_WORD, coord1, coord2, coord3, coord4) RIL_WORD is the iterator level…
miltonjbradley
  • 601
  • 2
  • 10
  • 21
3
votes
0 answers

UnsatisfiedLinkError using JavaCV maven dependency in Gradle on Android

I am getting this error when trying to call the start() method of an instance of FFmpegFrameGrabber : java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avutil at java.lang.Class.classForName(Native Method) at…
Michael Garner
  • 1,042
  • 1
  • 10
  • 19
2
votes
1 answer

Exception in compiling code with JavaCPP?

I am trying to run there own example of LegacyLibrary on http://code.google.com/p/javacpp/ when I try to compile code with following command mentioned at site only (basically compiling code with javacpp.jar) I am getting following exception D:\Java…
Dhruv
  • 10,291
  • 18
  • 77
  • 126
2
votes
2 answers

Usage of arpack-ng/openblas/javacpp in the smile java library

I'm trying to set up the Smile machine learning library in Java but I'm having some issues getting some dependencies to work. Currently I am on a Fedora machine, but I'd like this to work on any machine, just like a normal jar. Here is some example…
2
votes
1 answer

Is it possible to define the environment for the javacpp-preset in the pom?

Is it possible to define the target environment for the javacpp-presets (opencv-platform) in the pom.xml file? I know that you're able to set the -Djavacpp.platform property when executing mvn clean install. This will activate the correct maven…
Chr3is
  • 387
  • 5
  • 21
1
2 3
8 9