Giter Site home page Giter Site logo

javacv's Introduction

JavaCV

Gitter Maven Central Sonatype Nexus (Snapshots) Build Status Commercial support: xscode

Introduction

JavaCV uses wrappers from the JavaCPP Presets of commonly used libraries by researchers in the field of computer vision (OpenCV, FFmpeg, libdc1394, FlyCapture, Spinnaker, OpenKinect, librealsense, CL PS3 Eye Driver, videoInput, ARToolKitPlus, flandmark, Leptonica, and Tesseract) and provides utility classes to make their functionality easier to use on the Java platform, including Android.

JavaCV also comes with hardware accelerated full-screen image display (CanvasFrame and GLCanvasFrame), easy-to-use methods to execute code in parallel on multiple cores (Parallel), user-friendly geometric and color calibration of cameras and projectors (GeometricCalibrator, ProCamGeometricCalibrator, ProCamColorCalibrator), detection and matching of feature points (ObjectFinder), a set of classes that implement direct image alignment of projector-camera systems (mainly GNImageAligner, ProjectiveTransformer, ProjectiveColorTransformer, ProCamTransformer, and ReflectanceInitializer), a blob analysis package (Blobs), as well as miscellaneous functionality in the JavaCV class. Some of these classes also have an OpenCL and OpenGL counterpart, their names ending with CL or starting with GL, i.e.: JavaCVCL, GLCanvasFrame, etc.

To learn how to use the API, since documentation currently lacks, please refer to the Sample Usage section below as well as the sample programs, including two for Android (FacePreview.java and RecordActivity.java), also found in the samples directory. You may also find it useful to refer to the source code of ProCamCalib and ProCamTracker as well as examples ported from OpenCV2 Cookbook and the associated wiki pages.

Please keep me informed of any updates or fixes you make to the code so that I may integrate them into the next release. Thank you! And feel free to ask questions on the mailing list or the discussion forum if you encounter any problems with the software! I am sure it is far from perfect...

Downloads

Archives containing JAR files are available as releases. The binary archive contains builds for Android, iOS, Linux, Mac OS X, and Windows. The JAR files for specific child modules or platforms can also be obtained individually from the Maven Central Repository.

To install manually the JAR files, follow the instructions in the Manual Installation section below.

We can also have everything downloaded and installed automatically with:

  • Maven (inside the pom.xml file)
  <dependency>
    <groupId>org.bytedeco</groupId>
    <artifactId>javacv-platform</artifactId>
    <version>1.5.10</version>
  </dependency>
  • Gradle (inside the build.gradle.kts or build.gradle file)
  dependencies {
    implementation("org.bytedeco:javacv-platform:1.5.10")
  }
  • Leiningen (inside the project.clj file)
  :dependencies [
    [org.bytedeco/javacv-platform "1.5.10"]
  ]
  • sbt (inside the build.sbt file)
  libraryDependencies += "org.bytedeco" % "javacv-platform" % "1.5.10"

This downloads binaries for all platforms, but to get binaries for only one platform we can set the javacpp.platform system property (via the -D command line option) to something like android-arm, linux-x86_64, macosx-x86_64, windows-x86_64, etc. Please refer to the README.md file of the JavaCPP Presets for details. Another option available to Gradle users is Gradle JavaCPP, and similarly for Scala users there is SBT-JavaCV.

Required Software

To use JavaCV, you will first need to download and install the following software:

Further, although not always required, some functionality of JavaCV also relies on:

Finally, please make sure everything has the same bitness: 32-bit and 64-bit modules do not mix under any circumstances.

Manual Installation

Simply put all the desired JAR files (opencv*.jar, ffmpeg*.jar, etc.), in addition to javacpp.jar and javacv.jar, somewhere in your class path. Here are some more specific instructions for common cases:

NetBeans (Java SE 7 or newer):

  1. In the Projects window, right-click the Libraries node of your project, and select "Add JAR/Folder...".
  2. Locate the JAR files, select them, and click OK.

Eclipse (Java SE 7 or newer):

  1. Navigate to Project > Properties > Java Build Path > Libraries and click "Add External JARs...".
  2. Locate the JAR files, select them, and click OK.

Visual Studio Code (Java SE 7 or newer):

  1. Navigate to Java Projects > Referenced Libraries, and click +.
  2. Locate the JAR files, select them, and click OK.

IntelliJ IDEA (Android 7.0 or newer):

  1. Follow the instructions on this page: http://developer.android.com/training/basics/firstapp/
  2. Copy all the JAR files into the app/libs subdirectory.
  3. Navigate to File > Project Structure > app > Dependencies, click +, and select "2 File dependency".
  4. Select all the JAR files from the libs subdirectory.

After that, the wrapper classes for OpenCV and FFmpeg, for example, can automatically access all of their C/C++ APIs:

Sample Usage

The class definitions are basically ports to Java of the original header files in C/C++, and I deliberately decided to keep as much of the original syntax as possible. For example, here is a method that tries to load an image file, smooth it, and save it back to disk:

import org.bytedeco.opencv.opencv_core.*;
import org.bytedeco.opencv.opencv_imgproc.*;
import static org.bytedeco.opencv.global.opencv_core.*;
import static org.bytedeco.opencv.global.opencv_imgproc.*;
import static org.bytedeco.opencv.global.opencv_imgcodecs.*;

public class Smoother {
    public static void smooth(String filename) {
        Mat image = imread(filename);
        if (image != null) {
            GaussianBlur(image, image, new Size(3, 3), 0);
            imwrite(filename, image);
        }
    }
}

JavaCV also comes with helper classes and methods on top of OpenCV and FFmpeg to facilitate their integration to the Java platform. Here is a small demo program demonstrating the most frequently useful parts:

import java.io.File;
import java.net.URL;
import org.bytedeco.javacv.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.indexer.*;
import org.bytedeco.opencv.opencv_core.*;
import org.bytedeco.opencv.opencv_imgproc.*;
import org.bytedeco.opencv.opencv_calib3d.*;
import org.bytedeco.opencv.opencv_objdetect.*;
import static org.bytedeco.opencv.global.opencv_core.*;
import static org.bytedeco.opencv.global.opencv_imgproc.*;
import static org.bytedeco.opencv.global.opencv_calib3d.*;
import static org.bytedeco.opencv.global.opencv_objdetect.*;

public class Demo {
    public static void main(String[] args) throws Exception {
        String classifierName = null;
        if (args.length > 0) {
            classifierName = args[0];
        } else {
            URL url = new URL("https://raw.github.com/opencv/opencv/master/data/haarcascades/haarcascade_frontalface_alt.xml");
            File file = Loader.cacheResource(url);
            classifierName = file.getAbsolutePath();
        }

        // We can "cast" Pointer objects by instantiating a new object of the desired class.
        CascadeClassifier classifier = new CascadeClassifier(classifierName);
        if (classifier == null) {
            System.err.println("Error loading classifier file \"" + classifierName + "\".");
            System.exit(1);
        }

        // The available FrameGrabber classes include OpenCVFrameGrabber (opencv_videoio),
        // DC1394FrameGrabber, FlyCapture2FrameGrabber, OpenKinectFrameGrabber, OpenKinect2FrameGrabber,
        // RealSenseFrameGrabber, RealSense2FrameGrabber, PS3EyeFrameGrabber, VideoInputFrameGrabber, and FFmpegFrameGrabber.
        FrameGrabber grabber = FrameGrabber.createDefault(0);
        grabber.start();

        // CanvasFrame, FrameGrabber, and FrameRecorder use Frame objects to communicate image data.
        // We need a FrameConverter to interface with other APIs (Android, Java 2D, JavaFX, Tesseract, OpenCV, etc).
        OpenCVFrameConverter.ToMat converter = new OpenCVFrameConverter.ToMat();

        // FAQ about IplImage and Mat objects from OpenCV:
        // - For custom raw processing of data, createBuffer() returns an NIO direct
        //   buffer wrapped around the memory pointed by imageData, and under Android we can
        //   also use that Buffer with Bitmap.copyPixelsFromBuffer() and copyPixelsToBuffer().
        // - To get a BufferedImage from an IplImage, or vice versa, we can chain calls to
        //   Java2DFrameConverter and OpenCVFrameConverter, one after the other.
        // - Java2DFrameConverter also has static copy() methods that we can use to transfer
        //   data more directly between BufferedImage and IplImage or Mat via Frame objects.
        Mat grabbedImage = converter.convert(grabber.grab());
        int height = grabbedImage.rows();
        int width = grabbedImage.cols();

        // Objects allocated with `new`, clone(), or a create*() factory method are automatically released
        // by the garbage collector, but may still be explicitly released by calling deallocate().
        // You shall NOT call cvReleaseImage(), cvReleaseMemStorage(), etc. on objects allocated this way.
        Mat grayImage = new Mat(height, width, CV_8UC1);
        Mat rotatedImage = grabbedImage.clone();

        // The OpenCVFrameRecorder class simply uses the VideoWriter of opencv_videoio,
        // but FFmpegFrameRecorder also exists as a more versatile alternative.
        FrameRecorder recorder = FrameRecorder.createDefault("output.avi", width, height);
        recorder.start();

        // CanvasFrame is a JFrame containing a Canvas component, which is hardware accelerated.
        // It can also switch into full-screen mode when called with a screenNumber.
        // We should also specify the relative monitor/camera response for proper gamma correction.
        CanvasFrame frame = new CanvasFrame("Some Title", CanvasFrame.getDefaultGamma()/grabber.getGamma());

        // Let's create some random 3D rotation...
        Mat randomR    = new Mat(3, 3, CV_64FC1),
            randomAxis = new Mat(3, 1, CV_64FC1);
        // We can easily and efficiently access the elements of matrices and images
        // through an Indexer object with the set of get() and put() methods.
        DoubleIndexer Ridx = randomR.createIndexer(),
                   axisIdx = randomAxis.createIndexer();
        axisIdx.put(0, (Math.random() - 0.5) / 4,
                       (Math.random() - 0.5) / 4,
                       (Math.random() - 0.5) / 4);
        Rodrigues(randomAxis, randomR);
        double f = (width + height) / 2.0;  Ridx.put(0, 2, Ridx.get(0, 2) * f);
                                            Ridx.put(1, 2, Ridx.get(1, 2) * f);
        Ridx.put(2, 0, Ridx.get(2, 0) / f); Ridx.put(2, 1, Ridx.get(2, 1) / f);
        System.out.println(Ridx);

        // We can allocate native arrays using constructors taking an integer as argument.
        Point hatPoints = new Point(3);

        while (frame.isVisible() && (grabbedImage = converter.convert(grabber.grab())) != null) {
            // Let's try to detect some faces! but we need a grayscale image...
            cvtColor(grabbedImage, grayImage, CV_BGR2GRAY);
            RectVector faces = new RectVector();
            classifier.detectMultiScale(grayImage, faces);
            long total = faces.size();
            for (long i = 0; i < total; i++) {
                Rect r = faces.get(i);
                int x = r.x(), y = r.y(), w = r.width(), h = r.height();
                rectangle(grabbedImage, new Point(x, y), new Point(x + w, y + h), Scalar.RED, 1, CV_AA, 0);

                // To access or pass as argument the elements of a native array, call position() before.
                hatPoints.position(0).x(x - w / 10     ).y(y - h / 10);
                hatPoints.position(1).x(x + w * 11 / 10).y(y - h / 10);
                hatPoints.position(2).x(x + w / 2      ).y(y - h / 2 );
                fillConvexPoly(grabbedImage, hatPoints.position(0), 3, Scalar.GREEN, CV_AA, 0);
            }

            // Let's find some contours! but first some thresholding...
            threshold(grayImage, grayImage, 64, 255, CV_THRESH_BINARY);

            // To check if an output argument is null we may call either isNull() or equals(null).
            MatVector contours = new MatVector();
            findContours(grayImage, contours, CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE);
            long n = contours.size();
            for (long i = 0; i < n; i++) {
                Mat contour = contours.get(i);
                Mat points = new Mat();
                approxPolyDP(contour, points, arcLength(contour, true) * 0.02, true);
                drawContours(grabbedImage, new MatVector(points), -1, Scalar.BLUE);
            }

            warpPerspective(grabbedImage, rotatedImage, randomR, rotatedImage.size());

            Frame rotatedFrame = converter.convert(rotatedImage);
            frame.showImage(rotatedFrame);
            recorder.record(rotatedFrame);
        }
        frame.dispose();
        recorder.stop();
        grabber.stop();
    }
}

Furthermore, after creating a pom.xml file with the following content:

<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.bytedeco.javacv</groupId>
    <artifactId>demo</artifactId>
    <version>1.5.10</version>
    <properties>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.bytedeco</groupId>
            <artifactId>javacv-platform</artifactId>
            <version>1.5.10</version>
        </dependency>

        <!-- Additional dependencies required to use CUDA and cuDNN -->
        <dependency>
            <groupId>org.bytedeco</groupId>
            <artifactId>opencv-platform-gpu</artifactId>
            <version>4.9.0-1.5.10</version>
        </dependency>

        <!-- Optional GPL builds with (almost) everything enabled -->
        <dependency>
            <groupId>org.bytedeco</groupId>
            <artifactId>ffmpeg-platform-gpl</artifactId>
            <version>6.1.1-1.5.10</version>
        </dependency>
    </dependencies>
    <build>
        <sourceDirectory>.</sourceDirectory>
    </build>
</project>

And by placing the source code above in Demo.java, or similarly for other classes found in the samples, we can use the following command to have everything first installed automatically and then executed by Maven:

 $ mvn compile exec:java -Dexec.mainClass=Demo

Note: In case of errors, please make sure that the artifactId in the pom.xml file reads javacv-platform, not javacv only, for example. The artifact javacv-platform adds all the necessary binary dependencies.

Build Instructions

If the binary files available above are not enough for your needs, you might need to rebuild them from the source code. To this end, the project files were created for:

Once installed, simply call the usual mvn install command for JavaCPP, its Presets, and JavaCV. By default, no other dependencies than a C++ compiler for JavaCPP are required. Please refer to the comments inside the pom.xml files for further details.

