javacv

Proguard removing annotations in Android application

Deadly 提交于 2019-12-08 15:00:19
问题 I have included a project using gradle in my app: compile group: 'org.bytedeco', name: 'javacv', version: '0.11' Which builds fine. But whenever I run the app with proguard enabled, it apparently removes the @Platform annotation from the jars that get included then. I tried using the following based on http://proguard.sourceforge.net/manual/examples.html#annotations -keepattributes *Annotation* -keep @org.bytedeco.javacpp.annotation interface * { *; } I also tried the following based on http:

JavaCV in Android

限于喜欢 提交于 2019-12-08 11:37:47
问题 I downloaded JavaCV-1-3-1. Now I have 2 questions: How can I import JavaCV to Android Studio for using? Can be used from FFMPEG commands with JavaCV? 回答1: To import java cv add this to gradle dependencies { compile 'org.bytedeco:javacv:+' compile 'org.bytedeco.javacpp-presets:opencv:3.0.0-1.1:android-x86' compile 'org.bytedeco.javacpp-presets:ffmpeg:2.8.1-1.1:android-x86' compile 'org.bytedeco.javacpp-presets:opencv:3.0.0-1.1:android-arm' compile 'org.bytedeco.javacpp-presets:ffmpeg:2.8.1-1.1

Android JavaCV create IplImage from Camera to use with ColorHistogram

跟風遠走 提交于 2019-12-08 03:57:39
问题 I am using JavaCV in Android. In my code, I have created a ImageComparator(class of OpenCV CookBook http://code.google.com/p/javacv/source/browse/OpenCV2_Cookbook/src/opencv2_cookbook/chapter04/ImageComparator.scala?repo=examples http://code.google.com/p/javacv/wiki/OpenCV2_Cookbook_Examples_Chapter_4) Object and use that object to compare images. If I use file from SD card the comparator is working. File referenceImageFile = new File(absPath1); // Read an image. IplImage reference = Util

Android Studio with javaCv and FFMPEG

不羁岁月 提交于 2019-12-08 03:17:03
问题 So I am using the new Android Studio and I am trying to get JavaCV installed in the most basic setup. I made a brand new project with nothing in it, imported (I think unsuccessfully) the JavaCV library and then I am running one of the samples given in the JavaCV repo and I am getting the following error. Process: com.example.calvintmoss.dejavid, PID: 1187 java.lang.UnsatisfiedLinkError: Couldn't load jniopencv_core from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com

OCR with javacv

徘徊边缘 提交于 2019-12-07 15:46:24
问题 I am making an OCR for my project and stuck on a point, Right now i am performing segmentation on the basis of contours its working fine with few images but there few more where it fails even when the image quality is good, I would appreciate if someone suggest me more accurate way, and if someone provide a code example, here is my current code. public static void imageBinarization(IplImage src, IplImage dst){ IplImage r, g, b, s; r = cvCreateImage(cvGetSize(src), IPL_DEPTH_8U, 1); g =

FFMpeg add text to actual video file after recording in Android

我怕爱的太早我们不能终老 提交于 2019-12-07 12:53:55
问题 Am recording a video in Android device using JavaCV and playing it using a videoview. Now want to show a text on video while playing, which is entered after recording video. This text must be seen in all video players while playing the video. I have gone thro the link How to add text on video recording? too which is expected here too This is the method called after the video is recorded. private void playRecordedVideo(Uri videoUri, boolean playVideoInLoop) { RelativeLayout.LayoutParams

can't find dependent library javacv

岁酱吖の 提交于 2019-12-07 11:40:29
问题 I have this code: package javacv; import static com.googlecode.javacv.cpp.opencv_core.*; import static com.googlecode.javacv.cpp.opencv_imgproc.*; import static com.googlecode.javacv.cpp.opencv_highgui.*; import javax.swing.JOptionPane; /** * * @author (Mahdi) */ public class JavaCv { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here try { IplImage img = cvLoadImage("mehdi.jpg"); cvShowImage("Hellow", img); cvSmooth

UnsatisfiedLinkError for libopencv_core.so while .apk holds this library

别等时光非礼了梦想. 提交于 2019-12-06 13:43:08
问题 I want to use JavaCv with my App on Android. Therefore I followed the advice here: https://github.com/bytedeco/javacv on how to install Android 2.2 or newer. As a result the following libraries can be found under \libs\armeabi : libjniopencv_core.so libopencv_core.so All classes of both libraries are also present in the classes.dex file of my .apk. And still i get the following exception: java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load

Android JavaCV create IplImage from Camera to use with ColorHistogram

天大地大妈咪最大 提交于 2019-12-06 11:51:35
I am using JavaCV in Android. In my code, I have created a ImageComparator(class of OpenCV CookBook http://code.google.com/p/javacv/source/browse/OpenCV2_Cookbook/src/opencv2_cookbook/chapter04/ImageComparator.scala?repo=examples http://code.google.com/p/javacv/wiki/OpenCV2_Cookbook_Examples_Chapter_4 ) Object and use that object to compare images. If I use file from SD card the comparator is working. File referenceImageFile = new File(absPath1); // Read an image. IplImage reference = Util.loadOrExit(referenceImageFile,CV_LOAD_IMAGE_COLOR); comparator = new ImageComparator(reference);

JavaCV Perspective Correction

人走茶凉 提交于 2019-12-06 09:15:45
I converted the perspective correction code implemented using OpenCV and C++ at: https://opencv-code.com/tutorials/automatic-perspective-correction-for-quadrilateral-objects/ to obtain the following OpenCV code implemented in Java: public class project { static Point2f center; public static void main(String args[]) { System.loadLibrary(Core.NATIVE_LIBRARY_NAME); center = new Point2f(0,0); Mat src = new Mat(); src = Highgui.imread("image.jpg"); if(src == null) { System.out.println("Image not loaded"); System.exit(1); } Mat bw = new Mat(); Imgproc.cvtColor(src, bw, Imgproc.COLOR_BGR2GRAY);