Fork me on GitHub

Bytedeco makes native libraries available to the Java platform by offering ready-to-use bindings generated with the codeveloped JavaCPP technology. This, we hope, is the missing bridge between Java and C/C++, bringing compute-intensive science, multimedia, computer vision, deep learning, etc to the Java platform.

Core Technologies

  • JavaCPP [API] – A tool that can not only generate JNI code but also build native wrapper library files from an appropriate interface file written entirely in Java. It can also parse automatically C/C++ header files to produce the required Java interface files.

Prebuilt Java Bindings to C/C++ Libraries

These are part of a project that we call the JavaCPP Presets. Many coexist in the same GitHub repository, and all use JavaCPP to wrap predefined C/C++ libraries from open-source land. The bindings expose almost all of the relevant APIs and make them available in a portable and user-friendly fashion to any Java virtual machine (including Android), as if they were like any other normal Java libraries. We have presets for the following C/C++ libraries:

We will add more to this list as they are made, including those from outside the bytedeco/javacpp-presets repository.

Projects Leveraging the Presets Bindings

  • JavaCV [API] – Library based on the JavaCPP Presets that depends on commonly used native libraries in the field of computer vision to facilitate the development of those applications on the Java platform. It provides easy-to-use interfaces to grab frames from cameras and audio/video streams, process them, and record them back on disk or send them over the network.
  • JavaCV Examples – Collection of examples originally written in C++ for the book entitled OpenCV 2 Computer Vision Application Programming Cookbook by Robert Laganière, but ported to JavaCV and written in Scala.
  • ProCamCalib – Sample JavaCV application that can perform geometric and photometric calibration of a set of video projectors and color cameras.
  • ProCamTracker – Another sample JavaCV application that uses the calibration from ProCamCalib to implement a vision method that tracks a textured planar surface and realizes markerless interactive augmented reality with projection mapping.

More Project Information

Please refer to the contribute and download pages for more information about how to help out or obtain this software.

See the developer site on GitHub for more general information about the Bytedeco projects.

Latest News feed twitter

First release at Bytedeco

April 28, 2014

Welcome to Bytedeco! The new home of JavaCPP, JavaCPP Presets, JavaCV, ProCamCalib, and ProCamTracker, hosted at GitHub. This post also coincides with their latest releases at version 0.8. Please click on the appropriate link to download and obtain more information about your favorite project. Further, all binary artifacts are now made available through the Maven Central Repository.

The projects under this new version number also come with a few big changes. First, the group of the artifacts and the package of the classes have been renamed to org.bytedeco. Second, JavaCV is now based on the JavaCPP Presets, which comes with an interface that maps the functionality of OpenCV more closely to its original C++ API, among other things. This is both a good thing, and a bad thing, because we lose some backward compatibility with previous versions of JavaCV. In the long run though, providing interfaces to C++ libraries that map as closely as possible to the original API is easier for both the mechanical parser and the ultimate user, so I feel that was the right choice to make.

That said, to make the transition a bit less painful, here are a few tips to help you adapt your code:

  1. In your build files, replace the com.googlecode.javacpp and com.googlecode.javacv groups with org.bytedeco. You may also have to add a couple of additional dependencies based on the new organization of the artifacts for the JavaCPP Presets.
  2. Rename import statements based on the following mapping:
    • com.googlecode.javacpporg.bytedeco.javacpp
    • com.googlecode.javacv.cpporg.bytedeco.javacpp
    • com.googlecode.javacvorg.bytedeco.javacv
  3. For code that uses the C++ API of OpenCV, adjust the object types as follows:
    • CvMat and IplImageMat
    • CvRectRect
    • CvPointPoint
    • CvPoint2D32fPoint2f
    • CvPoint3D32fPoint3f
    • CvPoint2D64fPoint2d
    • CvPoint3D64fPoint3d
    • CvSizeSize
    • CvSize2D32fSize2f
    • CvBox2DRotatedRect
    • CvScalarScalar
      The latter come with constructors to wrap the former, in addition to as<OriginalTypeName>() methods that map to the corresponding cast operators. Neither operations requires large amounts of data to be copied, so making the switch should not be too difficult.

There are a few other things here and there, but nothing else with major consequences, as far as I know. If you run up against something you are having a hard time solving though, please share your experience with everyone on the mailing list. I am sure a kind soul will help you out.

So, what next? At the moment, other than making news releases and a few useful blog posts every now and then, I am not planning anything in particular for this site, but for the future, who knows…