Instead of building the native libraries manually, we can run mvn install for JavaCV only and rely on the snapshot artifacts from the CI builds:


Project lead: Samuel Audet samuel.audet at gmail.com
Developer site: https://github.com/bytedeco/javacv
Discussion group: http://groups.google.com/group/javacv

javacv's People

Contributors

agiasmothi avatar alicanalbayrak avatar anotherche avatar bytes-and-bits avatar canelzio avatar cansik avatar d-a-gerashenko avatar d00malun avatar egorapolonov avatar gitter-badger avatar iglaweb avatar jlleitschuh avatar jpsacha avatar lfdversluis avatar lloydmeta avatar maurice-betzel avatar mavriksc avatar mifritscher avatar paolobolettieri avatar pfn avatar poqudrof avatar salamanders avatar saudet avatar siy1121 avatar steeveen avatar tahaemara avatar teerapap avatar tengyyy avatar vb216 avatar waldemarnt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javacv's Issues

Blobs BlobAnalysis ROI Not Working

When using:

public int BlobAnalysis(IplImage Src,           // input image
                      int Col0, int Row0,                 // start of ROI
                      int Cols, int Rows,                 // size of ROI
                      int Border,                             // border color (0 = black; 1 = white)
                      int MinArea)                          // minimum region area

Setting the Start Column/Row and a size is not actually analyzing the correct area. When setting anything other than 0, or -1 for start ROI it will still start at 0. Example setting Col0 and Row0 to 100. It will still only analyse from 0 to size instead of 100 to size.

FaceRecognizer.train(..) crashing with "Fatal signal 7 (SIGBUS) at 0x0000000a (code=1)"

I am writing Face Recognizer for my android app using JavaCV 0.9

I am able to detect face perfectly but there is some data misalignment issue (due to above issue) while training my model.

Below is my code for Face Recognition

public static int recognizeFace(IplImage testFace) { File trainingDir = new File(Utils.mFaceFolder); File[] trainingFaces = trainingDir.listFiles(); int totalTrainingFaces = trainingFaces.length;
    MatVector images = new MatVector(totalTrainingFaces);
    CvMat labels = CvMat.create(totalTrainingFaces, 1, CV_32SC1);
    int counter = 0;
    int label;
    CvMat img;
    CvMat[] r = new CvMat[totalTrainingFaces];

    for(File face : trainingFaces) {
        img = cvLoadImageM(face.getAbsolutePath(), 0);
        label = Integer.parseInt(face.getName().split("\\-")[0]);
        images.put(img);
        r[counter] = img;
        labels.put(counter, label);
        counter++;
    }

    FaceRecognizer faceRecognizer = createEigenFaceRecognizer();
    //FaceRecognizer faceRecognizer = createFisherFaceRecognizer();
    //FaceRecognizer faceRecognizer = createLBPHFaceRecognizer();
    Mat l = new Mat(labels);

    faceRecognizer.train(images, l);

    IplImage grayTestFace = IplImage.create(testFace.width(), testFace.height(), IPL_DEPTH_8U, 1);
    cvCvtColor(testFace, grayTestFace, CV_RGB2GRAY);
    Mat test = new Mat(grayTestFace, true);
    int predictedLabel = faceRecognizer.predict(test);

    return predictedLabel;
}

The code is crashing at "faceRecognizer.train(images, l);"

Crash is - Fatal signal 7 (SIGBUS) at 0x0000000a (code=1)

testFace - IplImage[width=64,height=64,depth=8,nChannels=1]
img = width=64, height=64, depth=0, nChannels=1

faceRecognizer - org.bytedeco.javacpp.opencv_contrib$FaceRecognizer[address=0x552cd8e0,position=0,limit=0,capacity=0,deallocator=org.bytedeco.javacpp.Pointer$NativeDeallocator@42933998]


Below is the full Crash Report

