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
2
votes
1 answer

JavaCPP - how to actually generate the C++ JNI wrappers?

I'm trying to use JavaCPP to create java bindings for some C++ library. The process has 2 aspects A linux shared library (.so) needs to be built, containing the native entry points (JNIEXPORT). It so happens my library is header-only so I just pass…
haelix
  • 4,245
  • 4
  • 34
  • 56
2
votes
0 answers

Tesseract False Space Recognition (JavaCPP-Presets)

I am working on a program to extract Chinese hard-coded subtitles from videos. The final step of my program uses the JavaCPP Presets for Tesseract library for OCR. TessBaseAPI api = new TessBaseAPI(); // Initialize tesseract-ocr with Simplified…
Alexander Jank
  • 2,440
  • 2
  • 18
  • 19
2
votes
1 answer

JavaCV FFmpegFrameRecorder save images to video

I am a bit confused about the use of JavaCV FFmpegFrameRecorder. I have several byte[] or short[] arrays (depending if my images are 8 or 16 bit) were I have the data related for several images. Now, my idea is to use JavaCPP to send each image to…
Learning from masters
  • 2,032
  • 3
  • 29
  • 42
2
votes
1 answer

unexpected token `LEPTONICA,' PKG_CHECK_MODULES(LEPTONICA

I'm using the JavaCPP Presets project to build Leptonica and Tesseract. I have managed to build Leptonica 1.7 using the following commands: cd leptonica ./cppbuild.sh install leptonica cd cppbuild/linux-x86_64/leptonica-1.72/ ./configure make &&…
Sergio Sánchez Sánchez
  • 1,694
  • 3
  • 28
  • 48
2
votes
1 answer

Using OpenCV GPU module in JAVA

I am using the wrapped version of the OpenCV image processing library for java (opencv java api by OpenCv) in order to detect cars' plates at the real time. Where in order to do so, I must gain the maximum possible processing speed for better…
HMaster
  • 49
  • 9
2
votes
2 answers

JavaCPP ValueGetter vs MemberGetter

What is the difference between @MemberGetter and @ValueGetter annotations in JavaCPP? What are the use cases for them? I have C header file with two constants static const int TRANSPOSE = 0; static const int NO_TRANSPOSE = 1; What is the prefferred…
tworec
  • 4,409
  • 2
  • 29
  • 34
2
votes
1 answer

Tensorflow: How to compile libtensorflow_cc.so for Android

I'm currently trying to compile the target //tensorflow:libtensorflow_cc.so of TensorFlow with bazel for Android. I need this library in order to get the javacpp-presets for TensorFlow working with Android. I tried the following statement: bazel…
andy
  • 1,852
  • 2
  • 20
  • 31
2
votes
1 answer

Segmentation faults in JNA/BridJ etc

I've rebuilt my Java/C++ project several times using JNI, JNA, BridJ, and JavaCPP, and every time I encounter random (unpredictable) segmentation faults. I have verified that a pure-C++ executable using this library never causes segmentation faults,…
Jim Pivarski
  • 5,568
  • 2
  • 35
  • 47
2
votes
1 answer

JavaCPP, UnsatisfiedLinkError when native library is archived in JAR

I'm trying to call Haskell code from Java, using JavaCPP to help create the necessary JNI binding, as already discussed in this question. This is how I'm using it: /javacpp.jar /build (destination of libraris) /src (contains…
cornuz
  • 2,678
  • 18
  • 35
2
votes
1 answer

JavaCpp: How to Specify the Native Library?

Where does JavaCpp look for the native library libmynativelib.so when it creates the jni library, /linux-x86_64/libjnimynativelib.so? JavaCpp is told about the C++ header and shared library using the @Platform annotation like…
Brent Faust
  • 9,103
  • 6
  • 53
  • 57
2
votes
0 answers

How to stream video from android over rtsp

I want to build an efficient streaming application for android. I came across at Java CV and Java CPP, which includes a wrapper for ffmpeg. I followed this piece of code and everthing works fine, using Wowza Streaming Server:…
Robin
  • 709
  • 2
  • 8
  • 20
2
votes
1 answer

JavaCV passing Java arrays to functions with @StdVector

I'm trying to call JavaCV's groupRectangles function. Here is the method signature @Namespace("cv") public static native void groupRectangles(@StdVector("CvRect,cv::Rect") CvRect rectList, @StdVector IntPointer weights, int groupThreshold,…
Jon
  • 3,985
  • 7
  • 48
  • 80
2
votes
2 answers

UnsatisfiedLinkException when running JavaCpp example (LegacyLibrary)

I'm trying to build and run the LegacyLibrary Example of JavaCpp with Visual Studio 2008 on Windows XP Professional (x86) using JDK 1.7.0 and JavaCpp 0.3 (bin), and I get the following output. The error is on the last command, java -cp javacpp.jar…
StockB
  • 755
  • 1
  • 13
  • 33
1
vote
1 answer

Maven Build for specific OS and Architecture | abiFilters equivalent for maven

Maven is generating a JAR that is too big (~1.1GB) for a simple 20 line function, possibly because it includes dependences that are not necessary for my run-time environments (macosx-x86_64 and linux-arm64). How do I generate a JAR using maven for…
kesari
  • 536
  • 1
  • 6
  • 16
1
vote
0 answers

ProGuard with JavaCPP - Loader warnings

I've built a fat jar of the tesseract basic example of 7.9 MB (see also this SO question). Now I want to shrink its size using ProGuard. Using this standard gradle task with the addition of keep 'class org.bytedeco.javacpp.** {*;}' and dontwarn…
Stef
  • 28,728
  • 2
  • 24
  • 52
1
2
3
8 9