}
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);
}
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");
*/
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 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);
};
/**
* 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()
{
/**
* 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)
* Converts Android Bitmap to OpenCV Mat.
* <p>
* 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,
* it keeps the image in RGBA format.
* <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 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)
/**
* 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);
/**
* Converts OpenCV Mat to Android Bitmap.
* <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 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 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)
/**
* 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 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);
public class TermCriteria {\r
\r
/**\r
- * the maximum of iterations or elements to compute\r
+ * The maximum number of iterations or elements to compute\r
*/\r
public static final int COUNT = 1;\r
/**\r
- * the maximum of iterations or elements to compute\r
+ * The maximum number of iterations or elements to compute\r
*/\r
public static final int MAX_ITER = COUNT;\r
/**\r
- * the desired accuracy threshold or change in parameters at which the iterative algorithm stops.\r
+ * The desired accuracy threshold or change in parameters at which the iterative algorithm is terminated.\r
*/\r
public static final int EPS = 2;\r
\r
* Termination criteria for iterative algorithms.\r
* \r
* @param type\r
- * the type of termination criteria: COUNT, EPS or COUNT + EPS\r
+ * the type of termination criteria: COUNT, EPS or COUNT + EPS.\r
* @param maxCount\r
- * the maximum number of iterations/elements\r
+ * the maximum number of iterations/elements.\r
* @param epsilon\r
- * the desired accuracy\r
+ * the desired accuracy.\r
*/\r
public TermCriteria(int type, int maxCount, double epsilon) {\r
this.type = type;\r
}\r
\r
/**\r
- * Termination criteria for iterative algorithms\r
+ * Termination criteria for iterative algorithms.\r
*/\r
public TermCriteria() {\r
this(0, 0, 0.0);\r
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
* 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.
*
/**
* 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.