11-04 15:49:14.274: W/ActivityThread(28828): Application com.motorola.testapp is waiting for the debugger on port 8100...
11-04 15:49:14.278: I/System.out(28828): Sending WAIT chunk
11-04 15:49:14.285: I/dalvikvm(28828): Debugger is active
11-04 15:49:14.481: I/System.out(28828): Debugger has connected
11-04 15:49:14.481: I/System.out(28828): waiting for debugger to settle...
11-04 15:49:14.682: I/System.out(28828): waiting for debugger to settle...
11-04 15:49:14.884: I/System.out(28828): waiting for debugger to settle...
11-04 15:49:15.085: I/System.out(28828): waiting for debugger to settle...
11-04 15:49:15.286: I/System.out(28828): waiting for debugger to settle...
11-04 15:49:15.486: I/System.out(28828): waiting for debugger to settle...
11-04 15:49:15.687: I/System.out(28828): waiting for debugger to settle...
11-04 15:49:15.888: I/System.out(28828): waiting for debugger to settle...
11-04 15:49:16.088: I/System.out(28828): waiting for debugger to settle...
11-04 15:49:16.289: I/System.out(28828): waiting for debugger to settle...
11-04 15:49:16.489: I/System.out(28828): waiting for debugger to settle...
11-04 15:49:16.691: I/System.out(28828): debugger has settled (1487)
11-04 15:49:16.704: I/KPI-6PA-AT-5(28828): 25152759 enter ApplicationThread.handleLaunchActivity() : ActivityInfo{42202640 com.motorola.testapp.MainActivity}
11-04 15:49:18.647: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libtbb.so 0x42206230
11-04 15:49:18.649: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libtbb.so 0x42206230
11-04 15:49:18.649: D/dalvikvm(28828): No JNI_OnLoad found in /data/app-lib/com.motorola.testapp-2/libtbb.so 0x42206230, skipping init
11-04 15:49:18.658: D/dalvikvm(28828): No JNI_OnLoad found in /system/lib/libc.so 0x42206230, skipping init
11-04 15:49:18.672: D/dalvikvm(28828): No JNI_OnLoad found in /system/lib/libm.so 0x42206230, skipping init
11-04 15:49:18.680: D/dalvikvm(28828): No JNI_OnLoad found in /system/lib/libz.so 0x42206230, skipping init
11-04 15:49:18.693: D/dalvikvm(28828): No JNI_OnLoad found in /system/lib/libdl.so 0x42206230, skipping init
11-04 15:49:18.755: D/dalvikvm(28828): No JNI_OnLoad found in /system/lib/liblog.so 0x42206230, skipping init
11-04 15:49:18.763: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libopencv_core.so 0x42206230
11-04 15:49:18.766: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libopencv_core.so 0x42206230
11-04 15:49:18.766: D/dalvikvm(28828): No JNI_OnLoad found in /data/app-lib/com.motorola.testapp-2/libopencv_core.so 0x42206230, skipping init
11-04 15:49:18.774: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libjniopencv_core.so 0x42206230
11-04 15:49:18.777: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libjniopencv_core.so 0x42206230
11-04 15:49:19.228: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libopencv_imgproc.so 0x42206230
11-04 15:49:19.248: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libopencv_imgproc.so 0x42206230
11-04 15:49:19.249: D/dalvikvm(28828): No JNI_OnLoad found in /data/app-lib/com.motorola.testapp-2/libopencv_imgproc.so 0x42206230, skipping init
11-04 15:49:19.258: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libjniopencv_imgproc.so 0x42206230
11-04 15:49:19.260: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libjniopencv_imgproc.so 0x42206230
11-04 15:49:19.386: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r2.2.0.so 0x42206230
11-04 15:49:19.388: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r2.2.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r2.2.0.so"...
11-04 15:49:19.415: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r2.3.3.so 0x42206230
11-04 15:49:19.416: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r2.3.3.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r2.3.3.so"...
11-04 15:49:19.449: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r3.0.1.so 0x42206230
11-04 15:49:19.452: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r3.0.1.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r3.0.1.so"...
11-04 15:49:19.478: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.0.so 0x42206230
11-04 15:49:19.479: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.0.0.so"...
11-04 15:49:19.502: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.3.so 0x42206230
11-04 15:49:19.504: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.3.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.0.3.so"...
11-04 15:49:19.533: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.1.1.so 0x42206230
11-04 15:49:19.534: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.1.1.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.1.1.so"...
11-04 15:49:19.564: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.2.0.so 0x42206230
11-04 15:49:19.565: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.2.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.2.0.so"...
11-04 15:49:19.603: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.3.0.so 0x42206230
11-04 15:49:19.604: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.3.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android11BufferQueueC1EbRKNS_2spINS_19IGraphicBufferAllocEEE" referenced by "libnative_camera_r4.3.0.so"...
11-04 15:49:19.632: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.4.0.so 0x42206230
11-04 15:49:19.635: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.4.0.so 0x42206230
11-04 15:49:19.636: D/dalvikvm(28828): No JNI_OnLoad found in /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.4.0.so 0x42206230, skipping init
11-04 15:49:19.718: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libopencv_highgui.so 0x42206230
11-04 15:49:19.724: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libopencv_highgui.so 0x42206230
11-04 15:49:19.724: D/dalvikvm(28828): No JNI_OnLoad found in /data/app-lib/com.motorola.testapp-2/libopencv_highgui.so 0x42206230, skipping init
11-04 15:49:19.732: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libjniopencv_highgui.so 0x42206230
11-04 15:49:19.733: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libjniopencv_highgui.so 0x42206230
11-04 15:49:19.819: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r2.2.0.so 0x42206230
11-04 15:49:19.820: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r2.2.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r2.2.0.so"...
11-04 15:49:19.843: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r2.3.3.so 0x42206230
11-04 15:49:19.845: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r2.3.3.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r2.3.3.so"...
11-04 15:49:19.884: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r3.0.1.so 0x42206230
11-04 15:49:19.886: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r3.0.1.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r3.0.1.so"...
11-04 15:49:19.913: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.0.so 0x42206230
11-04 15:49:19.914: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.0.0.so"...
11-04 15:49:19.939: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.3.so 0x42206230
11-04 15:49:19.939: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.3.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.0.3.so"...
11-04 15:49:19.962: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.1.1.so 0x42206230
11-04 15:49:19.965: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.1.1.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.1.1.so"...
11-04 15:49:19.989: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.2.0.so 0x42206230
11-04 15:49:19.990: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.2.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.2.0.so"...
11-04 15:49:20.013: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.3.0.so 0x42206230
11-04 15:49:20.015: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.3.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android11BufferQueueC1EbRKNS_2spINS_19IGraphicBufferAllocEEE" referenced by "libnative_camera_r4.3.0.so"...
11-04 15:49:20.131: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libopencv_objdetect.so 0x42206230
11-04 15:49:20.135: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libopencv_objdetect.so 0x42206230
11-04 15:49:20.135: D/dalvikvm(28828): No JNI_OnLoad found in /data/app-lib/com.motorola.testapp-2/libopencv_objdetect.so 0x42206230, skipping init
11-04 15:49:20.143: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libjniopencv_objdetect.so 0x42206230
11-04 15:49:20.145: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libjniopencv_objdetect.so 0x42206230
11-04 15:49:20.197: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r2.2.0.so 0x42206230
11-04 15:49:20.198: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r2.2.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r2.2.0.so"...
11-04 15:49:20.222: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r2.3.3.so 0x42206230
11-04 15:49:20.224: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r2.3.3.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r2.3.3.so"...
11-04 15:49:20.249: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r3.0.1.so 0x42206230
11-04 15:49:20.250: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r3.0.1.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r3.0.1.so"...
11-04 15:49:20.272: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.0.so 0x42206230
11-04 15:49:20.273: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.0.0.so"...
11-04 15:49:20.295: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.3.so 0x42206230
11-04 15:49:20.297: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.3.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.0.3.so"...
11-04 15:49:20.322: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.1.1.so 0x42206230
11-04 15:49:20.322: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.1.1.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.1.1.so"...
11-04 15:49:20.344: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.2.0.so 0x42206230
11-04 15:49:20.345: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.2.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.2.0.so"...
11-04 15:49:20.365: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.3.0.so 0x42206230
11-04 15:49:20.366: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.3.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android11BufferQueueC1EbRKNS_2spINS_19IGraphicBufferAllocEEE" referenced by "libnative_camera_r4.3.0.so"...
11-04 15:49:21.162: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.168: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.171: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.173: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.175: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.177: I/dalvikvm(28828): Could not find method java.awt.image.BufferedImage.getSampleModel, referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractIplImage.createFrom
11-04 15:49:21.177: W/dalvikvm(28828): VFY: unable to resolve virtual method 7985: Ljava/awt/image/BufferedImage;.getSampleModel ()Ljava/awt/image/SampleModel;
11-04 15:49:21.177: D/dalvikvm(28828): VFY: replacing opcode 0x6e at 0x0004
11-04 15:49:21.180: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.183: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.190: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.192: E/dalvikvm(28828): Could not find class 'java.awt.image.BufferedImage', referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.cloneBufferedImage
11-04 15:49:21.192: W/dalvikvm(28828): VFY: unable to resolve check-cast 1171 (Ljava/awt/image/BufferedImage;) in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;
11-04 15:49:21.192: D/dalvikvm(28828): VFY: replacing opcode 0x1f at 0x0008
11-04 15:49:21.194: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.196: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.200: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.202: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.204: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.206: E/dalvikvm(28828): Could not find class 'java.awt.Rectangle', referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.copyFrom
11-04 15:49:21.207: W/dalvikvm(28828): VFY: unable to resolve new-instance 1160 (Ljava/awt/Rectangle;) in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;
11-04 15:49:21.207: D/dalvikvm(28828): VFY: replacing opcode 0x22 at 0x0007
11-04 15:49:21.211: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.212: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/Rectangle;)
11-04 15:49:21.215: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.217: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/Rectangle;)
11-04 15:49:21.219: I/dalvikvm(28828): Could not find method java.awt.image.BufferedImage.getSampleModel, referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.copyFrom
11-04 15:49:21.219: W/dalvikvm(28828): VFY: unable to resolve virtual method 7985: Ljava/awt/image/BufferedImage;.getSampleModel ()Ljava/awt/image/SampleModel;
11-04 15:49:21.219: D/dalvikvm(28828): VFY: replacing opcode 0x74 at 0x000f
11-04 15:49:21.221: W/dalvikvm(28828): VFY: unable to resolve instance field 2161
11-04 15:49:21.221: D/dalvikvm(28828): VFY: replacing opcode 0x52 at 0x009a
11-04 15:49:21.223: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.226: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.228: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.230: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.232: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.234: E/dalvikvm(28828): Could not find class 'java.awt.Rectangle', referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.copyTo
11-04 15:49:21.234: W/dalvikvm(28828): VFY: unable to resolve new-instance 1160 (Ljava/awt/Rectangle;) in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;
11-04 15:49:21.234: D/dalvikvm(28828): VFY: replacing opcode 0x22 at 0x0007
11-04 15:49:21.244: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.247: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/Rectangle;)
11-04 15:49:21.257: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.259: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/Rectangle;)
11-04 15:49:21.261: I/dalvikvm(28828): Could not find method java.awt.image.BufferedImage.getSampleModel, referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.copyTo
11-04 15:49:21.262: W/dalvikvm(28828): VFY: unable to resolve virtual method 7985: Ljava/awt/image/BufferedImage;.getSampleModel ()Ljava/awt/image/SampleModel;
11-04 15:49:21.262: D/dalvikvm(28828): VFY: replacing opcode 0x74 at 0x0011
11-04 15:49:21.269: W/dalvikvm(28828): VFY: unable to resolve instance field 2161
11-04 15:49:21.269: D/dalvikvm(28828): VFY: replacing opcode 0x52 at 0x007b
11-04 15:49:21.272: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.274: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.276: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.278: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.280: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/color/ColorSpace;)
11-04 15:49:21.282: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.284: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:49:21.286: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/color/ColorSpace;)
11-04 15:49:21.288: E/dalvikvm(28828): Could not find class 'java.awt.image.BufferedImage', referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.getBufferedImage
11-04 15:49:21.288: W/dalvikvm(28828): VFY: unable to resolve new-instance 1171 (Ljava/awt/image/BufferedImage;) in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;
11-04 15:49:21.289: D/dalvikvm(28828): VFY: replacing opcode 0x22 at 0x000e
11-04 15:49:21.291: I/dalvikvm(28828): Could not find method java.awt.color.ColorSpace.getInstance, referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.getBufferedImage
11-04 15:49:21.291: W/dalvikvm(28828): VFY: unable to resolve static method 7966: Ljava/awt/color/ColorSpace;.getInstance (I)Ljava/awt/color/ColorSpace;
11-04 15:49:21.291: D/dalvikvm(28828): VFY: replacing opcode 0x71 at 0x0033
11-04 15:49:21.293: E/dalvikvm(28828): Could not find class 'java.awt.image.ComponentColorModel', referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.getBufferedImage
11-04 15:49:21.294: W/dalvikvm(28828): VFY: unable to resolve new-instance 1173 (Ljava/awt/image/ComponentColorModel;) in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;
11-04 15:49:21.294: D/dalvikvm(28828): VFY: replacing opcode 0x22 at 0x0052
11-04 15:49:21.296: E/dalvikvm(28828): Could not find class 'java.awt.image.BufferedImage', referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.getBufferedImage
11-04 15:49:21.297: W/dalvikvm(28828): VFY: unable to resolve check-cast 1171 (Ljava/awt/image/BufferedImage;) in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;
11-04 15:49:21.297: D/dalvikvm(28828): VFY: replacing opcode 0x1f at 0x0094
11-04 15:49:21.299: E/dalvikvm(28828): Could not find class 'java.awt.image.BufferedImage', referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.getBufferedImage
11-04 15:49:21.299: W/dalvikvm(28828): VFY: unable to resolve check-cast 1171 (Ljava/awt/image/BufferedImage;) in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;
11-04 15:49:21.299: D/dalvikvm(28828): VFY: replacing opcode 0x1f at 0x00b7
11-04 15:49:21.301: I/dalvikvm(28828): Could not find method java.awt.color.ColorSpace.getInstance, referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.getBufferedImage
11-04 15:49:21.301: W/dalvikvm(28828): VFY: unable to resolve static method 7966: Ljava/awt/color/ColorSpace;.getInstance (I)Ljava/awt/color/ColorSpace;
11-04 15:49:21.302: D/dalvikvm(28828): VFY: replacing opcode 0x71 at 0x00c6
11-04 15:49:21.303: I/dalvikvm(28828): Could not find method java.awt.color.ColorSpace.getInstance, referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.getBufferedImage
11-04 15:49:21.304: W/dalvikvm(28828): VFY: unable to resolve static method 7966: Ljava/awt/color/ColorSpace;.getInstance (I)Ljava/awt/color/ColorSpace;
11-04 15:49:21.304: D/dalvikvm(28828): VFY: replacing opcode 0x71 at 0x00de
11-04 15:49:21.306: E/dalvikvm(28828): Could not find class 'java.awt.image.ComponentColorModel', referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.getBufferedImage
11-04 15:49:21.307: W/dalvikvm(28828): VFY: unable to resolve new-instance 1173 (Ljava/awt/image/ComponentColorModel;) in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;
11-04 15:49:21.307: D/dalvikvm(28828): VFY: replacing opcode 0x22 at 0x00fc
11-04 15:49:21.309: E/dalvikvm(28828): Could not find class 'java.awt.image.ComponentColorModel', referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.getBufferedImage
11-04 15:49:21.309: W/dalvikvm(28828): VFY: unable to resolve new-instance 1173 (Ljava/awt/image/ComponentColorModel;) in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;
11-04 15:49:21.309: D/dalvikvm(28828): VFY: replacing opcode 0x22 at 0x012e
11-04 15:49:21.311: E/dalvikvm(28828): Could not find class 'java.awt.image.ComponentColorModel', referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.getBufferedImage
11-04 15:49:21.311: W/dalvikvm(28828): VFY: unable to resolve new-instance 1173 (Ljava/awt/image/ComponentColorModel;) in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;
11-04 15:49:21.312: D/dalvikvm(28828): VFY: replacing opcode 0x22 at 0x0160
11-04 15:49:21.314: E/dalvikvm(28828): Could not find class 'java.awt.image.ComponentColorModel', referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.getBufferedImage
11-04 15:49:21.314: W/dalvikvm(28828): VFY: unable to resolve new-instance 1173 (Ljava/awt/image/ComponentColorModel;) in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;
11-04 15:49:21.314: D/dalvikvm(28828): VFY: replacing opcode 0x22 at 0x0191
11-04 15:49:21.316: E/dalvikvm(28828): Could not find class 'java.awt.image.ComponentColorModel', referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.getBufferedImage
11-04 15:49:21.317: W/dalvikvm(28828): VFY: unable to resolve new-instance 1173 (Ljava/awt/image/ComponentColorModel;) in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;
11-04 15:49:21.317: D/dalvikvm(28828): VFY: replacing opcode 0x22 at 0x01c2
11-04 15:49:21.319: E/dalvikvm(28828): Could not find class 'java.awt.image.BufferedImage', referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.getBufferedImage
11-04 15:49:21.319: W/dalvikvm(28828): VFY: unable to resolve check-cast 1171 (Ljava/awt/image/BufferedImage;) in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;
11-04 15:49:21.319: D/dalvikvm(28828): VFY: replacing opcode 0x1f at 0x01f9
11-04 15:49:21.321: E/dalvikvm(28828): Could not find class 'java.awt.image.BufferedImage', referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractArray.getBufferedImage
11-04 15:49:21.322: W/dalvikvm(28828): VFY: unable to resolve new-instance 1171 (Ljava/awt/image/BufferedImage;) in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;
11-04 15:49:21.322: D/dalvikvm(28828): VFY: replacing opcode 0x22 at 0x0077
11-04 15:49:21.324: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f2a at 0x1e in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.cloneBufferedImage
11-04 15:49:21.327: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f29 at 0x2d in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.cloneBufferedImage
11-04 15:49:21.329: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f1d at 0x19 in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.copyFrom
11-04 15:49:21.331: I/dalvikvm(28828): DexOpt: unable to optimize instance field ref 0x0870 at 0xa3 in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.copyFrom
11-04 15:49:21.333: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f1d at 0x19 in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.copyTo
11-04 15:49:21.340: I/dalvikvm(28828): DexOpt: unable to optimize instance field ref 0x0870 at 0x84 in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.copyTo
11-04 15:49:21.342: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f29 at 0x18 in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.getBufferedImage
11-04 15:49:21.344: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f37 at 0x59 in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.getBufferedImage
11-04 15:49:21.347: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f38 at 0x6f in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.getBufferedImage
11-04 15:49:21.349: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f2a at 0x7d in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.getBufferedImage
11-04 15:49:21.351: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f37 at 0x103 in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.getBufferedImage
11-04 15:49:21.353: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f38 at 0x11b in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.getBufferedImage
11-04 15:49:21.355: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f37 at 0x135 in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.getBufferedImage
11-04 15:49:21.357: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f38 at 0x14d in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.getBufferedImage
11-04 15:49:21.359: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f37 at 0x167 in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.getBufferedImage
11-04 15:49:21.360: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f38 at 0x17f in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.getBufferedImage
11-04 15:49:21.363: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f37 at 0x198 in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.getBufferedImage
11-04 15:49:21.365: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f38 at 0x1b0 in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.getBufferedImage
11-04 15:49:21.367: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f37 at 0x1c9 in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.getBufferedImage
11-04 15:49:21.369: D/dalvikvm(28828): DexOpt: unable to opt direct call 0x1f38 at 0x1e1 in Lorg/bytedeco/javacpp/helper/opencv_core$AbstractArray;.getBufferedImage
11-04 15:51:04.945: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libopencv_flann.so 0x42206230
11-04 15:51:04.948: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libopencv_flann.so 0x42206230
11-04 15:51:04.948: D/dalvikvm(28828): No JNI_OnLoad found in /data/app-lib/com.motorola.testapp-2/libopencv_flann.so 0x42206230, skipping init
11-04 15:51:04.956: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libjniopencv_flann.so 0x42206230
11-04 15:51:04.957: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libjniopencv_flann.so 0x42206230
11-04 15:51:05.064: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r2.2.0.so 0x42206230
11-04 15:51:05.065: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r2.2.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r2.2.0.so"...
11-04 15:51:05.087: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r2.3.3.so 0x42206230
11-04 15:51:05.088: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r2.3.3.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r2.3.3.so"...
11-04 15:51:05.106: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r3.0.1.so 0x42206230
11-04 15:51:05.107: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r3.0.1.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r3.0.1.so"...
11-04 15:51:05.126: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.0.so 0x42206230
11-04 15:51:05.127: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.0.0.so"...
11-04 15:51:05.146: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.3.so 0x42206230
11-04 15:51:05.147: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.3.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.0.3.so"...
11-04 15:51:05.167: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.1.1.so 0x42206230
11-04 15:51:05.168: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.1.1.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.1.1.so"...
11-04 15:51:05.188: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.2.0.so 0x42206230
11-04 15:51:05.189: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.2.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.2.0.so"...
11-04 15:51:05.209: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.3.0.so 0x42206230
11-04 15:51:05.210: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.3.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android11BufferQueueC1EbRKNS_2spINS_19IGraphicBufferAllocEEE" referenced by "libnative_camera_r4.3.0.so"...
11-04 15:51:05.299: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libopencv_features2d.so 0x42206230
11-04 15:51:05.304: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libopencv_features2d.so 0x42206230
11-04 15:51:05.304: D/dalvikvm(28828): No JNI_OnLoad found in /data/app-lib/com.motorola.testapp-2/libopencv_features2d.so 0x42206230, skipping init
11-04 15:51:05.311: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libjniopencv_features2d.so 0x42206230
11-04 15:51:05.312: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libjniopencv_features2d.so 0x42206230
11-04 15:51:05.463: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r2.2.0.so 0x42206230
11-04 15:51:05.463: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r2.2.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r2.2.0.so"...
11-04 15:51:05.483: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r2.3.3.so 0x42206230
11-04 15:51:05.484: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r2.3.3.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r2.3.3.so"...
11-04 15:51:05.503: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r3.0.1.so 0x42206230
11-04 15:51:05.504: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r3.0.1.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r3.0.1.so"...
11-04 15:51:05.523: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.0.so 0x42206230
11-04 15:51:05.523: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.0.0.so"...
11-04 15:51:05.544: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.3.so 0x42206230
11-04 15:51:05.545: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.3.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.0.3.so"...
11-04 15:51:05.565: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.1.1.so 0x42206230
11-04 15:51:05.566: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.1.1.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.1.1.so"...
11-04 15:51:05.585: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.2.0.so 0x42206230
11-04 15:51:05.586: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.2.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.2.0.so"...
11-04 15:51:05.608: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.3.0.so 0x42206230
11-04 15:51:05.609: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.3.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android11BufferQueueC1EbRKNS_2spINS_19IGraphicBufferAllocEEE" referenced by "libnative_camera_r4.3.0.so"...
11-04 15:51:05.702: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libopencv_calib3d.so 0x42206230
11-04 15:51:05.706: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libopencv_calib3d.so 0x42206230
11-04 15:51:05.706: D/dalvikvm(28828): No JNI_OnLoad found in /data/app-lib/com.motorola.testapp-2/libopencv_calib3d.so 0x42206230, skipping init
11-04 15:51:05.714: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libjniopencv_calib3d.so 0x42206230
11-04 15:51:05.716: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libjniopencv_calib3d.so 0x42206230
11-04 15:51:05.834: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libopencv_video.so 0x42206230
11-04 15:51:05.836: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libopencv_video.so 0x42206230
11-04 15:51:05.836: D/dalvikvm(28828): No JNI_OnLoad found in /data/app-lib/com.motorola.testapp-2/libopencv_video.so 0x42206230, skipping init
11-04 15:51:05.844: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libjniopencv_video.so 0x42206230
11-04 15:51:05.845: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libjniopencv_video.so 0x42206230
11-04 15:51:05.960: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libopencv_ml.so 0x42206230
11-04 15:51:05.963: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libopencv_ml.so 0x42206230
11-04 15:51:05.963: D/dalvikvm(28828): No JNI_OnLoad found in /data/app-lib/com.motorola.testapp-2/libopencv_ml.so 0x42206230, skipping init
11-04 15:51:05.971: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libjniopencv_ml.so 0x42206230
11-04 15:51:05.974: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libjniopencv_ml.so 0x42206230
11-04 15:51:06.026: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r2.2.0.so 0x42206230
11-04 15:51:06.027: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r2.2.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r2.2.0.so"...
11-04 15:51:06.048: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r2.3.3.so 0x42206230
11-04 15:51:06.049: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r2.3.3.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r2.3.3.so"...
11-04 15:51:06.068: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r3.0.1.so 0x42206230
11-04 15:51:06.069: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r3.0.1.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r3.0.1.so"...
11-04 15:51:06.090: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.0.so 0x42206230
11-04 15:51:06.091: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.0.0.so"...
11-04 15:51:06.112: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.3.so 0x42206230
11-04 15:51:06.113: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.3.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.0.3.so"...
11-04 15:51:06.133: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.1.1.so 0x42206230
11-04 15:51:06.134: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.1.1.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.1.1.so"...
11-04 15:51:06.154: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.2.0.so 0x42206230
11-04 15:51:06.155: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.2.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.2.0.so"...
11-04 15:51:06.176: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.3.0.so 0x42206230
11-04 15:51:06.177: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.3.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android11BufferQueueC1EbRKNS_2spINS_19IGraphicBufferAllocEEE" referenced by "libnative_camera_r4.3.0.so"...
11-04 15:51:06.202: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libopencv_gpu.so 0x42206230
11-04 15:51:06.216: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libopencv_gpu.so 0x42206230
11-04 15:51:06.216: D/dalvikvm(28828): No JNI_OnLoad found in /data/app-lib/com.motorola.testapp-2/libopencv_gpu.so 0x42206230, skipping init
11-04 15:51:06.313: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libopencv_contrib.so 0x42206230
11-04 15:51:06.323: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libopencv_contrib.so 0x42206230
11-04 15:51:06.323: D/dalvikvm(28828): No JNI_OnLoad found in /data/app-lib/com.motorola.testapp-2/libopencv_contrib.so 0x42206230, skipping init
11-04 15:51:06.330: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libjniopencv_contrib.so 0x42206230
11-04 15:51:06.333: D/dalvikvm(28828): Added shared lib /data/app-lib/com.motorola.testapp-2/libjniopencv_contrib.so 0x42206230
11-04 15:51:06.665: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r2.2.0.so 0x42206230
11-04 15:51:06.666: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r2.2.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r2.2.0.so"...
11-04 15:51:06.685: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r2.3.3.so 0x42206230
11-04 15:51:06.686: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r2.3.3.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r2.3.3.so"...
11-04 15:51:06.705: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r3.0.1.so 0x42206230
11-04 15:51:06.706: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r3.0.1.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r3.0.1.so"...
11-04 15:51:06.723: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.0.so 0x42206230
11-04 15:51:06.724: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.0.0.so"...
11-04 15:51:06.745: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.3.so 0x42206230
11-04 15:51:06.746: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.0.3.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.0.3.so"...
11-04 15:51:06.766: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.1.1.so 0x42206230
11-04 15:51:06.767: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.1.1.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.1.1.so"...
11-04 15:51:06.786: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.2.0.so 0x42206230
11-04 15:51:06.787: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.2.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.2.0.so"...
11-04 15:51:06.809: D/dalvikvm(28828): Trying to load lib /data/app-lib/com.motorola.testapp-2/libnative_camera_r4.3.0.so 0x42206230
11-04 15:51:06.810: E/dalvikvm(28828): dlopen("/data/app-lib/com.motorola.testapp-2/libnative_camera_r4.3.0.so") failed: dlopen failed: cannot locate symbol "_ZN7android11BufferQueueC1EbRKNS_2spINS_19IGraphicBufferAllocEEE" referenced by "libnative_camera_r4.3.0.so"...
11-04 15:51:07.703: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:51:07.708: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:51:07.711: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:51:07.713: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:51:07.716: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:51:07.719: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:51:07.722: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/Rectangle;)
11-04 15:51:07.725: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/image/BufferedImage;)
11-04 15:51:07.727: W/dalvikvm(28828): VFY: unable to find class referenced in signature (Ljava/awt/Rectangle;)
11-04 15:51:07.730: I/dalvikvm(28828): Could not find method java.awt.image.BufferedImage.getSampleModel, referenced from method org.bytedeco.javacpp.helper.opencv_core$AbstractMat.copyFrom
11-04 15:51:07.730: W/dalvikvm(28828): VFY: unable to resolve virtual method 7985: Ljava/awt/image/BufferedImage;.getSampleModel ()Ljava/awt/image/SampleModel;
11-04 15:51:07.732: D/dalvikvm(28828): VFY: replacing opcode 0x6e at 0x0006
11-04 15:51:08.452: A/libc(28828): Fatal signal 7 (SIGBUS) at 0x00760061 (code=1), thread 28828 (otorola.testapp)

