From dc6fa94118860ddbb31f1141834b90af14afc3f9 Mon Sep 17 00:00:00 2001 From: Vsevolod Glumov Date: Tue, 28 Aug 2012 15:49:50 +0400 Subject: [PATCH] Improved javadoc comments. --- .../generator/src/java/android+AsyncServiceHelper.java | 2 +- .../generator/src/java/android+BaseLoaderCallback.java | 2 +- .../src/java/android+LoaderCallbackInterface.java | 12 ++++++------ .../java/generator/src/java/android+OpenCVLoader.java | 10 +++++----- modules/java/generator/src/java/android+Utils.java | 18 +++++++++--------- modules/java/generator/src/java/core+TermCriteria.java | 14 +++++++------- .../src/java/engine+OpenCVEngineInterface.aidl | 8 ++++---- .../java/generator/src/java/highgui+VideoCapture.java | 4 ++-- 8 files changed, 35 insertions(+), 35 deletions(-) diff --git a/modules/java/generator/src/java/android+AsyncServiceHelper.java b/modules/java/generator/src/java/android+AsyncServiceHelper.java index 8069f46..b5487b9 100644 --- a/modules/java/generator/src/java/android+AsyncServiceHelper.java +++ b/modules/java/generator/src/java/android+AsyncServiceHelper.java @@ -263,7 +263,7 @@ class AsyncServiceHelper } 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"; result &= loadLibrary(AbsLibraryPath); } diff --git a/modules/java/generator/src/java/android+BaseLoaderCallback.java b/modules/java/generator/src/java/android+BaseLoaderCallback.java index 220ca5e..4fb5a23 100644 --- a/modules/java/generator/src/java/android+BaseLoaderCallback.java +++ b/modules/java/generator/src/java/android+BaseLoaderCallback.java @@ -40,7 +40,7 @@ public abstract class BaseLoaderCallback implements LoaderCallbackInterface { RestartMessage.show(); } break; - /** OpenCV loader cannot start Google Play Market. **/ + /** OpenCV loader can not start Google Play Market. **/ case LoaderCallbackInterface.MARKET_ERROR: { Log.d(TAG, "Google Play service is not installed! You can get it here"); diff --git a/modules/java/generator/src/java/android+LoaderCallbackInterface.java b/modules/java/generator/src/java/android+LoaderCallbackInterface.java index 56cdf15..0d932c7 100644 --- a/modules/java/generator/src/java/android+LoaderCallbackInterface.java +++ b/modules/java/generator/src/java/android+LoaderCallbackInterface.java @@ -18,7 +18,7 @@ public interface LoaderCallbackInterface */ 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; /** @@ -26,19 +26,19 @@ public interface LoaderCallbackInterface */ static final int INCOMPATIBLE_MANAGER_VERSION = 4; /** - * OpenCV library initialization failed. + * OpenCV library initialization has failed. */ static final int INIT_FAILED = 0xff; /** - * This callback method is called after OpenCV library initialization. - * @param status Status of initialization (see Initialization status constants). + * Callback method, called after OpenCV library initialization. + * @param status status of initialization (see initialization status constants). */ public void onManagerConnected(int status); /** - * This callback method is called in case the package installation is needed. - * @param callback Answer object with approve and cancel methods and the package description. + * Callback method, called in case the package installation is needed. + * @param callback answer object with approve and cancel methods and the package description. */ public void onPackageInstall(InstallCallbackInterface callback); }; diff --git a/modules/java/generator/src/java/android+OpenCVLoader.java b/modules/java/generator/src/java/android+OpenCVLoader.java index 376d04c..b3025a9 100644 --- a/modules/java/generator/src/java/android+OpenCVLoader.java +++ b/modules/java/generator/src/java/android+OpenCVLoader.java @@ -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"). - * @return Returns true is initialization of OpenCV was successful. + * @return returns true is initialization of OpenCV was successful. */ public static boolean initDebug() { @@ -23,10 +23,10 @@ public class OpenCVLoader /** * Loads and initializes OpenCV library using OpenCV Engine service. - * @param Version OpenCV Library version. - * @param AppContext Application context for connecting to service. - * @param Callback Object, that implements LoaderCallbackInterface for handling Connection status. - * @return Returns true if initialization of OpenCV is successful. + * @param Version OpenCV library version. + * @param AppContext application context for connecting to the service. + * @param Callback object, that implements LoaderCallbackInterface for handling the connection status. + * @return returns true if initialization of OpenCV is successful. */ public static boolean initAsync(String Version, Context AppContext, LoaderCallbackInterface Callback) diff --git a/modules/java/generator/src/java/android+Utils.java b/modules/java/generator/src/java/android+Utils.java index ceecf3a..e40630b 100644 --- a/modules/java/generator/src/java/android+Utils.java +++ b/modules/java/generator/src/java/android+Utils.java @@ -77,13 +77,13 @@ public class Utils { * Converts Android Bitmap to OpenCV Mat. *

* This function converts an Android Bitmap image to the OpenCV Mat. - *
The 'ARGB_8888' and 'RGB_565' input Bitmap formats are supported. + *
'ARGB_8888' and 'RGB_565' input Bitmap formats are supported. *
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. *
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 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) { if (bmp == null) @@ -96,7 +96,7 @@ public class Utils { /** * 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 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) { bitmapToMat(bmp, mat, false); @@ -106,14 +106,14 @@ public class Utils { /** * Converts OpenCV Mat to Android Bitmap. *

- *
The function converts an image in the OpenCV Mat representation to the Android Bitmap. + *
This function converts an image in the OpenCV Mat representation to the Android Bitmap. *
The input Mat object has to be of the types 'CV_8UC1' (gray-scale), 'CV_8UC3' (RGB) or 'CV_8UC4' (RGBA). *
The output Bitmap object has to be of the same size as the input Mat and of the types 'ARGB_8888' or 'RGB_565'. - *
The function throws an exception if the conversion fails. + *
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 bmp is a valid Bitmap object of the same size as the Mat m 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 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 and of type 'ARGB_8888' or 'RGB_565'. + * @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) { if (mat == null) @@ -126,7 +126,7 @@ public class Utils { /** * Short form of the matToBitmap(mat, bmp, premultiplyAlpha=false) * @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) { matToBitmap(mat, bmp, false); diff --git a/modules/java/generator/src/java/core+TermCriteria.java b/modules/java/generator/src/java/core+TermCriteria.java index 3c4a8de..aaee88d 100644 --- a/modules/java/generator/src/java/core+TermCriteria.java +++ b/modules/java/generator/src/java/core+TermCriteria.java @@ -4,15 +4,15 @@ package org.opencv.core; 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; /** - * the maximum of iterations or elements to compute + * The maximum number of iterations or elements to compute */ 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; @@ -24,11 +24,11 @@ public class TermCriteria { * Termination criteria for iterative algorithms. * * @param type - * the type of termination criteria: COUNT, EPS or COUNT + EPS + * the type of termination criteria: COUNT, EPS or COUNT + EPS. * @param maxCount - * the maximum number of iterations/elements + * the maximum number of iterations/elements. * @param epsilon - * the desired accuracy + * the desired accuracy. */ public TermCriteria(int type, int maxCount, double epsilon) { this.type = type; @@ -37,7 +37,7 @@ public class TermCriteria { } /** - * Termination criteria for iterative algorithms + * Termination criteria for iterative algorithms. */ public TermCriteria() { this(0, 0, 0.0); diff --git a/modules/java/generator/src/java/engine+OpenCVEngineInterface.aidl b/modules/java/generator/src/java/engine+OpenCVEngineInterface.aidl index 7bf967f..7949b31 100644 --- a/modules/java/generator/src/java/engine+OpenCVEngineInterface.aidl +++ b/modules/java/generator/src/java/engine+OpenCVEngineInterface.aidl @@ -6,28 +6,28 @@ package org.opencv.engine; interface OpenCVEngineInterface { /** - * @return Returns service version. + * @return returns service version. */ int getEngineVersion(); /** * Finds an installed OpenCV library. * @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); /** * Tries to install defined version of OpenCV from Google Play Market. * @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); /** * Returns list of libraries in loading order, separated by semicolon. * @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); } \ No newline at end of file diff --git a/modules/java/generator/src/java/highgui+VideoCapture.java b/modules/java/generator/src/java/highgui+VideoCapture.java index 98b911d..b8569bb 100644 --- a/modules/java/generator/src/java/highgui+VideoCapture.java +++ b/modules/java/generator/src/java/highgui+VideoCapture.java @@ -52,7 +52,7 @@ public class VideoCapture { * Note: When querying a property that is not supported by the backend used by * 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_HEIGHT height of the frames in the video stream. * @@ -173,7 +173,7 @@ public class 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_HEIGHT height of the frames in the video stream. * @param value value of the property. -- 2.7.4