5

There are a lot of books about OpenCV C++, many examples and etc. But I can't find that on Java. I know the basics like reading, showing images, grabbing frames and displaying them in the loop, but it's so little. I want to do ComputerVision, but all I can find about JavaCV on google are things I mentioned before. Where/How I can learn it?

user3029227
  • 121
  • 2
  • 8
  • 4
    A little correction: "JavaCV" is different from "OpenCV Java wrapper". JavaCV is non-official Java version of OpenCV, while "OpenCV Java" is the official Java wrapper of OpenCV. – Mahm00d Dec 28 '13 at 08:25
  • 1
    Thanks for giving better unsterstanding. – user3029227 Dec 28 '13 at 22:03

1 Answers1

6

The java wrapper is quite young, so there are not many examples on the web. You should get a little understanding of C++ (if you have not already), and use the C++ examples. Many classes/methods are available in the java wrapper, so you can translate them easily.

Sometimes it is a bit difficult to find the appropriate java statement. E.g., all the constants, or the public functions defined in the class Core are directly available in C++ due to the #include statement. In Java, these are public static functions from the class Core, so you have to write Core.xy().

To find the class where a specific constant, or public function is defined, I like to use the javadoc index. So, if you want to know where the function absdiff is, you search for this string in that index, and find out that it is a static method of Core, so Core.absdiff(x, y, z) is the java statement for the C++ statement absdiff(x, y, z).

Matthias
  • 817
  • 2
  • 7
  • 14