`FrameGrabber.createDefault()` returns null?

I have updated my code.
It now reads:


        // Preload the opencv_objdetect module to work around a known bug.
        Loader.load(opencv_objdetect.class);
        Loader.load(swresample.class); // We can "cast" Pointer objects by instantiating a new object of the desired class.
        CvHaarClassifierCascade classifier = new CvHaarClassifierCascade(cvLoad(classifierName));
        if (classifier.isNull()) {
            System.err.println("Error loading classifier file \"" + classifierName + "\".");
            System.exit(1);
        }

        // The available FrameGrabber classes include OpenCVFrameGrabber (opencv_highgui),
        // DC1394FrameGrabber, FlyCaptureFrameGrabber, OpenKinectFrameGrabber,
        // PS3EyeFrameGrabber, VideoInputFrameGrabber, and FFmpegFrameGrabber.
        FrameGrabber grabber = FFmpegFrameGrabber.createDefault(0);
        grabber.start();

But .createDefault() is appearing to always return null now without throwing any form of error.
Which to my understanding shouldn't be happeneing based on the code in

 public static FrameGrabber create(Class<? extends FrameGrabber> c, Class p, Object o)

My error being:

Exception in thread "main" java.lang.NullPointerException
    at com.nackloose.util.robot.JavaCVDemo.main(JavaCVDemo.java:38)
Java Result: 1

Line 38 being: grabber.start();
EDIT:
If you'd like more info I can attempt to run it from source as a project.

jniavcodec.dll Unsatisfied link error?

Running Windows 7 Ultimate.
Fresh download, and setup.
Running Java 8 and JDK 8 not sure if that's a difference.
Did some searching and this appears to be something that's supposed to be fixed, unless I'm doing something wrong.

Using the sample on the github intro page.
It works fine untill I change

FrameGrabber grabber = FrameGrabber.createDefault(0);

to

FrameGrabber grabber = FFmpegFrameGrabber.createDefault(0);

I get this error:

run:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniavcodec in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1119)
    at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:535)
    at org.bytedeco.javacpp.Loader.load(Loader.java:410)
    at org.bytedeco.javacpp.Loader.load(Loader.java:353)
    at org.bytedeco.javacpp.avcodec.<clinit>(avcodec.java:12)
    at org.bytedeco.javacv.FFmpegFrameGrabber.<clinit>(FFmpegFrameGrabber.java:103)
    at com.nackloose.util.robot.JavaCVDemo.main(JavaCVDemo.java:37)
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\Nackloose\AppData\Local\Temp\javacpp29106638795626\jniavcodec.dll: Can't find dependent libraries
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814)
    at java.lang.Runtime.load0(Runtime.java:809)
    at java.lang.System.load(System.java:1083)
    at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:524)
    ... 5 more
Java Result: 1
BUILD SUCCESSFUL (total time: 10 seconds)

Audio recording with FrameRecorder

Hi,
Reading an mp4 file and an mp3 with FFmpegFrameGrabber and then recording these in a new mp4 file with FrameRecorder functions well.

However reading an mp4 video file and sound from microphone to record seems to have some problems. With the code below, although the sound seems to be "without noise", but it is extreme delayed and not recognizable. Soundbytes read from TargetDataLine are ok.

Not sure, if this is simply an error in Buffer handling or a bug. I appreciate it if you could have a look.

private Frame me_GetPlayAudioFrame(Frame audioFrame, TargetDataLine captureLine, SourceDataLine playLine, Vector storeBytes){
    int defBuffSize = captureLine.getBufferSize();
    //      System.out.println("defBuffSize="+defBuffSize);

// int buffSize = defBuffSize/5;
int buffSize = defBuffSize/10; // = 4410
byte[] soundData = new byte[buffSize];
int numBytesRead = captureLine.read(soundData, 0, buffSize);
playLine.write(soundData, 0, numBytesRead); // <<< OK, sound is played correctly...

    ByteBuffer buff = ByteBuffer.allocate(numBytesRead);
    buff.put(soundData); 
    buff.rewind();
    // buff.flip();

    ShortBuffer fBuff = ShortBuffer.allocate(numBytesRead/2);
    fBuff.put(buff.asShortBuffer());

    fBuff.flip();

    audioFrame.audioChannels = 2; 
    audioFrame.samples = new Buffer[audioFrame.audioChannels];
    audioFrame.samples[0] = fBuff;
    audioFrame.samples[1] = fBuff;
    storeBytes.add(soundData);
    return audioFrame;
}

...........................................

                recorder.record(frameVideo);
                recorder.record(frameAudio);

I can email the mp4 file if required.

Thanks,
Taskin

FFmpegFrameRecorder setFormat H265/HEVC

I'd like to change the video codec to H265 (AV_CODEC_ID_H265) instead of (AV_CODEC_ID_MPEG4) for large resolution videos. The following gives me avcodec_find_encoder() error, Video codec not found. How can I add this video codec?

recorder.setVideoCodec(org.bytedeco.javacpp.avcodec.AV_CODEC_ID_H265);
recorder.setFormat("mp4");
recorder.setPixelFormat(org.bytedeco.javacpp.avutil.AV_PIX_FMT_YUV420P);
recorder.setFrameRate(24);
recorder.setVideoQuality(0);

Uploading file to RTMP server

Hi Samuel,

I have recorded a video file using FFmpegFrameRecording directly from the camera,
and the file looks perfect (I am using H264).

Later on, in my app, I want to upload this file into an RTMP server, therefore I'm using FFmpegFrameGraber (directed to the local file) + FFmpegFrameRecorder(directed to the RTMP server).

The problem is that the file in the server doesn't come out right, it has a lot of frame loss and audio-video syncing problems.

This is my code:

    if (mRotation == 90 || mRotation == 270) {
            mFrameRecorder = new FFmpegFrameRecorder(urlPath, videoProfile.height, videoProfile.width, 1);
    } else {
            mFrameRecorder = new FFmpegFrameRecorder(urlPath, videoProfile.width, videoProfile.height, 1);
    }

    mFrameRecorder.setFormat("flv");
    mFrameRecorder.setSampleRate(videoProfile.audioSampleRate);
    mFrameRecorder.setFrameRate(videoProfile.frameRate);
    mFrameRecorder.setVideoBitrate(videoProfile.bitRate);
    mFrameRecorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
    mFrameRecorder.setVideoOption("preset", "ultrafast");
    mFrameRecorder.start();

    FFmpegFrameGrabber mGrabber = new FFmpegFrameGrabber(mFilePath);
    mGrabber.setSampleRate(videoProfile.audioSampleRate);
    mGrabber.setFrameRate(videoProfile.frameRate);
    mGrabber.setVideoBitrate(videoProfile.bitRate);
    mGrabber.setVideoCodec(avcodec.AV_CODEC_ID_H264);
    mGrabber.start();


    Frame frame;
    while ((frame = getFrame()) != null) {
          if (frame != null) {
                // If frame contains image
                if (frame.image != null) {
                    // If need to rotate
                    if (mRotation != 0) {
                        frame.image = rotateImage(frame.image);
                    }
                }

                if (mGrabber.getTimestamp() > mFrameRecorder.getTimestamp()) {
                    mFrameRecorder.setTimestamp(mGrabber.getTimestamp());
                } else {
                    Log.w(TAG, "Incorrect timestamp: " + mGrabber.getTimestamp() + " when Recorder on: " + mFrameRecorder.getTimestamp());
                }

                try {
                    mFrameRecorder.record(frame);
                } catch (FrameRecorder.Exception e) {
                    Log.e(TAG, e.getMessage());
                    e.printStackTrace();
                }
            }
    }

No jniopencv_core UnsatisfiedLinkError Android Studio

I am trying to install JavaCV so I can use FFMPEG in my project. Specifically I am trying to use the sample code "RecordActivity" I have created a brand new project, followed the install instructions and then the specific OpenCV / FFMPEG instructinos https://github.com/bytedeco/javacv#manual-installation-for-opencv-and-ffmpeg and I am still gettting the error referenced several times on the forums about jniopencv_core and opencv_core not being referenced. Do you think it is an android studio issue? I tried doing eclipse and has the same issue although I did not go through it as thoroughly. Issues that are related to this.
#28
#1
#9

I am using the 9.0 release using gradle

    dependencies 
   {
        compile group: 'org.bytedeco', name: 'javacv', version: '0.9'
    }

is there a more up to date version I could try? or something im not doing?

Maven dependencies issue

I was trying to add JavaCV as an dependency by using this:

 <dependency>
  <groupId>org.bytedeco</groupId>
  <artifactId>javacv</artifactId>
  <version>0.9</version>
  </dependency>

But I don't quite understand what does mean by

 either set the platform.dependency system property to something like android-arm, or set the platform.dependencies one to true

I added this

<properties>     
    <platform.dependency>windows-x86_64</platform.dependency>
