mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
OpenCV 2.4.0 constant version removed. All docs and samples updated for 2.4.2.
This commit is contained in:
parent
a78bd92b8e
commit
65b53f96d0
@ -38,10 +38,6 @@ boolean initAsync()
|
||||
OpenCV version constants
|
||||
-------------------------
|
||||
|
||||
.. data:: OPENCV_VERSION_2_4_0
|
||||
|
||||
OpenCV Library version 2.4.0
|
||||
|
||||
.. data:: OPENCV_VERSION_2_4_2
|
||||
|
||||
OpenCV Library version 2.4.2
|
||||
|
@ -379,7 +379,7 @@ There is a very base code snippet for Async init. It shows only basis principles
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
Log.i(TAG, "Trying to load OpenCV library");
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_0, this, mOpenCVCallBack))
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_2, this, mOpenCVCallBack))
|
||||
{
|
||||
Log.e(TAG, "Cannot connect to OpenCV Manager");
|
||||
}
|
||||
|
@ -8,14 +8,9 @@ import android.content.Context;
|
||||
public class OpenCVLoader
|
||||
{
|
||||
/**
|
||||
* OpenCV Library version 2.4.0
|
||||
* OpenCV Library version 2.4.2
|
||||
*/
|
||||
public static final String OPEN_CV_VERSION_2_4_0 = "2.4.0";
|
||||
|
||||
/**
|
||||
* OpenCV Library version 2.4.0
|
||||
*/
|
||||
public static final String OPEN_CV_VERSION_2_4_2 = "2.4.2";
|
||||
public static final String OPENCV_VERSION_2_4_2 = "2.4.2";
|
||||
|
||||
/**
|
||||
* Load and initialize OpenCV library from current application package. Roughly it is analog of system.loadLibrary("opencv_java")
|
||||
|
@ -94,7 +94,7 @@ public class puzzle15Activity extends Activity
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
Log.i(TAG, "Trying to load OpenCV library");
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack))
|
||||
{
|
||||
Log.e(TAG, "Cannot connect to OpenCV Manager");
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class ColorBlobDetectionActivity extends Activity {
|
||||
{
|
||||
Log.i(TAG, "Instantiated new " + this.getClass());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
Log.i(TAG, "onPause");
|
||||
@ -66,29 +66,28 @@ public class ColorBlobDetectionActivity extends Activity {
|
||||
Log.i(TAG, "onResume");
|
||||
super.onResume();
|
||||
if( (null != mView) && !mView.openCamera() ) {
|
||||
AlertDialog ad = new AlertDialog.Builder(this).create();
|
||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||
ad.setMessage("Fatal error: can't open camera!");
|
||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
}
|
||||
});
|
||||
AlertDialog ad = new AlertDialog.Builder(this).create();
|
||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||
ad.setMessage("Fatal error: can't open camera!");
|
||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
}
|
||||
});
|
||||
ad.show();
|
||||
}
|
||||
}
|
||||
|
||||
/** Called when the activity is first created. */
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
Log.i(TAG, "onCreate");
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
Log.i(TAG, "Trying to load OpenCV library");
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack))
|
||||
{
|
||||
Log.e(TAG, "Cannot connect to OpenCV Manager");
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public class FdActivity extends Activity {
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
Log.i(TAG, "Trying to load OpenCV library");
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack))
|
||||
{
|
||||
Log.e(TAG, "Cannot connect to OpenCV Manager");
|
||||
}
|
||||
|
@ -107,9 +107,9 @@ public class ImageManipulationsActivity extends Activity {
|
||||
Log.i(TAG, "onCreate");
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
|
||||
Log.i(TAG, "Trying to load OpenCV library");
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack))
|
||||
{
|
||||
Log.e(TAG, "Cannot connect to OpenCV Manager");
|
||||
}
|
||||
|
@ -38,8 +38,8 @@ public class Sample0Base extends Activity {
|
||||
ad.setMessage("Fatal error: can't open camera!");
|
||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
}
|
||||
});
|
||||
ad.show();
|
||||
|
@ -75,8 +75,8 @@ public class Sample1Java extends Activity {
|
||||
ad.setMessage("Fatal error: can't open camera!");
|
||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
}
|
||||
});
|
||||
ad.show();
|
||||
@ -91,7 +91,7 @@ public class Sample1Java extends Activity {
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
Log.i(TAG, "Trying to load OpenCV library");
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack))
|
||||
{
|
||||
Log.e(TAG, "Cannot connect to OpenCV Manager");
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public class Sample2NativeCamera extends Activity {
|
||||
ad.setMessage("Fatal error: can't open camera!");
|
||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
}
|
||||
});
|
||||
@ -97,7 +97,7 @@ public class Sample2NativeCamera extends Activity {
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
Log.i(TAG, "Trying to load OpenCV library");
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack))
|
||||
{
|
||||
Log.e(TAG, "Cannot connect to OpenCV Manager");
|
||||
}
|
||||
|
@ -73,8 +73,8 @@ public class Sample3Native extends Activity {
|
||||
ad.setMessage("Fatal error: can't open camera!");
|
||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
}
|
||||
});
|
||||
ad.show();
|
||||
@ -88,7 +88,7 @@ public class Sample3Native extends Activity {
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack))
|
||||
{
|
||||
Log.e(TAG, "Cannot connect to OpenCV Manager");
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ public class Sample4Mixed extends Activity {
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
Log.i(TAG, "Trying to load OpenCV library");
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
|
||||
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack))
|
||||
{
|
||||
Log.e(TAG, "Cannot connect to OpenCV Manager");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user