Improved javadoc comments.

pull/16/merge
Vsevolod Glumov 13 years ago
parent f56432559e
commit dc6fa94118
  1. 2
      modules/java/generator/src/java/android+AsyncServiceHelper.java
  2. 12
      modules/java/generator/src/java/android+LoaderCallbackInterface.java
  3. 10
      modules/java/generator/src/java/android+OpenCVLoader.java
  4. 18
      modules/java/generator/src/java/android+Utils.java
  5. 14
      modules/java/generator/src/java/core+TermCriteria.java
  6. 8
      modules/java/generator/src/java/engine+OpenCVEngineInterface.aidl
  7. 4
      modules/java/generator/src/java/highgui+VideoCapture.java

@ -263,7 +263,7 @@ class AsyncServiceHelper
} }
else else
{ {
// If dependencies list is not defined or empty. // If the dependencies list is not defined or empty.
String AbsLibraryPath = Path + File.separator + "libopencv_java.so"; String AbsLibraryPath = Path + File.separator + "libopencv_java.so";
result &= loadLibrary(AbsLibraryPath); result &= loadLibrary(AbsLibraryPath);
} }

@ -18,7 +18,7 @@ public interface LoaderCallbackInterface
*/ */
static final int MARKET_ERROR = 2; static final int MARKET_ERROR = 2;
/** /**
* OpenCV library installation has been canceled by user. * OpenCV library installation has been canceled by the user.
*/ */
static final int INSTALL_CANCELED = 3; static final int INSTALL_CANCELED = 3;
/** /**
@ -26,19 +26,19 @@ public interface LoaderCallbackInterface
*/ */
static final int INCOMPATIBLE_MANAGER_VERSION = 4; static final int INCOMPATIBLE_MANAGER_VERSION = 4;
/** /**
* OpenCV library initialization failed. * OpenCV library initialization has failed.
*/ */
static final int INIT_FAILED = 0xff; static final int INIT_FAILED = 0xff;
/** /**
* This callback method is called after OpenCV library initialization. * Callback method, called after OpenCV library initialization.
* @param status Status of initialization (see Initialization status constants). * @param status status of initialization (see initialization status constants).
*/ */
public void onManagerConnected(int status); public void onManagerConnected(int status);
/** /**
* This callback method is called in case the package installation is needed. * Callback method, called in case the package installation is needed.
* @param callback Answer object with approve and cancel methods and the package description. * @param callback answer object with approve and cancel methods and the package description.
*/ */
public void onPackageInstall(InstallCallbackInterface callback); public void onPackageInstall(InstallCallbackInterface callback);
}; };