</properties>

But none of the windows binaries are downloaded...
The only jars that are downloaded are the non platform specific ones (the ones not in bin.zip)

Unsatisfied link error at lorg/bytedeco/javacpp/avcodec

What steps will reproduce the problem?

  1. Followed the instruction given on website. copied javacv.jar, javacpp.jar, ffmpeg.jar, opencv.jar to libs.
    then created a new folder armeabi and constructed all .so files from opencv-arm, ffmpeg-arm to armeabi.
  2. libavcodec is not loaded .
  3. All the project works nicely till the line of ffmpegFrameRecorder.

What is the expected output? What do you see instead?
I want to convert iplimages to a video.

What version of the product are you using? On what operating system?
0.9 . downloaded from github

Please provide any additional information below.
08-22 14:54:51.121: W/dalvikvm(3589): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lorg/bytedeco/javacpp/avcodec;
08-22 14:54:51.121: W/dalvikvm(3589): Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Lorg/bytedeco/javacpp/avformat;
08-22 14:54:51.121: W/dalvikvm(3589): Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Lorg/bytedeco/javacv/FFmpegFrameRecorder;
08-22 14:54:51.164: E/AndroidRuntime(3589): java.lang.ExceptionInInitializerError
08-22 14:54:51.164: E/AndroidRuntime(3589): at com.uae.panorama360.CameraClas.createVideao(CameraClas.java:207)
08-22 14:54:51.164: E/AndroidRuntime(3589): at com.uae.panorama360.CameraClas.onClick(CameraClas.java:154)
08-22 14:54:51.164: E/AndroidRuntime(3589): at android.view.View.performClick(View.java:2538)
08-22 14:54:51.164: E/AndroidRuntime(3589): at android.view.View$PerformClick.run(View.java:9152)
08-22 14:54:51.164: E/AndroidRuntime(3589): at android.os.Handler.handleCallback(Handler.java:587)
08-22 14:54:51.164: E/AndroidRuntime(3589): at android.os.Handler.dispatchMessage(Handler.java:92)
08-22 14:54:51.164: E/AndroidRuntime(3589): at android.os.Looper.loop(Looper.java:130)
08-22 14:54:51.164: E/AndroidRuntime(3589): at android.app.ActivityThread.main(ActivityThread.java:3687)
08-22 14:54:51.164: E/AndroidRuntime(3589): at java.lang.reflect.Method.invokeNative(Native Method)
08-22 14:54:51.164: E/AndroidRuntime(3589): at java.lang.reflect.Method.invoke(Method.java:507)
08-22 14:54:51.164: E/AndroidRuntime(3589): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
08-22 14:54:51.164: E/AndroidRuntime(3589): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
08-22 14:54:51.164: E/AndroidRuntime(3589): at dalvik.system.NativeStart.main(Native Method)
08-22 14:54:51.164: E/AndroidRuntime(3589): Caused by: java.lang.ExceptionInInitializerError
08-22 14:54:51.164: E/AndroidRuntime(3589): at org.bytedeco.javacv.FFmpegFrameRecorder.(FFmpegFrameRecorder.java:106)
08-22 14:54:51.164: E/AndroidRuntime(3589): ... 13 more
08-22 14:54:51.164: E/AndroidRuntime(3589): Caused by: java.lang.ExceptionInInitializerError
08-22 14:54:51.164: E/AndroidRuntime(3589): at java.lang.Class.classForName(Native Method)
08-22 14:54:51.164: E/AndroidRuntime(3589): at java.lang.Class.forName(Class.java:234)
08-22 14:54:51.164: E/AndroidRuntime(3589): at org.bytedeco.javacpp.Loader.load(Loader.java:385)
08-22 14:54:51.164: E/AndroidRuntime(3589): at org.bytedeco.javacpp.Loader.load(Loader.java:353)
08-22 14:54:51.164: E/AndroidRuntime(3589): at org.bytedeco.javacpp.avformat.(avformat.java:13)
08-22 14:54:51.164: E/AndroidRuntime(3589): ... 14 more
08-22 14:54:51.164: E/AndroidRuntime(3589): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1963]: 1581 could not load needed library 'libavcodec.so' for 'libjniavcodec.so' (find_library[1220]: 1581 'libavcodec.so' failed to load previously)

# A fatal error has been detected by the Java Runtime Environment:

            IplImage img=cvLoadImage("getImage.jpg");
            Mat a=new Mat();
    a.copyFrom(img.getBufferedImage());

Let's say I wanna copy a into s

    CvArr s = new CvArr();
    s.put(a);

So when it copy into CvArr I got this error.even I did the "ulimit -c unlimited"

A fatal error has been detected by the Java Runtime Environment:
SIGSEGV (0xb) at pc=0x00007f8194f9ea79, pid=2329, tid=140193875982080
JRE version: OpenJDK Runtime Environment (7.0_65-b32) (build 1.7.0_65-b32)
Java VM: OpenJDK 64-Bit Server VM (24.65-b04 mixed mode linux-amd64 compressed oops)
Derivative: IcedTea 2.5.3
Distribution: Ubuntu 14.04 LTS, package 7u71-2.5.3-0ubuntu0.14.04.1
Problematic frame:
C [libc.so.6+0x98a79]
Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
An error report file with more information is saved as:
/home/geesara/opencv/javacv/JavacvExa/hs_err_pid2329.log
If you would like to submit a bug report, please include
instructions on how to reproduce the bug and visit:
http://icedtea.classpath.org/bugzilla
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.

Does it support android 4.4.2?

I try to build a application with javacv libs in my android 4.4.2 device, but it comes out:
"
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "avio_find_protocol_name" referenced by "libjniavformat.so"...
"

java.lang.RuntimeException: vector::_M_fill_insert at org.bytedeco.javacpp.opencv_stitching$Stitcher.stitch(Native Method)

I am struct on this error for 3 days .
Error is :
java.lang.RuntimeException: vector::_M_fill_insert at org.bytedeco.javacpp.opencv_stitching$Stitcher.stitch(Native Method)

My code is

public void stitchImage() throws Throwable{

    Stitcher stitcher = Stitcher.createDefault(false);
    MatVector allMats = new MatVector(imgs_Ipl.size());
    for(int x=0; x<imgs_Ipl.size();x++){
        allMats.put(imgs_Ipl.get(x));
    }
        Mat result = new Mat();
    try{
        int status = stitcher.stitch(allMats, result);

        if( status == stitcher.OK )
        {
       Bitmap endResult= Bitmap.createBitmap(result.rows(), result.cols(), Config.RGB_565);
        endResult.copyPixelsFromBuffer(result.getByteBuffer());
        clicked.setImageBitmap(endResult);
              }
    }catch (Throwable t){
        t.printStackTrace();
        throw t;
    }

}

Note:
1: imgs_ipl is an Arraylist or type imgs_ipl with IPL_DEPTH_8U and number of channels = 3
2: if i put some integer with allMats.put(x, imgs_ipl.get(x)) it gives error.

Please some one help me!

RTMP streaming problem

Dear Samuel, it's been almost 2 week since I am trying to stream video from Android device to server using RTMP.

I tried to use your RecordActivity example, but there is avio_open() error -5

Also, I tried to use this example:
https://github.com/vanevery/JavaCV-0.5-Stream-Test
As I see, it is based on RecordActivity, maybe with some .so files changed.
The only thing I changed was the ffmpeg_link.
I used this one:
(url deleted. It is long, believe me :) )

Still the same avio_open() error -5

Can you tell me what this error code means?
Also, do you have any ideas what is wrong with this link?

Audio frame.samples buffer type as FloatBuffer nok for replay.

FFmpegFrameGrabber returns frame.samples as ShortBuffer if the file type is *.mp3.
This is Ok. It is clear played back.

Both video and audio (recorded from *.mp3 or from microphone) are written into *.mp4 where audio.samples as ShortBuffer. Replay via mediaplayer Ok.

However, despite written as ShortBuffer, if the fileType read is *.mp4, frame.samples come in FloatFormat. And handling of the FloatFormat is the problem. The extracted byteArray plays with a lot of noise.

Only by using the first byte of the extracted byteArray, the noise was a lot reduced, but it is still there.

Please see the code extract below. Also the strange filter is given as a dirty workaround.
Am I missing a better way of converting this strange FloatFormat to ByteArray?
I suspect this is a bug. Also often by recording the sampleRate needs to be doubled and by playing halved, indicate there is a problem with audio sampleRate too.

Any tipp is very much appreciated.

private void me_PlayFrameAudio(Buffer[] audioSample,SourceDataLine playLine){
        Buffer buff = audioSample[0];
        if(buff instanceof ShortBuffer){
            ShortBuffer sBuff = (ShortBuffer)buff;
            int len = sBuff.capacity();
            ByteBuffer bBuff = ByteBuffer.allocate(len*2);
            bBuff.asShortBuffer().put(sBuff);
            byte[] byteArr = bBuff.array();
            playLine.write(byteArr, 0, byteArr.length);
            sBuff.clear();
        }
        else if(buff instanceof FloatBuffer){
            FloatBuffer fBuff = (FloatBuffer)buff;
            int len = fBuff.capacity();
            ShortBuffer sBuff = ShortBuffer.allocate(len*2);
            ByteBuffer bBuff = ByteBuffer.allocate(len*4);
            bBuff.asFloatBuffer().put(fBuff);
            byte[] byteArr = bBuff.array();
            byteArr = me_Filter(byteArr);   // filtering trials to see if the noise can be eliminated...
            playLine.write(byteArr, 0, byteArr.length);
            fBuff.clear();
        }
    }

    private byte[] me_Filter(byte[] byteArr){
        int len = byteArr.length;
        // byte[] newByteArr = new byte[len];
        byte[] newByteArr = new byte[len/4];
        int countIn = 0;
        int countOut = 0;
        for(int i=0; i<len/4; i++){
            newByteArr[countOut+0] = byteArr[countIn+0];
//          newByteArr[countOut+0] = byteArr[countIn+1];
//          newByteArr[countOut+3] = byteArr[countIn+2];
//          newByteArr[countOut+2] = byteArr[countIn+3];
            countOut += 1;
            countIn += 4;
        }
        return newByteArr;
    }

how to rotato video frame

hi, I'm developing an app like vine, at start, I use mediaRecorder to record video, but soon I found it not proper to build function like what vine supply, then i found javacv is a good resolution, but now I have a problem, that is after I record video, enter preview page, SurfaceView will display video in landscape orientation(-x direction), its will display in +x direction when I record with front camera, I really don't know where and how to to rotate every frame from camera onPreviewFrame callback, need your help, thanks a lot!

Gradle is looking for Linux-amd64 version of javacpp-presets

I'm trying to use this library in Android project. I've encountered a problem with wrong ABI when I add the library to the build.gradle.

Here is the dependency:

compile group: 'org.bytedeco', name: 'javacv', version: '0.8', platform: 'android-arm'

And here's the error:

Artifact 'org.bytedeco.javacpp-presets:opencv:2.4.9-0.8:opencv-Linux-amd64.jar' not found

Any suggestions how can I solve this?

Possible native stack corruption in C++ API's findContours(Mat, Mat, Mat, int, int, Point)

Hello

I encountered a SIGSEGV when executing my javacv based heuristic in a loop.
After a lot of searching, reading and experimenting I found the source has to be the findContoures method (org.bytedeco.javacpp.opencv_imgproc.findContours).
The only workaround I came up with was using the C implementation of this method.
SIGSEGV disappeared instantly.

Let me know if you need my code example for further investigation.

Greetings.

PS.: I#m using v. 0.9

av_interleaved_write_frame() error -22 while writing interleaved video frame

What steps will reproduce the problem?

  1. Running the code at the end of the question

What is the expected output?
All frame to be recorded

What do you see instead?
Every few frames I get this exception:

org.bytedeco.javacv.FrameRecorder$Exception: av_interleaved_write_frame() error -22 while writing interleaved video frame.
at org.bytedeco.javacv.FFmpegFrameRecorder.record(FFmpegFrameRecorder.java:720)
at org.bytedeco.javacv.FFmpegFrameRecorder.record(FFmpegFrameRecorder.java:624)
at org.bytedeco.javacv.FrameRecorder.record(FrameRecorder.java:290)

What version of the product are you using? On what operating system?
Android 4.4.4, Nexus 5, JavaCV 0.8

Please provide any additional information below.
Hi,

I am initializing FFmpegFrameGrabber to read from a video file, recorded in the past using FFmpegFrameRecorder,
and I want to send this video to an rtmp server using FFmpegFrameRecorder.

So far, I was able to do it, however I do have one problem, not all of the frames are delivered
from the file to the server, one in a few frames cause the FFmpegFrameRecorder to throw the exception mentioned above.

FYI, I am rotating the video since android preview frame is 90 degrees rotated, using the method below.

// Reader initilization part:
FFmpegFrameGrabber mGrabber = new FFmpegFrameGrabber("path-to-file recorded from camera using FFMpegFrameRecorder in the past");
mGrabber.start();

// Writer initilization part:
FFmpegFrameRecorder mFrameRecorder = new FFmpegFrameRecorder("/sdcard/Movies/Camra/final.flv", height, width, 1);
mFrameRecorder.setFormat("flv");
mFrameRecorder.setSampleRate(videoProfile.audioSampleRate);
mFrameRecorder.setFrameRate(videoProfile.frameRate);
mFrameRecorder.setVideoBitrate(videoProfile.bitRate);
mFrameRecorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
mFrameRecorder.setVideoOption("preset", "ultrafast");
mFrameRecorder.start();

// Actual reading-writing:
Frame frame;
while ((frame = getFrame()) != null) {
mFrameRecorder.setTimestamp(timestamp);

if (frame.image != null) {
    frame.image = rotateImage(frame.image);
}

mFrameRecorder.record(frame);

}

