I stand to be corrected since I haven't used OpenCV's Java wrapper before. In order to find documentation, I'd recommend the following means:
1. Official Documentation Backtrace
Kudos for referring to the official site for help.
Sometimes back-tracing documentations can be helpful. Rarely do you see changes to the core components of a framework so chances are methods do the same thing. Since Mat is core, if you look at documentation <=2.4.11
, you'll notice that most of the Mat
methods are documented.
2. Language Cross Referencing
Frameworks supporting multiple languages tend to maintain some sort of consistency. The C++ API is well documented so why not look there instead? It might be called Mat.get()
in Java and Mat.at<type>()
in C++ but they both do the same thing. And looking at their parameters, they are similar as well. All you need to know is how they work. How to call them, what it's called in another language, etc is just syntactic sugar.
3. Common Sense/Hunch
No pun/brag/harm intended
Some methods are obvious no wonder they don't really have any form of documentation. Assuming you know what a matrix is, then you know its a 2D container hence it has rows and columns. From OOP, we know about data encapsulation. Due to this, we have _getters_ and _setters_ which are commonly titled set
and get
. Putting two and two together, your first hunch of Mat.get()
should be:
I need to give it the row and column in which it'd give me back the element at that position.
From there, you can refer to the documentation to see what datatype is returned and what other parameters it might take.
If none of this made sense to you, I'd recommend you stop and read up OOP first.
take a look at this question if you find it useful please upvote the question and the best answer to help others to find useful information
Hi, please check out OpenCV 3.0 Computer Vision with Java book from packtpub - has low reviews but I believe it contains 80% of knowledge for basic usage of OpenCV in Java. It comes with examples in java in resources (you can download them from the book site). Usually you can just take any c++/python code and use Java opencv doc to verify what is the implementation of the method in Java. At least that how I am managing it.