@ -14,7 +14,7 @@ public class OpenCVLoader
/** /**
* Loads and initializes OpenCV library from current application package. Roughly, it's an analog of system.loadLibrary("opencv_java"). * Loads and initializes OpenCV library from current application package. Roughly, it's an analog of system.loadLibrary("opencv_java").
* @return Returns true is initialization of OpenCV was successful. * @return returns true is initialization of OpenCV was successful.
*/ */
public static boolean initDebug() public static boolean initDebug()
{ {
@ -23,10 +23,10 @@ public class OpenCVLoader
/** /**
* Loads and initializes OpenCV library using OpenCV Engine service. * Loads and initializes OpenCV library using OpenCV Engine service.
* @param Version OpenCV Library version. * @param Version OpenCV library version.
* @param AppContext Application context for connecting to service. * @param AppContext application context for connecting to the service.
* @param Callback Object, that implements LoaderCallbackInterface for handling Connection status. * @param Callback object, that implements LoaderCallbackInterface for handling the connection status.
* @return Returns true if initialization of OpenCV is successful. * @return returns true if initialization of OpenCV is successful.
*/ */
public static boolean initAsync(String Version, Context AppContext, public static boolean initAsync(String Version, Context AppContext,
LoaderCallbackInterface Callback) LoaderCallbackInterface Callback)

@ -77,13 +77,13 @@ public class Utils {
* Converts Android Bitmap to OpenCV Mat. * Converts Android Bitmap to OpenCV Mat.
* <p> * <p>
* This function converts an Android Bitmap image to the OpenCV Mat. * This function converts an Android Bitmap image to the OpenCV Mat.
* <br>The 'ARGB_8888' and 'RGB_565' input Bitmap formats are supported. * <br>'ARGB_8888' and 'RGB_565' input Bitmap formats are supported.
* <br>The output Mat is always created of the same size as the input Bitmap and of the 'CV_8UC4' type, * <br>The output Mat is always created of the same size as the input Bitmap and of the 'CV_8UC4' type,
* it keeps the image in RGBA format. * it keeps the image in RGBA format.
* <br>This function throws an exception if the conversion fails. * <br>This function throws an exception if the conversion fails.
* @param bmp is a valid input Bitmap object of the type 'ARGB_8888' or 'RGB_565'. * @param bmp is a valid input Bitmap object of the type 'ARGB_8888' or 'RGB_565'.
* @param mat is a valid output Mat object, it will be reallocated if needed, so it may be empty. * @param mat is a valid output Mat object, it will be reallocated if needed, so it may be empty.
* @param unPremultiplyAlpha is a flag if the bitmap needs to be converted from alpha premultiplied format (like Android keeps 'ARGB_8888' ones) to regular one. This flag is ignored for 'RGB_565' bitmaps. * @param unPremultiplyAlpha is a flag, that determines, whether the bitmap needs to be converted from alpha premultiplied format (like Android keeps 'ARGB_8888' ones) to regular one; this flag is ignored for 'RGB_565' bitmaps.
*/ */
public static void bitmapToMat(Bitmap bmp, Mat mat, boolean unPremultiplyAlpha) { public static void bitmapToMat(Bitmap bmp, Mat mat, boolean unPremultiplyAlpha) {
if (bmp == null) if (bmp == null)
@ -96,7 +96,7 @@ public class Utils {
/** /**
* Short form of the bitmapToMat(bmp, mat, unPremultiplyAlpha=false). * Short form of the bitmapToMat(bmp, mat, unPremultiplyAlpha=false).
* @param bmp is a valid input Bitmap object of the type 'ARGB_8888' or 'RGB_565'. * @param bmp is a valid input Bitmap object of the type 'ARGB_8888' or 'RGB_565'.
* @param mat is a valid output Mat object, it will be reallocated if needed, so it's possible to pass an empty Mat. * @param mat is a valid output Mat object, it will be reallocated if needed, so Mat may be empty.
*/ */
public static void bitmapToMat(Bitmap bmp, Mat mat) { public static void bitmapToMat(Bitmap bmp, Mat mat) {
bitmapToMat(bmp, mat, false); bitmapToMat(bmp, mat, false);
@ -106,14 +106,14 @@ public class Utils {
/** /**
* Converts OpenCV Mat to Android Bitmap. * Converts OpenCV Mat to Android Bitmap.
* <p> * <p>
* <br>The function converts an image in the OpenCV Mat representation to the Android Bitmap. * <br>This function converts an image in the OpenCV Mat representation to the Android Bitmap.
* <br>The input Mat object has to be of the types 'CV_8UC1' (gray-scale), 'CV_8UC3' (RGB) or 'CV_8UC4' (RGBA). * <br>The input Mat object has to be of the types 'CV_8UC1' (gray-scale), 'CV_8UC3' (RGB) or 'CV_8UC4' (RGBA).
* <br>The output Bitmap object has to be of the same size as the input Mat and of the types 'ARGB_8888' or 'RGB_565'. * <br>The output Bitmap object has to be of the same size as the input Mat and of the types 'ARGB_8888' or 'RGB_565'.
* <br>The function throws an exception if the conversion fails. * <br>This function throws an exception if the conversion fails.
* *
* @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'. * @param mat is a valid input Mat object of types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
* @param bmp is a valid Bitmap object of the same size as the Mat m and of type 'ARGB_8888' or 'RGB_565'. * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
* @param premultiplyAlpha is a flag if the Mat needs to be converted to alpha premultiplied format (like Android keeps 'ARGB_8888' bitmaps). The flag is ignored for 'RGB_565' bitmaps. * @param premultiplyAlpha is a flag, that determines, whether the Mat needs to be converted to alpha premultiplied format (like Android keeps 'ARGB_8888' bitmaps); the flag is ignored for 'RGB_565' bitmaps.
*/ */
public static void matToBitmap(Mat mat, Bitmap bmp, boolean premultiplyAlpha) { public static void matToBitmap(Mat mat, Bitmap bmp, boolean premultiplyAlpha) {
if (mat == null) if (mat == null)
@ -126,7 +126,7 @@ public class Utils {
/** /**
* Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b> * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
* @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'. * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
* @param bmp is a valid Bitmap object of the same size as the Mat m and of type 'ARGB_8888' or 'RGB_565'. * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
*/ */
public static void matToBitmap(Mat mat, Bitmap bmp) { public static void matToBitmap(Mat mat, Bitmap bmp) {
matToBitmap(mat, bmp, false); matToBitmap(mat, bmp, false);

@ -4,15 +4,15 @@ package org.opencv.core;
public class TermCriteria { public class TermCriteria {
/** /**
* the maximum of iterations or elements to compute * The maximum number of iterations or elements to compute
*/ */
public static final int COUNT = 1; public static final int COUNT = 1;
/** /**
* the maximum of iterations or elements to compute * The maximum number of iterations or elements to compute
*/ */
public static final int MAX_ITER = COUNT; public static final int MAX_ITER = COUNT;
/** /**
* the desired accuracy threshold or change in parameters at which the iterative algorithm stops. * The desired accuracy threshold or change in parameters at which the iterative algorithm is terminated.
*/ */
public static final int EPS = 2; public static final int EPS = 2;
@ -24,11 +24,11 @@ public class TermCriteria {
* Termination criteria for iterative algorithms. * Termination criteria for iterative algorithms.
* *
* @param type * @param type
* the type of termination criteria: COUNT, EPS or COUNT + EPS * the type of termination criteria: COUNT, EPS or COUNT + EPS.
* @param maxCount * @param maxCount
* the maximum number of iterations/elements * the maximum number of iterations/elements.
* @param epsilon * @param epsilon
* the desired accuracy * the desired accuracy.
*/ */
public TermCriteria(int type, int maxCount, double epsilon) { public TermCriteria(int type, int maxCount, double epsilon) {
this.type = type; this.type = type;
@ -37,7 +37,7 @@ public class TermCriteria {
} }
/** /**
* Termination criteria for iterative algorithms * Termination criteria for iterative algorithms.
*/ */
public TermCriteria() { public TermCriteria() {
this(0, 0, 0.0); this(0, 0, 0.0);

@ -6,28 +6,28 @@ package org.opencv.engine;
interface OpenCVEngineInterface interface OpenCVEngineInterface
{ {
/** /**
* @return Returns service version. * @return returns service version.
*/ */
int getEngineVersion(); int getEngineVersion();
/** /**
* Finds an installed OpenCV library. * Finds an installed OpenCV library.
* @param OpenCV version. * @param OpenCV version.
* @return Returns path to OpenCV native libs or an empty string if OpenCV can not be found. * @return returns path to OpenCV native libs or an empty string if OpenCV can not be found.
*/ */
String getLibPathByVersion(String version); String getLibPathByVersion(String version);
/** /**
* Tries to install defined version of OpenCV from Google Play Market. * Tries to install defined version of OpenCV from Google Play Market.
* @param OpenCV version. * @param OpenCV version.
* @return Returns true if installation was successful or OpenCV package has been already installed. * @return returns true if installation was successful or OpenCV package has been already installed.
*/ */
boolean installVersion(String version); boolean installVersion(String version);
/** /**
* Returns list of libraries in loading order, separated by semicolon. * Returns list of libraries in loading order, separated by semicolon.
* @param OpenCV version. * @param OpenCV version.
* @return Returns names of OpenCV libraries, separated by semicolon. * @return returns names of OpenCV libraries, separated by semicolon.
*/ */
String getLibraryList(String version); String getLibraryList(String version);
} }

@ -52,7 +52,7 @@ public class VideoCapture {
* Note: When querying a property that is not supported by the backend used by * Note: When querying a property that is not supported by the backend used by
* the "VideoCapture" class, value 0 is returned. * the "VideoCapture" class, value 0 is returned.
* *
* @param propId Property identifier; it can be one of the following: * @param propId property identifier; it can be one of the following:
* * CV_CAP_PROP_FRAME_WIDTH width of the frames in the video stream. * * CV_CAP_PROP_FRAME_WIDTH width of the frames in the video stream.
* * CV_CAP_PROP_FRAME_HEIGHT height of the frames in the video stream. * * CV_CAP_PROP_FRAME_HEIGHT height of the frames in the video stream.
* *
@ -173,7 +173,7 @@ public class VideoCapture {
/** /**
* Sets a property in the "VideoCapture". * Sets a property in the "VideoCapture".
* *
* @param propId Property identifier; it can be one of the following: * @param propId property identifier; it can be one of the following:
* * CV_CAP_PROP_FRAME_WIDTH width of the frames in the video stream. * * CV_CAP_PROP_FRAME_WIDTH width of the frames in the video stream.
* * CV_CAP_PROP_FRAME_HEIGHT height of the frames in the video stream. * * CV_CAP_PROP_FRAME_HEIGHT height of the frames in the video stream.
* @param value value of the property. * @param value value of the property.

Loading…
Cancel
Save