// Rotate function:
private opencv_core.IplImage rotateImage(opencv_core.IplImage frame) {
if (mRotation != 0) {
opencv_core.IplImage destination;
if (mRotation != 180) {
if (mRotatedImage == null) {
mRotatedImage = opencv_core.cvCreateImage(opencv_core.cvSize(frame.height(), frame.width()), frame.depth(), frame.nChannels());
}

        destination = mRotatedImage;
        opencv_core.cvTranspose(frame, destination);
    } else {
        destination = frame;
    }

    if (mRotation == 90)
        opencv_core.cvFlip(destination, destination, 1);
    else if (mRotation == 270)
       opencv_core.cvFlip(destination, destination, 0);
    else if (mRotation == 180)
       opencv_core.cvFlip(destination, destination, -1);

    return destination;

}

return frame;
}

h264 is too slow

I am streaming video from camera to RTMP server, encoding with h264, but it is too slow. On my galaxy S2 there are only 10 frames per second with resolution 640x480.
I discovered that the slowest method is avcodec_encode_video2().
Also, I tryied to encode with FLV1. It is a lot faster, but quality is too bad.
I know that this is ffmpeg issue, but is there a way to make it faster or another encoding with proper quality?

OpenCV Mat and JavaCV Mat

I cannot copy Opencv Mat to Javacv Mat. When i Do so it gives error! Is it possible ?? And if it is how would i do this??

Video frames lost at end of Grabbing and Recording session

My friend posted this on google code but now I'm posting this here , the problem is that we are trying to apply some opencv effects to a video file and then save results to a new file (mp4 container with x264/AAC) , the output video file is ok and audio is also there , but frames in the last 2-3 seconds of video are gone every time (we tested it with 5 sec/ 12 sec and a 30 sec video to be sure) , we can hear the audio but video just stays there frozen . (problem persist on both Android 4.4.4 & Linx x64 Ubuntu too )

Code fragment -

import static org.bytedeco.javacpp.avcodec.AV_CODEC_ID_AAC;
import static org.bytedeco.javacpp.avcodec.AV_CODEC_ID_H264;
import static org.bytedeco.javacpp.opencv_core.*;
import static org.bytedeco.javacpp.opencv_imgproc.*;
import static org.bytedeco.javacpp.opencv_highgui.*;

import java.io.File;

import org.bytedeco.javacpp.opencv_core.IplImage;
import org.bytedeco.javacv.FFmpegFrameGrabber;
import org.bytedeco.javacv.FFmpegFrameRecorder;
import org.bytedeco.javacv.Frame;

public class Test {
    public static void main(String []args) { 
        File file = new File("/home/vivek/test.mp4");

        // IplImage captured_frame = null;
        //;
        //FFmpegFrameRecorder recorder = null;

        // recorder.setFrameRate(25);
        // recorder.setVideoBitrate(700000);

        try {
            FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(file.getAbsolutePath());
            frameGrabber.start();
            //Log.d("bharat:", "frame count " + frameGrabber.getLengthInFrames() + "");
            FFmpegFrameRecorder recorder = new FFmpegFrameRecorder("/home/vivek/out.mp4", frameGrabber.getImageWidth(), frameGrabber.getImageHeight(), 2);
            recorder.setVideoCodec(AV_CODEC_ID_H264);
            recorder.setFormat("mp4");
            // necessory becoz of audio..
            System.out.println(" frame rate" + frameGrabber.getFrameRate());
            System.out.println(" Sample Rate"+frameGrabber.getSampleRate() );
            System.out.println(" Sample Format"+ frameGrabber.getSampleFormat() );
            //System.out.println(" Sample Rate"+ );

            recorder.setFrameRate(frameGrabber.getFrameRate());
            recorder.setSampleFormat(frameGrabber.getSampleFormat());
            recorder.setSampleRate(frameGrabber.getSampleRate());

            recorder.setAudioCodec(AV_CODEC_ID_AAC);
            recorder.start();



            long currentTimeMillis = System.currentTimeMillis();

            int count = 0;
            int totalcount = 0;
            int soundCount = 0;
            while (true) {
                try {
                    totalcount++;
                    Frame grabFrame = frameGrabber.grabFrame();

                    if (grabFrame == null) {
                        System.out.println("!!! Failed cvQueryFrame");
                        break;
                        }
                    if (grabFrame.image != null) {
                        if (count > 390) {
//                          ByteBuffer asBuffer = grabFrame.image.arraySize();
//                          byte[] array = asBuffer.array();
//                          String d = "";
//                          for (int i = 0; i < array.length; i++) {
//                              d += " " + array[i];
//                          }
                            //Log.d("bharat", "frame:" + count + " data:" +  grabFrame.image.arraySize());
                        }
                        count++;
                         IplImage frame_copy = cvCreateImage(cvSize(grabFrame.image.width(),
                         grabFrame.image.height()), IPL_DEPTH_8U, 1);
                         cvCvtColor(grabFrame.image, frame_copy, CV_RGB2GRAY);
                         grabFrame.image = frame_copy;
                         //cvSaveImage(filePath + File.separator + "image" +
                         //count++ + ".jpg", grabFrame.image);
                    } else {
                        if (grabFrame.samples == null) {
                            System.out.println("anonymous data :");
                        }
                        // Log.d("bharat:", "sound data :" + sound);
                    }
                    recorder.setTimestamp(frameGrabber.getTimestamp());
                    recorder.record(grabFrame);

                } catch (Exception e) {
                    System.out.println("exception " + e);
                    e.printStackTrace();
                }

            }
            System.out.println("frame done, "+soundCount + " " + count + " " + totalcount);
            recorder.stop();
            recorder.release();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

I also tried above code with alterations on my ubuntu x64 and I got the output file but the problem still persisted . When i tried ** ffplay -loglevel debug out.mp4 ** I got the following error lines

[mp4 @ 0x7f6be4613e00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 30720 >= 30720
[libx264 @ 0x7f6be460a080] non-strictly-monotonic PTS
also a Frame num gap 1 5 line was in debug log along with above

While in my eclipse console i got something like this ,

exception org.bytedeco.javacv.FrameRecorder$Exception: av_interleaved_write_frame() error -22 while writing interleaved video frame. org.bytedeco.javacv.FrameRecorder$Exception: av_interleaved_write_frame() error -22 while writing interleaved video frame. at org.bytedeco.javacv.FFmpegFrameRecorder.record(FFmpegFrameRecorder.java:725) at org.bytedeco.javacv.FFmpegFrameRecorder.record(FFmpegFrameRecorder.java:629) at org.bytedeco.javacv.FrameRecorder.record(FrameRecorder.java:290) at Test.main(Test.java:85)

little bit of googling hinted that this issue is related to pts calculation if that helps !

Leak in cvFlip() or something i messed up.

Hi,
Im trying to implement a simple application to show my webcamera, wich works good, until i try to flip the output stream. After i'm flippin the stream the program starts to leak. The strange its only leak when i flip the stream and i have no idea why, since i try to release everything. When i dont flip, the leak is gone, so i can only thing is leaking somewhere in cvFlip.( Its still leaks when i comment out all the release lines)
Im getting my image source from GrabCamera through these methods:

private void StartWebcamera(){
        cameraThread = new Thread(){
            public void run(){
                    while ((grabbedImage = opencv_highgui.cvQueryFrame(capture)) != null) {
                        grabbedImage.release();
                }   
            }
        };
        cameraThread.start();
    }
    public IplImage GetGrabbedStream(){
        return grabbedImage;
    }

In my main i pass the image to my Gui class like these:

    while (true) {
        gui.SetVideoStream(grabCamera.GetGrabbedStream(), true);
}

And i show my image in the gui class:

    public void SetVideoStream(IplImage img,boolean flip){
        if (flip) {
            IplImage mirrorImage = img.clone();
            cvFlip(img, mirrorImage, 1);
            cameraFeed.setImage(mirrorImage.getBufferedImage());
            videoPanel.setIcon(cameraFeed);
            videoPanel.repaint();
            mirrorImage.release();
            img.release();
        }
        else {
            cameraFeed.setImage(img.getBufferedImage());
            videoPanel.setIcon(cameraFeed);
            videoPanel.repaint();
            img.release();
        }
    }

BUILD ON OSX "error: no member named 'reference_dts' in 'AVStream'"

  • executed cppbuild.sh and mvn install on javacpp.presets
  • executed mvn install on javacpp

mvn install on javacs fails with

javacv/target/classes/com/googlecode/javacv/cpp/jniavformat.cpp:9833:10: error: no member named 'reference_dts' in 'AVStream'
ptr->reference_dts = arg0;
~~~ ^
javacv/target/classes/com/googlecode/javacv/cpp/jniavformat.cpp:9845:25: error: no member named 'reference_dts' in 'AVStream'
jlong rvalue = ptr->reference_dts;

ffmpeg version is 2.2
libopencv version is 2.4.8

JavaCpp presets w/ ffmpeg compile issues

Hi,
I'm having trouble compiling the presets for ffmpeg. Specifically regarding how enums are parsed. I downloaded the latest ffmpeg headers and also javacpp presets source code from github. The generated code cannot compile looks like mostly because the enums are not parsed correctly. For example the following line in avutil.java:

public native @ByRef AVColorSpace colorspace();
public native AVFrame colorspace(AVColorSpace colorspace);

but there's no type for AVColorSpace, instead, here's the how AVColorSpace is parsed from the header file:

/** YUV colorspace type. */

/** enum AVColorSpace */

public static final int

AVCOL_SPC_RGB         = 0,

/** also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B */

AVCOL_SPC_BT709       = 1,

AVCOL_SPC_UNSPECIFIED = 2,

AVCOL_SPC_FCC         = 4,

/** also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 */

AVCOL_SPC_BT470BG     = 5,

/** also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above */

AVCOL_SPC_SMPTE170M   = 6,

AVCOL_SPC_SMPTE240M   = 7,

/** Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16 */

AVCOL_SPC_YCOCG       = 8,

/** ITU-R BT2020 non-constant luminance system */

AVCOL_SPC_BT2020_NCL  = 9,

/** ITU-R BT2020 constant luminance system */

AVCOL_SPC_BT2020_CL   = 10,

/** Not part of ABI */

AVCOL_SPC_NB = 11;

public static final int AVCOL_SPC_YCGCO = AVCOL_SPC_YCOCG;

I also attached the full generated file at this post:
https://code.google.com/p/javacpp/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&id=45

Thanks much for the help!
Percy

ScreenCapture on Windows using new FFmpegFrameGrabber("screen-capture-recorder");

Apparently ffmpeg supports screen capture on Windows according to this:
https://trac.ffmpeg.org/wiki/Capture/Desktop

Attempting to do so using:

        FrameGrabber grabber = new FFmpegFrameGrabber("screen-capture-recorder");// As well as FFmpegFrameGrabber("UScreenCapture");
        grabber.setFormat("dshow");
        grabber.setFrameRate(30);
        grabber.start();

Results in:

run:
Exception in thread "main" org.bytedeco.javacv.FrameGrabber$Exception: avformat_open_input() error -5: Could not open input "screen-capture-recorder". (Has setFormat() been called?)
    at org.bytedeco.javacv.FFmpegFrameGrabber.startUnsafe(FFmpegFrameGrabber.java:368)
    at org.bytedeco.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.java:318)
    at testarea.JavaCVDemo.main(JavaCVDemo.java:40)
[dshow @ 154dc160] Malformed dshow input string.
[dshow @ 154dc160] Malformed dshow input string.
Java Result: 1
BUILD SUCCESSFUL (total time: 9 seconds)

This may possibly have something to do with(maybe???): https://trac.ffmpeg.org/wiki/DirectShow#Specifyinginputframerate

This is here as a resource in case other people experience this error and wish to look into it, as well as a reminder to myself to do so in the future.
If you find any solutions or fixes, please let me know.

java.lang.ClassNotFoundException: Didn't find class "com.googlecode.javacpp.Loader"

I have this error
java.lang.ClassNotFoundException: Didn't find class "com.googlecode.javacpp.Loader" on path: DexPathList[[zip file "/data/app/ru.face2face-1.apk"],nativeLibraryDirectories=[/data/app-lib/ru.face2face-1, /vendor/lib, /system/lib]]

on line yuvIplimage = IplImage.create(imageWidth, imageHeight, IPL_DEPTH_8U, 2);

I add javacv into my android appliaction using
compile group: 'org.bytedeco', name: 'javacv', version: '0.9'
in build.gradle file.

I tried clean project, restart Android Studio and remove previotion version of my app.

Problem with saving ipl image coming from android camera.

Hi,
I have used code below to save ipl image coming from "onPreviewFrame" on RecordActivity example. But the result is a green and weird as below. I have also tried CV_YUV2BGR_NV21 and CV_YUV2BGR_YV12 but without success.

Is there any way to save those yuvimages as rgb or anything else?

IplImage yuvIplimage = IplImage.create(imageWidth, imageHeight,
                IPL_DEPTH_8U, 2);
yuvIplimage.getByteBuffer().put(data);
IplImage img1NotYuv = IplImage.create(yuvIplimage.width(),
                    yuvIplimage.height() * 2 / 3, IPL_DEPTH_8U, 3);
cvCvtColor(yuvIplimage, img1NotYuv, CV_YUV2BGR_NV21);

String filePath = Environment.getExternalStorageDirectory()
                    + "/abc/result.jpg";

cvSaveImage(filePath, img1NotYuv);

3

Artifact wrong in POM ?

Gradle 'project' project refresh failed:
Could not download artifact 'org.bytedeco.javacpp-presets:opencv:2.4.9-0.8:opencv-Mac OS X-x86_64.jar'

I've tried to get this working via a gradle dependencies compile. When looking over javacpp-precents/opencv/2.4.9-08/opencv-macosx-x86_64.jar is available (actual file) but for some reason the POM looks for Mac OS X (with spaces) to download into my script.

Cannot Resolve 'FFmpegFrameGrabber'

I'm building my progect by maven:

<repository>
          <id>sonatype-nexus-staging</id>
          <name>Sonatype Nexus Staging</name>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>

and

<dependency>
          <groupId>org.bytedeco</groupId>
          <artifactId>javacpp</artifactId>
          <version>0.9</version>
</dependency>
<dependency>
          <groupId>org.bytedeco</groupId>
          <artifactId>javacv</artifactId>
          <version>0.9</version>
</dependency>

But "FFmpegFrameGrabber" is missing.

Samples

I have noticed alot of your samples use javacpp.opencv_core
I am using it in my android project and I cannot import those at all.
I am able to use org.bytedeco.javacv.* classes but anything else like the IplImage is not available, and it is something that I need for better face detection in images.

I have added:

opencv-android-arm.jar
javacpp.jar
javacv.jar
ffmpeg-android-arm.jar

as stated in the readme (gave up on gradle implementation)
but none of the samples themselves work

Where are CvPoint and CvScalar constructors?

In many places in my project I used similar lines:
CvScalar scalar=new CvScalar(0,1,2,3);
CvPoint point = new CvPoint(0,0)

then I changed library imports from com.googlecode. .... to org.bytedeco.javacpp. ...
(and library version from 0.7 to 0.8)

Now, although I use in my project this lines:
import org.bytedeco.javacpp.opencv_core.CvScalar;
import org.bytedeco.javacpp.opencv_core.CvPoint;

I don't see proper constructors (and generally class:
public static class CvScalar extends Pointer{..}).
Am I missed something or they shouldn't be avaible in ver. 0.8?

probably bug - NPE from Codec.java

Hi,
I just checked out compiled and ran the master
I got a NullPointerException from Codec.getInstalledCodecs() method, from line 258.

This is it:
String longName = codec.long_name().getString();

I had to change it to this:
String longName = codec.long_name() != null ? codec.long_name().getString() : "null";

Worked fine afterwards. Did anyone has this issue as well?

building javacv 0.8 failed

Dear Samuel,
im trying to build javacv for android and im having some issues.

note: build command: mvn -Dplatform=android-arm -Pffmpeg,opencv install

[INFO] --- maven-javadoc-plugin:2.9:jar (attach-javadocs) @ javacv ---
[ERROR] Error fetching link: http://bytedeco.org/javacpp-presets/opencv/apidocs/package-list. Ignored it.
[ERROR] Error fetching link: http://bytedeco.org/javacpp-presets/ffmpeg/apidocs/package-list. Ignored it.
[ERROR] Error fetching link: http://bytedeco.org/javacpp-presets/flycapture/apidocs/package-list. Ignored it.
[ERROR] Error fetching link: http://bytedeco.org/javacpp-presets/libdc1394/apidocs/package-list. Ignored it.
[ERROR] Error fetching link: http://bytedeco.org/javacpp-presets/libfreenect/apidocs/package-list. Ignored it.
[ERROR] Error fetching link: http://bytedeco.org/javacpp-presets/videoinput/apidocs/package-list. Ignored it.
[ERROR] Error fetching link: http://bytedeco.org/javacpp-presets/artoolkitplus/apidocs/package-list. Ignored it.
[ERROR] Error fetching link: http://bytedeco.org/javacpp-presets/opencv/apidocs/package-list. Ignored it.
[ERROR] Error fetching link: http://bytedeco.org/javacpp-presets/ffmpeg/apidocs/package-list. Ignored it.
[ERROR] Error fetching link: http://bytedeco.org/javacpp-presets/flycapture/apidocs/package-list. Ignored it.
[ERROR] Error fetching link: http://bytedeco.org/javacpp-presets/libdc1394/apidocs/package-list. Ignored it.
[ERROR] Error fetching link: http://bytedeco.org/javacpp-presets/libfreenect/apidocs/package-list. Ignored it.
[ERROR] Error fetching link: http://bytedeco.org/javacpp-presets/videoinput/apidocs/package-list. Ignored it.
[ERROR] Error fetching link: http://bytedeco.org/javacpp-presets/artoolkitplus/apidocs/package-list. Ignored it.
[INFO]

is there something wrong with the repository, or i'm not following the instructions correctly...

thanks for you time

How can I know which .so files to keep in Android?

Hi, I'm very pleased with this library, it saved me lots of time by not having to deal with ffmpeg directly in Android.
One thing that worries me is the size of resulting /libs/armeabi folder - I followed the instructions in the readme and right now it's almost 36MB (which is a lot for an Android app)
As I'm using only a two javacv's classes in my code (FFmpegFrameRecorder and opencv_core.IplImage) I'm pretty sure I could ditch most of the .so files - how can I find out which ones?

UnsatisfiedLinkError org.bytedeco.javacpp.opencv_core$Mat.allocate()

Using the new 0.8 release of JavaCV I get the following exception as soon as I try to instantiate a Mat object:

Exception in thread "Thread-1" java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.opencv_core$Mat.allocate()V at org.bytedeco.javacpp.opencv_core$Mat.allocate(Native Method) at org.bytedeco.javacpp.opencv_core$Mat.(opencv_core.java:6210) at org.bytedeco.javacpp.helper.opencv_core$AbstractMat.(opencv_core.java:2371)

All needed libraries are included via Maven. As far as I see it is not a missing library problem. My assumption is that java native interface and library function are not matching completely.

java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path

i'm using javacv 0.9 and installed opencv2.4.9,

i have C:\opencv\build\x64\vc10\bin; in my windows system path

Am i missing anything ? please guide

i'm getting the following error when i tried to run an example

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:535)
at org.bytedeco.javacpp.Loader.load(Loader.java:410)
at org.bytedeco.javacpp.Loader.load(Loader.java:353)
at org.bytedeco.javacpp.opencv_core.(opencv_core.java:10)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.bytedeco.javacpp.Loader.load(Loader.java:385)
at org.bytedeco.javacpp.Loader.load(Loader.java:353)
at org.bytedeco.javacpp.opencv_highgui.(opencv_highgui.java:13)
at draw.main(draw.java:10)
Caused by: java.lang.UnsatisfiedLinkError: C:\opencv\build\x64\vc10\bin\opencv_core249.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1732)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:535)
at org.bytedeco.javacpp.Loader.load(Loader.java:401)
... 8 more

