Repolode
bytedeco

bytedeco/javacv

Java wrappers and helper classes for OpenCV, FFmpeg and other computer vision and multimedia libraries.

Stars
8,350
Forks
1,615
Open issues
466
Last commit
2 months ago

What is it?

JavaCV gives Java developers access to commonly used computer vision and multimedia libraries such as OpenCV and FFmpeg. The wrappers are built on the JavaCPP Presets, and their class definitions closely follow the original C/C++ headers, so OpenCV and FFmpeg APIs can be called much as they are in native code.

Beyond the raw bindings, JavaCV adds helper classes for common tasks: hardware-accelerated image display (CanvasFrame, GLCanvasFrame), frame capture from cameras and video files through FrameGrabber, video writing through FrameRecorder, camera and projector calibration, feature point matching, and blob analysis. Converters link frames to Java 2D, Android bitmaps, and OpenCV Mat objects.

Dependencies are distributed through Maven Central as javacv-platform, which bundles native binaries for Linux, macOS, Windows and Android. Support for OpenCL and OpenGL variants is also included for some classes.

Key features

  • 01Java bindings for OpenCV and FFmpeg with APIs mirroring the C/C++ originals.
  • 02Camera and video file capture through FrameGrabber implementations.
  • 03Video encoding and output via FrameRecorder.
  • 04Hardware-accelerated image display with CanvasFrame and GLCanvasFrame.
  • 05Camera and projector calibration, feature matching and blob analysis helpers.
  • 06Native binaries distributed via Maven and Gradle for multiple platforms, including Android.

Use cases

  • Building image processing or computer vision applications in Java or Kotlin.
  • Capturing webcam or video stream frames and processing them in real time.
  • Transcoding or recording video files from a Java backend.
  • Adding face detection or contour analysis to a JVM-based application.

Quick start

  1. 1

    Install a Java SE 8 or newer JDK

  2. 2

    Add the javacv-platform dependency to your pom.xml (Maven) or build.gradle (Gradle) file, using version 1.5.14

Things to know

  • The project's license is not clearly stated in the metadata (NOASSERTION), so check the license before use.
  • The javacv-platform dependency downloads native binaries for all platforms, which is large unless you set the javacpp.platform property.
  • 32-bit and 64-bit modules cannot be mixed, so all components must share the same bitness.

Topics

FAQ

What is javacv?
Java wrappers and helper classes for OpenCV, FFmpeg and other computer vision and multimedia libraries. JavaCV gives Java developers access to commonly used computer vision and multimedia libraries such as OpenCV and FFmpeg. The wrappers are built on the JavaCPP Presets, and their class definitions closely follow the original C/C++ headers, so OpenCV and FFmpeg APIs can be called much as they are in native code.
Is javacv free to use? What license does it have?
javacv is open source under the Other license. Check the license terms before using it in commercial products.
Is javacv still maintained?
Updated within 6 months. The last commit to javacv was on Aug 12, 2026.
What can I use javacv for?
Building image processing or computer vision applications in Java or Kotlin. Capturing webcam or video stream frames and processing them in real time. Transcoding or recording video files from a Java backend. Adding face detection or contour analysis to a JVM-based application.
How do I install javacv?
Install a Java SE 8 or newer JDK Add the javacv-platform dependency to your pom.xml (Maven) or build.gradle (Gradle) file, using version 1.5.14
Where can I get javacv?
The source code and installation instructions are on GitHub: https://github.com/bytedeco/javacv

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects