Ask Your Question

Revision history [back]

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.

  1. 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.

  1. Common Sense/Hunch

_No pun/brag or 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 columns and rows. 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. If none of this made sense to you, I'd recommend you stop and read up OOP first.

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. 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.

  1. 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.

  1. 3. Common Sense/Hunch

_No pun/brag or harm 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 columns and rows. 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_. 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. 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.

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 No pun/brag/harm intended_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.