Issue with Maven and OS X UnsatisfiedLinkError org.bytedeco.javacpp.opencv_core

Hi. I'm trying to use JavaCV for an easy Jetty Server. It builds just fine, but when initializing the Class that uses JavaCV the first time the whole thing crashes with:

java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1764) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1044) at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:535) at org.bytedeco.javacpp.Loader.load(Loader.java:410) at org.bytedeco.javacpp.Loader.load(Loader.java:353) at org.bytedeco.javacpp.opencv_core.<clinit>(opencv_core.java:10) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:249) at org.bytedeco.javacpp.Loader.load(Loader.java:385) at org.bytedeco.javacpp.Loader.load(Loader.java:353) at org.bytedeco.javacpp.opencv_core$Algorithm.<clinit>(opencv_core.java:8797) at uos.jhoffjann.server.logic.OCV.<init>(OCV.java:22)

I got the JavaCV libraries as described here. Am I just missing the platform.dependeciespart? I wasn't able to find a Maven property which is called like that, so I couldn't activate it.

This is the relevant part in my pom.xml:

<dependency>
        <groupId>org.bytedeco</groupId>
        <artifactId>javacpp</artifactId>
        <version>0.9</version>
    </dependency>
     <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>opencv</artifactId>
        <version>2.4.9-0.9</version>
    </dependency>
    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>ffmpeg</artifactId>
        <version>2.3-0.9</version>
    </dependency>
    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>flycapture</artifactId>
        <version>2.6.3.4-0.9</version>
    </dependency>
    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>libdc1394</artifactId>
        <version>2.2.2-0.9</version>
    </dependency>
    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>libfreenect</artifactId>
        <version>0.5-0.9</version>
    </dependency>
    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>videoinput</artifactId>
        <version>0.200-0.9</version>
    </dependency>
    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>artoolkitplus</artifactId>
        <version>2.3.0-0.9</version>
    </dependency>
    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>flandmark</artifactId>
        <version>1.07-0.9</version>
    </dependency>
    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>fftw</artifactId>
        <version>3.3.4-0.9</version>
    </dependency>
    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>gsl</artifactId>
        <version>1.16-0.9</version>
    </dependency>
    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>llvm</artifactId>
        <version>3.4.2-0.9</version>
    </dependency>
    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>leptonica</artifactId>
        <version>1.71-0.9</version>
    </dependency>
    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>tesseract</artifactId>
        <version>3.03-rc1-0.9</version>
    </dependency>
    <dependency>
        <groupId>org.bytedeco</groupId>
        <artifactId>javacv</artifactId>
        <version>0.9</version>
    </dependency>

