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
1
vote
0 answers

Failed to execute goal org.bytedeco:javacpp:1.5.3:build (javacpp-cppbuild-compile) on project libnd4j:

I downloaded the repository from https://github.com/eclipse/deeplearning4j. From the directory, I executed mvn clean install. After a while I got this error : Failed to execute goal org.bytedeco:javacpp:1.5.3:build (javacpp-cppbuild-compile) on…
Nitin
  • 31
  • 1
  • 6
1
vote
1 answer

Build jar with binaries for required platform only (javacpp)

I want to build a fat jar for tesseract. With the following build settings I get a jar of about 68 MB with dependencies for all supported platforms: dependencies { implementation group: 'org.bytedeco', name: 'tesseract-platform', version:…
Stef
  • 28,728
  • 2
  • 24
  • 52
1
vote
2 answers

Maven - error cannot find or load main class

I tried to build this example : https://github.com/oltzen/JavaCppExample with Maven (mvn clean install) on Linux. After the successful build, when I run : java de.oltzen.javacppexample.Abc : it says 'could not load or find the main class' The video…
Nitin
  • 31
  • 1
  • 6
1
vote
0 answers

Access struct directly of c++ from java code

I am new to javacpp i know java have not much experience in c++. This might be one of very simple question but i am struggling with this. How to access any variable type value written in header of c++ into java code using javacpp. Let us consider…
1
vote
0 answers

How to get thrust::pair first and second use javacpp

From https://github.com/bytedeco/javacpp/wiki/Interface-Thrust-and-CUDA, I write thrust java code. Struct field is public by default, but I use first() method to get the first field value of thrust::pair, error happen. error: expression preceding…
again
  • 11
  • 2
1
vote
1 answer

UnsatisfiedLinkError when running javacpp presets with LLVM

I'm trying to use javacpp-presets for LLVM, but there appears to be a link time issue: whenever I try to run my program, I get an error "Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniLLVM in java.library.path" I'm on a Windows 10…
1
vote
0 answers

Android Facial recognition using OpenCV in Android

I am trying to develop facial recognition using opencv in android I have successfully integrated opencv with JavaCv and Javacpp I trained data images from sdcard and then recognize with same image but getting '0' confidence each time although I have…
Innocent
  • 703
  • 10
  • 21
1
vote
1 answer

Is Gradle system property in gradle.properies not being used? (javacpp, intellij)

According to the JavaCPP documentation, if we set the system property: javacpp.platform=linux-x86_64 it should not download the other platforms: This is from javacpp: ... This downloads binaries for all platforms, but to get binaries for only one…
lepe
  • 24,677
  • 9
  • 99
  • 108
1
vote
1 answer

OpenCV: minMaxLoc gives no min / max value

I'm trying to follow OpenCV tutorial on image template matching using javacpp-presets. I want to throw away matches with too low score but minMaxLoc seems to not return minVal and maxVal. import org.bytedeco.javacpp.DoublePointer; import…
piotrek
  • 13,982
  • 13
  • 79
  • 165
1
vote
0 answers

Use org.bytedeco.javacpp objects in a JNI context

I'm currently writing a JNI accelerator library to replace Java methods on some systems (Linux x64 and macOS). I have a working code written in Kotlin/Java with JavaCV 3.4.2 I've created a JNI library that do the same job to avoid multiple back and…
Xvolks
  • 2,065
  • 1
  • 21
  • 32
1
vote
0 answers

Reference pointer conversion in javacpp

I'm trying to map the following function in my header file to java using javacpp: bool Foo( const void*& bar, uint32_t& baz ); This generates the following java code: public native @Cast("bool") boolean Foo(, @Cast("uint32_t*") @ByRef IntPointer…
Klugscheißer
  • 1,575
  • 1
  • 11
  • 24
1
vote
2 answers

JavaCpp presets for OpenCV in Android. Example throws UnsatisfiedLinkError

I am trying to run the Android samples of bytedeco but I constantly get a org.bytedeco.javacv.android.recognize.example E/art: dlopen("/data/app/org.bytedeco.javacv.android.recognize.example-2/lib/arm/libjniopencv_core.so", RTLD_LAZY) failed: dlopen…
JAC
  • 287
  • 1
  • 10
1
vote
1 answer

std::map conversion of JavaCPP

I'm a newbie of JavaCPP, right now I've got a problem. my TestLibrary.h: #include #include class TestClass { public: TestClass() { property["a"]="b"; } const…
user1349923
  • 763
  • 1
  • 7
  • 24
1
vote
2 answers

java OutOfMemoryError: memory usage is too high: physicalBytes > maxPhysicalBytes javacpp Pointer deallocator()

I am having this issue: java.lang.OutOfMemoryError: Physical memory usage is too high: physicalBytes = 1G > maxPhysicalBytes = 1G at org.bytedeco.javacpp.Pointer.deallocator(Pointer.java:562) long Pointer.physicalBytes is incrementing even if we…
McLoh
  • 69
  • 7
1
vote
0 answers

How to Play a Video file in javacv / javacpp

Does someone have some example code to play a simple video file with the current javaCPP/javaCV version and the FFmpegFrameGrabber? I tried this solution, but its apparently too old and does not work with the current javacv version because of an…
Floesmaan
  • 13
  • 3
1 2
3
8 9