javacv | Java interface to OpenCV FFmpeg | Computer Vision library

 by   bytedeco Java Version: 1.5.8 License: Non-SPDX

kandi X-RAY | javacv Summary

kandi X-RAY | javacv Summary

javacv is a Java library typically used in Artificial Intelligence, Computer Vision, OpenCV applications. javacv has no bugs, it has no vulnerabilities, it has build file available and it has high support. However javacv has a Non-SPDX License. You can download it from GitHub, Maven.

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] #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…​.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              javacv has a highly active ecosystem.
              It has 6700 star(s) with 1516 fork(s). There are 247 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 330 open issues and 1546 have been closed. On average issues are closed in 83 days. There are 4 open pull requests and 0 closed requests.
              It has a positive sentiment in the developer community.
              The latest version of javacv is 1.5.8

            kandi-Quality Quality

              javacv has 0 bugs and 0 code smells.

            kandi-Security Security

              javacv has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              javacv code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              javacv has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              javacv releases are available to install and integrate.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              javacv saves you 22641 person hours of effort in developing the same functionality from scratch.
              It has 44978 lines of code, 2078 functions and 116 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed javacv and discovered the below as its top functions. This is intended to give you an instant insight into javacv implemented functionality, and help decide if they suit your requirements.
            • Performs blobs analysis on the input image
            • Sets hysteresis threshold .
            • Record samples .
            • Performs regularization .
            • Finds the squares in the given image .
            • Release unsafe data .
            • Detects markers inside an image .
            • Starts the video filtering .
            • Calculates stereo calibration .
            • Clone the source buffers .
            Get all kandi verified functions for this library.

            javacv Key Features

            No Key Features are available at this moment for javacv.

            javacv Examples and Code Snippets

            No Code Snippets are available at this moment for javacv.

            Community Discussions

            QUESTION

            Create a video form images and videos and add audio to it programatically | Java, Python, ffmpeg
            Asked 2022-Feb-17 at 20:07

            I want to create a new video (finalVideo.mp4) with:

            1. 3 image files image1.jpg, image2.jpg, image3.jpg, each image to be seen for 4 seconds
            2. 1 video file (video1.mp4), lasts for about 30 seconds with a frame rate of 30fps
            3. 1 audio file (audio1.mp3)

            In the final video (finalVideo.mp4) I want the audio (audio1.mp3) to play only when the images are present and the video's (video1.mp4) audio when the video is present.

            For example: The final video (finalVideo.mp4) contains image1.jpg, video1.mp4, image2.jpg and image3.jpg (in order). The audio (audio1.mp3) should play for the first 4 seconds, then the video's (video1.mp4) audio for the next 30 seconds and then the audio (audio1.mp3) for the next 8 (4*2) seconds.

            Please let me know how to do this programmatically. I was hoping to figure this out using Java (JavaCV) or Python (OpenCV). But there is no programming language restriction as such, the answer can be in any language.

            EDIT 1

            Here is my attempt at making this work:

            ...

            ANSWER

            Answered 2022-Feb-17 at 20:07

            You can do the same with the audio, use -ss and -t input options to control where to clip it.

            Source https://stackoverflow.com/questions/71162972

            QUESTION

            How do I successfully run JavaCV code example (JavaFxPlayVideoAndAudio.java)
            Asked 2021-Dec-04 at 21:13

            I have an issue with running JavaCV/JavaFX example: JavaFxPlayVideoAndAudio.java. I cannot make it working. I got an error messages as listed bellow:

            ...

            ANSWER

            Answered 2021-Dec-04 at 21:13

            The program tries to get the value of the first parameter but it does not check if the latter is provided.

            You need to call the program with a videoFileName as a first parameter.

            Source https://stackoverflow.com/questions/70226657

            QUESTION

            OpenCV Get the Shape of the Matrix
            Asked 2021-Oct-29 at 04:26

            I'm using this library to explore OpenCV: https://github.com/bytedeco/javacv

            I'm trying to understand how I could get the shape of my Matrix. In Python, this would be something like:

            ...

            ANSWER

            Answered 2021-Oct-29 at 04:26

            There seems to be no in-built function, but this could be just done like this:

            Source https://stackoverflow.com/questions/69763594

            QUESTION

            Can i select the only packages I used within my maven dependecies to export a runnable jar in eclipse?
            Asked 2021-Feb-11 at 02:07

            I'm using Javacpp in a Java application. Inside my pom I have:

            org.bytedeco javacv-platform 1.5.1

            and the only imports I have in the project are related with ffmpeg and opencv. However, when I create the runnable Jar, it is huge (hundreds of megabytes) because it has a lot of jars from other packages that come with javacv-platform that are useless for me (I can see them inside maven dependecies). Is there anyway to remove the packages I never used inside this dependency? Beacause I can see all of them inside the runnable jar I create.

            ...

            ANSWER

            Answered 2021-Feb-11 at 02:07

            Yes, you can just exclude what you don't need, like this:

            Source https://stackoverflow.com/questions/66147604

            QUESTION

            Play an ARGB .mov video in a transparent JWindow
            Asked 2021-Jan-15 at 07:32

            I'm trying to code a splash screen for my program cause it takes too long to open.

            I managed to do it with an image but I have no idea how to do it with an ARGB video.

            First, I've tried with an image: (on a JWindow extended class)

            ...

            ANSWER

            Answered 2021-Jan-15 at 07:32

            Thanks to Samuel Audet, i figured out that The pixel format of the frames returned by FFmpeg is RGBA, not ARGB.

            We can easily change the FFMpegFrameGrabber's pixel format by calling setPixelFormat() before start().

            There is a list of every avaible pixel format here: list

            In my case, this is the final solution:

            Source https://stackoverflow.com/questions/65563008

            QUESTION

            Add JavaCV as a dependency, to run on a Raspberry PI?
            Asked 2020-Nov-01 at 12:19

            JavaCV documentation says I should use this to add JavaCV as a dependency to my project;

            ...

            ANSWER

            Answered 2020-Nov-01 at 12:19

            After some research I've found that this is easily done using the "platform plugin of Gradle JavaCPP":

            http://bytedeco.org/builds/

            https://github.com/bytedeco/gradle-javacpp#the-platform-plugin

            Using said plugin you can specify the target platform with : gradle -PjavacppPlatform=linux-armhf and only the needed platform dependencies will be used.

            You also can look at the example:

            https://github.com/bytedeco/gradle-javacpp/tree/master/samples/javacv-demo

            I've tried building the example and a uber-jar of "only" around 100Mb is generated.

            I think you could also add some exclusions to eliminate unneeded libs and further reduce the size of the jar.

            Source https://stackoverflow.com/questions/64625896

            QUESTION

            java.lang.NoSuchMethodError: okhttp3.internal.Platform.log AND Exception in thread "Okhttp Dispatcher" java.lang.NoSuchFieldError: INSTANCE
            Asked 2020-Oct-26 at 13:14

            Help me, please. I have okhttp3 and logging-interceptor 4.7.2 versions. I have java.lang.NoSuchMethodError: okhttp3.internal.Platform.log in "Okhttp Dispatcher" thread when I call ONVIF getDeviceInformation. If I set okhttp3 3.14.7 version I have java.lang.NoSuchFieldError: INSTANCE in "Okhttp Dispatcher" thread.

            ...

            ANSWER

            Answered 2020-Jun-04 at 12:40

            I have okhttp3 and logging-interceptor 4.7.2 versions. I have java.lang.NoSuchMethodError: okhttp3.internal.Platform.log

            It is a Dependency issue, You are using :

            1. okhttp-4.7.2
            2. logging-interceptor-4.7.2
            3. okhttp-digest-2.0

            And Runtime dependency of okhttp-digest-2.0 is okhttp-4.0.1

            Maven Repo: https://mvnrepository.com/artifact/com.burgstaller/okhttp-digest/2.0

            So now you have two different versions of same library

            1.okhttp-4.0.1 from okhttp-digest-2.0

            2.okhttp-4.7.2

            There was a change in log function(Which is what error is saying NoSuchMethodError:okhttp3.internal.Platform.log) we can see in the image

            Solutions:

            1. You Can Update version of okhttp-digest which can work with okhttp-4.7.2
            2. You could exclude the okhttp dependency from okhttl-digest if you're not using the features relying on it.

            Source https://stackoverflow.com/questions/62189818

            QUESTION

            SQL syntax error in unit tests, after upgrade from Spring Boot 1.5.21 to 2.3.4
            Asked 2020-Oct-05 at 09:31

            There is an application written with Spring Boot 1.5.21. I'm asked to upgrade it to Spring Boot 2.3.4, and fix the errors the upgrade brings. Apparently, this didn't go well since I'm merely a beginner on many things. I've been able to solve some errors due to dependency changes, by googling. But the one I'm going to ask took me hours yet I didn't even see a clue of it.

            Directly this is the error message shown by IntelliJ:

            ...

            ANSWER

            Answered 2020-Oct-05 at 09:31

            The solution is simple and also really silly IMHO.

            In src/test/resources/application.yml, previously it was

            Source https://stackoverflow.com/questions/64150745

            QUESTION

            Java open CV hangs on VideoCapture for file if openCV is loaded with nu.pattern.OpenCV.loadShared();
            Asked 2020-Sep-30 at 08:26

            I have a sample code from https://ratiler.wordpress.com/2014/09/08/detection-de-mouvement-avec-javacv/ with small difference in loading the open cv library in the static block using nu.pattern.OpenCV.loadShared(); :

            ...

            ANSWER

            Answered 2020-Sep-30 at 08:26

            It was a licensing issue that made impossible to include ffmpeg to

            Source https://stackoverflow.com/questions/64128337

            QUESTION

            java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat(IIILjava/nio/ByteBuffer;)J
            Asked 2020-Jul-24 at 15:30

            I'm work on project using JavaFX and JavaCV. My main feature in app is based on webcam capture. I'm looking for a way to display frame from OpenCVFrameGrabber into JavaFX component.

            I found a way to do it but I get the following error:

            ...

            ANSWER

            Answered 2020-Jul-24 at 15:30

            This question java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat(III)J? answers why you are getting that UnsatisfiedLinkError; the library for OpenCV is not loaded by your Java VM and therefore the relevant native calls cannot be made.

            This question How to use opencv in using Gradle? should help you with configuring OpenCV using Gradle.

            Per your comment question "I have a requirement for the application to work on Windows 10, Linux and MacOS." I don't know how to solve that using gradle, however in Java I would inject a different system property per o/s and use that in a static block in your class to load your library:

            Source https://stackoverflow.com/questions/63056169

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install javacv

            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:.
            In the Projects window, right-click the Libraries node of your project, and select "Add JAR/Folder…​".
            Locate the JAR files, select them, and click OK.
            Navigate to Project > Properties > Java Build Path > Libraries and click "Add External JARs…​".
            Locate the JAR files, select them, and click OK.
            Follow the instructions on this page: http://developer.android.com/training/basics/firstapp/
            Copy all the JAR files into the app/libs subdirectory.
            Navigate to File > Project Structure > app > Dependencies, click +, and select "2 File dependency".
            Select all the JAR files from the libs subdirectory.
            [OpenCV documentation](http://docs.opencv.org/master/)
            [FFmpeg documentation](http://ffmpeg.org/doxygen/trunk/)
            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.
            Maven 3.x http://maven.apache.org/download.html
            JavaCPP 1.5.6 https://github.com/bytedeco/javacpp
            JavaCPP Presets 1.5.6 https://github.com/bytedeco/javacpp-presets
            http://bytedeco.org/builds/

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
            Maven
            Gradle
            CLONE
          • HTTPS

            https://github.com/bytedeco/javacv.git

          • CLI

            gh repo clone bytedeco/javacv

          • sshUrl

            git@github.com:bytedeco/javacv.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link