`
I would be extremely glad for any help.

No jniopencv_core in java.library.path on Odroid X2 Ubuntu 14.04

I am trying to get JavaCV running on my Odroid X2 ARM based board with Ubuntu 14.04 LTS. I have got a simple demo program, where I want to connect to a camera attached an output the video stream. On my windows PC it works perfectly, but running the jar on the Odroid causes the following errors:

Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
   at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
    at java.lang.Runtime.loadLibrary0(Runtime.java:849)
    at java.lang.System.loadLibrary(System.java:1088)
    at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:535)
    at org.bytedeco.javacpp.Loader.load(Loader.java:410)
    at org.bytedeco.javacpp.Loader.load(Loader.java:353)
    at org.bytedeco.javacpp.opencv_core.<clinit>(opencv_core.java:10)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:270)
    at org.bytedeco.javacpp.Loader.load(Loader.java:385)
    at org.bytedeco.javacpp.Loader.load(Loader.java:353)
    at org.bytedeco.javacpp.opencv_highgui.<clinit>(opencv_highgui.java:13)
    at org.bytedeco.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:174)
    at CameraTest.main(CameraTest.java:11)
    ... 5 more
Caused by: java.lang.UnsatisfiedLinkError: no tbb in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
    at java.lang.Runtime.loadLibrary0(Runtime.java:849)
    at java.lang.System.loadLibrary(System.java:1088)
    at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:535)
    at org.bytedeco.javacpp.Loader.load(Loader.java:401)
    ... 14 more

I had nearly the same problem on my MacBook Pro. Changing the library file opencv.jar to opencv-2.4.10-0.9.1-20141109.113201-4-macosx-x86_64.jar was the solution.

Are you able to help?

Thanks!

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "av_input_audio_device_next" referenced by "libjniavdevice.so"...

When I use FFmpegFrameGrabber function, I met below errors:
FrameGrabber grabber1 = new FFmpegFrameGrabber("/mnt/sdcard/1.mp4");

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "av_input_audio_device_next" referenced by "libjniavdevice.so"...
at java.lang.Runtime.loadLibrary(Runtime.java:361)
at java.lang.System.loadLibrary(System.java:525)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:535)
at org.bytedeco.javacpp.Loader.load(Loader.java:410)
at org.bytedeco.javacpp.Loader.load(Loader.java:353)
at org.bytedeco.javacpp.avdevice.(avdevice.java:18)
at org.bytedeco.javacv.FFmpegFrameGrabber.(FFmpegFrameGrabber.java:104)
at com.test.MainActivity.recordImage(MainActivity.java:118)
at com.test.MainActivity.onCreate(MainActivity.java:67)
at android.app.Activity.performCreate(Activity.java:5161)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5119)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:749)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:565)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load gnustl_static from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.ltest-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.est-2, /vendor/lib, /system/lib]]]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:355)
at java.lang.System.loadLibrary(System.java:525)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:535)
at org.bytedeco.javacpp.Loader.load(Loader.java:401)
ย ย ย ย ย ย ย ย ย ย ย ย at org.bytedeco.javacpp.Loader.load(Loader.java:353)
ย ย ย ย ย ย ย ย ย ย ย ย at org.bytedeco.javacpp.avdevice.(avdevice.java:18)
ย ย ย ย ย ย ย ย ย ย ย ย at org.bytedeco.javacv.FFmpegFrameGrabber.(FFmpegFrameGrabber.java:104)
ย ย ย ย ย ย ย ย ย ย ย ย at com.test.MainActivity.recordImage(MainActivity.java:118)
ย ย ย ย ย ย ย ย ย ย ย ย at com.test.MainActivity.onCreate(MainActivity.java:67)
ย ย ย ย ย ย ย ย ย ย ย ย at android.app.Activity.performCreate(Activity.java:5161)
ย ย ย ย ย ย ย ย ย ย ย ย at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
ย ย ย ย ย ย ย ย ย ย ย ย at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
ย ย ย ย ย ย ย ย ย ย ย ย at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
ย ย ย ย ย ย ย ย ย ย ย ย at android.app.ActivityThread.access$600(ActivityThread.java:141)
ย ย ย ย ย ย ย ย ย ย ย ย at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
ย ย ย ย ย ย ย ย ย ย ย ย at android.os.Handler.dispatchMessage(Handler.java:99)
ย ย ย ย ย ย ย ย ย ย ย ย at android.os.Looper.loop(Looper.java:137)
ย ย ย ย ย ย ย ย ย ย ย ย at android.app.ActivityThread.main(ActivityThread.java:5119)
ย ย ย ย ย ย ย ย ย ย ย ย at java.lang.reflect.Method.invokeNative(Native Method)
ย ย ย ย ย ย ย ย ย ย ย ย at java.lang.reflect.Method.invoke(Method.java:525)
ย ย ย ย ย ย ย ย ย ย ย ย at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:749)
ย ย ย ย ย ย ย ย ย ย ย ย at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:565)
ย ย ย ย ย ย ย ย ย ย ย ย at dalvik.system.NativeStart.main(Native Method)

JavaCV is too slow on Android

Hi Samuel,

As I said in my previous issues, I am trying to capture a video directly from the camera,
the only problem is it process the frames to slow, and cause a big frame loss (10 sec video can shrink into a 3-4 seconds video).

If I set the preset vaue to "ultrafast" everything goes smoothly, but the video quality is too low,
I am trying to understand how can I configure ffmpeg to work at the same quality of the native camera's API.

My configs are:
Video size: 720x1280
Codec: H264
FrameRate: 30
Bitrate: 2500000

I am using LG G2 with Android 4.2.2 (which can take even FHD video with the native camera's API), and its true for many other devices I tried.

Here is a sample of my code:

    opencv_core.IplImage mFrame = opencv_core.IplImage.create(videoProfile.width, videoProfile.height, opencv_core.IPL_DEPTH_8U, 2);
    FFmpegFrameRecorder  mFrameRecorder = new FFmpegFrameRecorder(filePath, videoProfile.width, videoProfile.height, 1);
    mFrameRecorder.setFormat(mp4 ? "mp4" : "flv");
    mFrameRecorder.setSampleRate(videoProfile.audioSampleRate);
    mFrameRecorder.setAudioCodec(avcodec.AV_CODEC_ID_AAC);
    mFrameRecorder.setFrameRate(videoProfile.frameRate);
    mFrameRecorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
    mFrameRecorder.setVideoOption("preset", "ultrafast");
    mFrameRecorder.start();
    long mStartTime = System.currentTimeMillis();

And for each frame I receive from the camera:

    mFrame.getByteBuffer().put(frameBytes);
    long timestamp  = 1000 * (System.currentTimeMillis() - mStartTime);
    if (timestamp > mFrameRecorder.getTimestamp()) {
        mFrameRecorder.setTimestamp(timestamp);
    }

    mFrameRecorder.record(mFrame);

For each frame I get from the audio recorder:

    mFrameRecorder.record(ShortBuffer.wrap(frameBytes, 0, count));

thanks,
Shuky

Turning On/Off Audio recording while Streaming

Hi,

I am streaming video android to android with this library and it works great. However I am facing an issue in streaming only video without audio with RTMP.

In Record Activity , when I tries to stop audio recording with a flag and then again change value of flag and start audio recording , at that time I find streaming is not sync between audio and video and video streaming is having too much delay while audio stream is live.And both have too much glitches.

Any help would be much appreciated.

Following is my code

public class MainActivity extends Activity implements OnClickListener {

    private final static String LOG_TAG = "MainActivity";

    private PowerManager.WakeLock mWakeLock;

    private String ffmpeg_link = "rtmp://192.168.2.220:1935/videochat/vb";

    private volatile FFmpegFrameRecorder recorder;
    boolean recording = false;
    long startTime = 0;

    private int sampleAudioRateInHz = 44100;
    private int imageWidth = 320;
    private int imageHeight = 240;
    private int frameRate = 30;

    private Thread audioThread;
    volatile boolean runAudioThread = true;
    private volatile AudioRecord audioRecord;
    private AudioRecordRunnable audioRecordRunnable;

    private CameraView cameraView;
    private IplImage yuvIplimage = null;

    private Button recordButton, audio_control;
    private LinearLayout mainLayout;

    private volatile boolean audioStatus = true;



    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        setContentView(R.layout.activity_main);

        initLayout();
        initRecorder();
    }

    @Override
    protected void onResume() {
        super.onResume();

        if (mWakeLock == null) {
            PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
            mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, LOG_TAG);
            mWakeLock.acquire();
        }
    }

    @Override
    protected void onPause() {
        super.onPause();

        if (mWakeLock != null) {
            mWakeLock.release();
            mWakeLock = null;
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

        recording = false;
    }

    private void initLayout() {

        mainLayout = (LinearLayout) this.findViewById(R.id.record_layout);

        recordButton = (Button) findViewById(R.id.recorder_control);
        audio_control = (Button) findViewById(R.id.audio_control);

        audio_control.setText("off");
        recordButton.setText("Start");

        audio_control.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                if (audio_control.getText().toString().equals("off")) {
                    audioStatus = false;
                    audio_control.setText("on");
                } else {
                    startTime = System.currentTimeMillis();
                    audioStatus = true;
                    audio_control.setText("off");
                }

            }
        });
        recordButton.setOnClickListener(this);

        cameraView = new CameraView(this);

        LinearLayout.LayoutParams layoutParam = new LinearLayout.LayoutParams(imageWidth, imageHeight);
        mainLayout.addView(cameraView, layoutParam);
        Log.v(LOG_TAG, "added cameraView to mainLayout");
    }

    private void initRecorder() {
        Log.w(LOG_TAG, "initRecorder");

        if (yuvIplimage == null) {
            yuvIplimage = IplImage.create(imageWidth, imageHeight, opencv_core.IPL_DEPTH_8U, 2);
            Log.v(LOG_TAG, "IplImage.create");
        }

        recorder = new FFmpegFrameRecorder(ffmpeg_link, imageWidth, imageHeight, 1);
        Log.v(LOG_TAG, "FFmpegFrameRecorder: " + ffmpeg_link + " imageWidth: " + imageWidth + " imageHeight " + imageHeight);
        recorder.setInterleaved(false);
        recorder.setFormat("flv");
        Log.v(LOG_TAG, "recorder.setFormat(\"flv\")");

        recorder.setSampleRate(sampleAudioRateInHz);
        Log.v(LOG_TAG, "recorder.setSampleRate(sampleAudioRateInHz)");

        // re-set in the surface changed method as well
        recorder.setFrameRate(frameRate);
        Log.v(LOG_TAG, "recorder.setFrameRate(frameRate)");

        // Create audio recording thread
        audioRecordRunnable = new AudioRecordRunnable();
        audioThread = new Thread(audioRecordRunnable);
    }

    // Start the capture
    public void startRecording() {
        try {
            recorder.start();
            startTime = System.currentTimeMillis();
            recording = true;
            audioThread.start();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void stopRecording() {
        // This should stop the audio thread from running
        runAudioThread = false;

        if (recorder != null && recording) {
            recording = false;
            Log.v(LOG_TAG, "Finishing recording, calling stop and release on recorder");
            try {
                recorder.stop();
                recorder.release();
            } catch (Exception e) {
                e.printStackTrace();
            }
            recorder = null;
        }
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        // Quit when back button is pushed
        if (keyCode == KeyEvent.KEYCODE_BACK) {
            if (recording) {
                stopRecording();
            }
            finish();
            return true;
        }
        return super.onKeyDown(keyCode, event);
    }

    @Override
    public void onClick(View v) {
        if (!recording) {
            startRecording();
            Log.w(LOG_TAG, "Start Button Pushed");
            recordButton.setText("Stop");
        } else {
            stopRecording();
            Log.w(LOG_TAG, "Stop Button Pushed");
            recordButton.setText("Start");
        }
    }

    // ---------------------------------------------
    // audio thread, gets and encodes audio data
    // ---------------------------------------------
    class AudioRecordRunnable implements Runnable {

        @SuppressWarnings("deprecation")
        @Override
        public void run() {
            // Set the thread priority
            android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);

            // Audio
            int bufferSize;
            short[] audioData;
            int bufferReadResult;

            bufferSize = AudioRecord.getMinBufferSize(sampleAudioRateInHz, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT);
            audioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC, sampleAudioRateInHz, AudioFormat.CHANNEL_CONFIGURATION_MONO,
                    AudioFormat.ENCODING_PCM_16BIT, bufferSize);

            audioData = new short[bufferSize];

            Log.d(LOG_TAG, "audioRecord.startRecording()");
            audioRecord.startRecording();

            // Audio Capture/Encoding Loop
            while (runAudioThread) {
                if (audioStatus) {
                    // Read from audioRecord
                    bufferReadResult = audioRecord.read(audioData, 0, audioData.length);
                    if (bufferReadResult > 0) {
                        // Log.v(LOG_TAG,"audioRecord bufferReadResult: " +
                        // bufferReadResult);
                        try {
                            // Write to FFmpegFrameRecorder
                            Buffer[] buffer = { ShortBuffer.wrap(audioData, 0, bufferReadResult) };
                            recorder.record(buffer);
                        } catch (Exception e) {
                            Log.v(LOG_TAG, e.getMessage());
                            e.printStackTrace();
                        }
                    }
                }
            }

            Log.v(LOG_TAG, "AudioThread Finished");

            /* Capture/Encoding finished, release recorder */
            if (audioRecord != null) {
                audioRecord.stop();
                audioRecord.release();
                audioRecord = null;
                Log.v(LOG_TAG, "audioRecord released");
            }
        }
    }
    class CameraView extends SurfaceView implements SurfaceHolder.Callback, PreviewCallback {

        private boolean previewRunning = false;

        private SurfaceHolder holder;
        private Camera camera;

        private byte[] previewBuffer;

        long videoTimestamp = 0;

        Bitmap bitmap;
        Canvas canvas;

        public CameraView(Context _context) {
            super(_context);

            holder = this.getHolder();
            holder.addCallback(this);
            holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
        }

        @Override
        public void surfaceCreated(SurfaceHolder holder) {
            camera = Camera.open();

            try {
                camera.setPreviewDisplay(holder);
                camera.setPreviewCallback(this);

                Camera.Parameters currentParams = camera.getParameters();
                Log.v(LOG_TAG, "Preview Framerate: " + currentParams.getPreviewFrameRate());
                Log.v(LOG_TAG, "Preview imageWidth: " + currentParams.getPreviewSize().width + " imageHeight: "
                        + currentParams.getPreviewSize().height);

                // Use these values
                imageWidth = currentParams.getPreviewSize().width;
                imageHeight = currentParams.getPreviewSize().height;
                frameRate = currentParams.getPreviewFrameRate();

                bitmap = Bitmap.createBitmap(imageWidth, imageHeight, Bitmap.Config.ALPHA_8);


                camera.startPreview();
                previewRunning = true;
            } catch (IOException e) {
                Log.v(LOG_TAG, e.getMessage());
                e.printStackTrace();
            }
        }

        public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
            Log.v(LOG_TAG, "Surface Changed: width " + width + " height: " + height);


            // Get the current parameters
            Camera.Parameters currentParams = camera.getParameters();
            Log.v(LOG_TAG, "Preview Framerate: " + currentParams.getPreviewFrameRate());
            Log.v(LOG_TAG, "Preview imageWidth: " + currentParams.getPreviewSize().width + " imageHeight: " + currentParams.getPreviewSize().height);

            // Use these values
            imageWidth = currentParams.getPreviewSize().width;
            imageHeight = currentParams.getPreviewSize().height;
            frameRate = currentParams.getPreviewFrameRate();

            // Create the yuvIplimage if needed
            yuvIplimage = IplImage.create(imageWidth, imageHeight, opencv_core.IPL_DEPTH_8U, 2);
        }

        @Override
        public void surfaceDestroyed(SurfaceHolder holder) {
            try {
                camera.setPreviewCallback(null);

                previewRunning = false;
                camera.release();

            } catch (RuntimeException e) {
                Log.v(LOG_TAG, e.getMessage());
                e.printStackTrace();
            }
        }

        @Override
        public void onPreviewFrame(byte[] data, Camera camera) {

            if (yuvIplimage != null && recording) {
                videoTimestamp = 1000 * (System.currentTimeMillis() - startTime);

                yuvIplimage.getByteBuffer().put(data);
                try {
                    // Get the correct time
                    recorder.setTimestamp(videoTimestamp);

                    // Record the image into FFmpegFrameRecorder
                    recorder.record(yuvIplimage);

                } catch (Exception e) {
                    Log.v(LOG_TAG, e.getMessage());
                    e.printStackTrace();
                }
            }
        }
    }
}

maven example missing / improve maven central deployment?

Please add a simple maven example that demonstrates how to set up a simple javacv based project using maven and add it to the integration tests.

I tried adding

    <dependency>
        <groupId>org.bytedeco</groupId>
        <artifactId>javacv</artifactId>
        <version>0.9</version>
    </dependency>

as suggested. However, "mvn dependency:tree" does not show any binary dependency (*-bin.zip):

[INFO] +- org.bytedeco:javacv:jar:0.9:compile
[INFO] | +- org.bytedeco:javacpp:jar:0.9:compile
[INFO] | +- org.bytedeco.javacpp-presets:opencv:jar:2.4.9-0.9:compile
[INFO] | +- org.bytedeco.javacpp-presets:ffmpeg:jar:2.3-0.9:compile
[INFO] | +- org.bytedeco.javacpp-presets:flycapture:jar:2.6.3.4-0.9:compile
[INFO] | +- org.bytedeco.javacpp-presets:libdc1394:jar:2.2.2-0.9:compile
[INFO] | +- org.bytedeco.javacpp-presets:libfreenect:jar:0.5-0.9:compile
[INFO] | +- org.bytedeco.javacpp-presets:videoinput:jar:0.200-0.9:compile
[INFO] | - org.bytedeco.javacpp-presets:artoolkitplus:jar:2.3.0-0.9:compile

Unable to retrieve javacv-0.1-windows-x86_64.jar via maven

Hi,

JavaCV is a transitive dependency of some software I'm attempting to build with maven and it keeps failing with 403 errors. It seems that the following file is inaccessible:

http://maven2.javacv.googlecode.com/git/com/googlecode/javacv/javacv/0.1/javacv-0.1-windows-x86_64.jar

All the other files in the directory seem ok, perhaps it's a file permissions problem?

It was failing yesterday (2nd June) and is still failing this morning (3rd June)

Thanks!

CanvasFrame blank (on mac with java 7)

What steps will reproduce the problem?

  1. Create a windowed CanvasFrame: CanvasFrame frame = new CanvasFrame("Some Title");
  2. Load + Show an image: frame.showImage(ImageIO.read(..));

What is the expected output? What do you see instead?
The image is expected, but only an empty window is shown.

What version of the product are you using? On what operating system?

org.bytedeco.javacv, v0.9

Mac 10.9.5

> java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

Please provide any additional information below.

What I found is that canvas.createBufferStrategy(2); was failing in CanvasFrame.initCanvas() . It looks like the createBufferStrategy thread is attempting a first paint and failing because the size hasn't been set yet (if you catch the runtime exception, it shows: "java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0")

lwjgl has a similar issue that's addressed in: http://lwjgl.org/forum/index.php?topic=3341.0

My quick fix has been to set a small size for the canvas in the initCanvas method:

if (fullScreen) {
    canvas.setSize(getSize());
    needInitialResize = false;
} else {
    canvas.setSize(10,10); // mac bug
    needInitialResize = true;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.