Continued Android samples renaming
This commit is contained in:
parent
b1ed277110
commit
8288cc108d
@ -3,13 +3,4 @@
|
||||
package="org.opencv"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
<application android:label="OpenCV-2.3.1">
|
||||
<activity android:name="OpenCV-2.3.1"
|
||||
android:label="OpenCV-2.3.1">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
|
@ -34,7 +34,7 @@
|
||||
<link>
|
||||
<name>OpenCV-2.3.1_src</name>
|
||||
<type>2</type>
|
||||
<locationURI>_android_OpenCV-2_3_1_d2471b5d/src</locationURI>
|
||||
<locationURI>_android_OpenCV_2_3_1_df28900a/src</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Sample 3 Native Camera</name>
|
||||
<name>Tutorial 1 Basic - 2. Use OpenCV Camera</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
@ -32,9 +32,9 @@
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>opencv2.3.1_src</name>
|
||||
<name>OpenCV-2.3.1_src</name>
|
||||
<type>2</type>
|
||||
<locationURI>_android_opencv2_3_1_d2471b5d/src</locationURI>
|
||||
<locationURI>_android_OpenCV_2_3_1_df28900a/src</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.opencv.samples.s3"
|
||||
package="org.opencv.samples.tutorial2"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
android:anyDensity="true" />
|
||||
|
||||
<application android:label="@string/app_name" android:icon="@drawable/icon">
|
||||
<activity android:name="Sample3NativeCamera"
|
||||
<activity android:name="Sample2NativeCamera"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="landscape"
|
||||
android:configChanges="keyboardHidden|orientation">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Sample 3: Native Camera</string>
|
||||
<string name="app_name">Tutorial 1 Basic - 2. Use OpenCV Camera</string>
|
||||
</resources>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.opencv.samples.s3;
|
||||
package org.opencv.samples.tutorial2;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
@ -7,7 +7,7 @@ import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.Window;
|
||||
|
||||
public class Sample3NativeCamera extends Activity {
|
||||
public class Sample2NativeCamera extends Activity {
|
||||
private static final String TAG = "Sample::Activity";
|
||||
|
||||
public static final int VIEW_MODE_RGBA = 0;
|
||||
@ -24,7 +24,7 @@ public class Sample3NativeCamera extends Activity {
|
||||
|
||||
public static int viewMode = VIEW_MODE_RGBA;
|
||||
|
||||
public Sample3NativeCamera() {
|
||||
public Sample2NativeCamera() {
|
||||
Log.i(TAG, "Instantiated new " + this.getClass());
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ public class Sample3NativeCamera extends Activity {
|
||||
Log.i(TAG, "onCreate");
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
setContentView(new Sample3View(this));
|
||||
setContentView(new Sample2View(this));
|
||||
}
|
||||
|
||||
@Override
|
@ -1,4 +1,4 @@
|
||||
package org.opencv.samples.s3;
|
||||
package org.opencv.samples.tutorial2;
|
||||
|
||||
import org.opencv.*;
|
||||
|
||||
@ -6,12 +6,12 @@ import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.view.SurfaceHolder;
|
||||
|
||||
class Sample3View extends SampleViewBase {
|
||||
class Sample2View extends SampleViewBase {
|
||||
private Mat mRgba;
|
||||
private Mat mGray;
|
||||
private Mat mIntermediateMat;
|
||||
|
||||
public Sample3View(Context context) {
|
||||
public Sample2View(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@ -29,27 +29,27 @@ class Sample3View extends SampleViewBase {
|
||||
|
||||
@Override
|
||||
protected Bitmap processFrame(VideoCapture capture) {
|
||||
switch (Sample3NativeCamera.viewMode) {
|
||||
case Sample3NativeCamera.VIEW_MODE_GRAY:
|
||||
switch (Sample2NativeCamera.viewMode) {
|
||||
case Sample2NativeCamera.VIEW_MODE_GRAY:
|
||||
capture.retrieve(mGray, highgui.CV_CAP_ANDROID_GREY_FRAME);
|
||||
imgproc.cvtColor(mGray, mRgba, imgproc.CV_GRAY2RGBA, 4);
|
||||
break;
|
||||
case Sample3NativeCamera.VIEW_MODE_RGBA:
|
||||
case Sample2NativeCamera.VIEW_MODE_RGBA:
|
||||
capture.retrieve(mRgba, highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA);
|
||||
core.putText(mRgba, "OpenCV + Android", new Point(10, 100), 3/* CV_FONT_HERSHEY_COMPLEX */, 2, new Scalar(255, 0, 0, 255), 3);
|
||||
break;
|
||||
case Sample3NativeCamera.VIEW_MODE_CANNY:
|
||||
case Sample2NativeCamera.VIEW_MODE_CANNY:
|
||||
capture.retrieve(mGray, highgui.CV_CAP_ANDROID_GREY_FRAME);
|
||||
imgproc.Canny(mGray, mIntermediateMat, 80, 100);
|
||||
imgproc.cvtColor(mIntermediateMat, mRgba, imgproc.CV_GRAY2BGRA, 4);
|
||||
break;
|
||||
case Sample3NativeCamera.VIEW_MODE_SOBEL:
|
||||
case Sample2NativeCamera.VIEW_MODE_SOBEL:
|
||||
capture.retrieve(mGray, highgui.CV_CAP_ANDROID_GREY_FRAME);
|
||||
imgproc.Sobel(mGray, mIntermediateMat, CvType.CV_8U, 1, 1);
|
||||
core.convertScaleAbs(mIntermediateMat, mIntermediateMat, 8);
|
||||
imgproc.cvtColor(mIntermediateMat, mRgba, imgproc.CV_GRAY2BGRA, 4);
|
||||
break;
|
||||
case Sample3NativeCamera.VIEW_MODE_BLUR:
|
||||
case Sample2NativeCamera.VIEW_MODE_BLUR:
|
||||
capture.retrieve(mRgba, highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA);
|
||||
imgproc.blur(mRgba, mRgba, new Size(15, 15));
|
||||
break;
|
@ -1,4 +1,4 @@
|
||||
package org.opencv.samples.s3;
|
||||
package org.opencv.samples.tutorial2;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Sample 2 Native API</name>
|
||||
<name>Tutorial 2 Advanced - 1. Add Native OpenCV</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.opencv.samples.s2"
|
||||
package="org.opencv.samples.tutorial3"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
android:anyDensity="true" />
|
||||
|
||||
<application android:label="@string/app_name" android:icon="@drawable/icon">
|
||||
<activity android:name="Sample2Native"
|
||||
<activity android:name="Sample3Native"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="landscape"
|
||||
android:configChanges="keyboardHidden|orientation">
|
||||
|
@ -8,7 +8,7 @@ using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
extern "C" {
|
||||
JNIEXPORT void JNICALL Java_org_opencv_samples_s2_Sample2View_FindFeatures(JNIEnv* env, jobject thiz, jint width, jint height, jbyteArray yuv, jintArray rgba)
|
||||
JNIEXPORT void JNICALL Java_org_opencv_samples_tutorial3_Sample3View_FindFeatures(JNIEnv* env, jobject thiz, jint width, jint height, jbyteArray yuv, jintArray rgba)
|
||||
{
|
||||
jbyte* _yuv = env->GetByteArrayElements(yuv, 0);
|
||||
jint* _rgba = env->GetIntArrayElements(rgba, 0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Sample 2: Native API</string>
|
||||
<string name="app_name">Tutorial 2 Advanced - 1. Add Native OpenCV</string>
|
||||
</resources>
|
||||
|
@ -1,14 +1,14 @@
|
||||
package org.opencv.samples.s2;
|
||||
package org.opencv.samples.tutorial3;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.Window;
|
||||
|
||||
public class Sample2Native extends Activity {
|
||||
public class Sample3Native extends Activity {
|
||||
private static final String TAG = "Sample::Activity";
|
||||
|
||||
public Sample2Native() {
|
||||
public Sample3Native() {
|
||||
Log.i(TAG, "Instantiated new " + this.getClass());
|
||||
}
|
||||
|
||||
@ -18,6 +18,6 @@ public class Sample2Native extends Activity {
|
||||
Log.i(TAG, "onCreate");
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
setContentView(new Sample2View(this));
|
||||
setContentView(new Sample3View(this));
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
package org.opencv.samples.s2;
|
||||
package org.opencv.samples.tutorial3;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
|
||||
class Sample2View extends SampleViewBase {
|
||||
class Sample3View extends SampleViewBase {
|
||||
|
||||
public Sample2View(Context context) {
|
||||
public Sample3View(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.opencv.samples.s2;
|
||||
package org.opencv.samples.tutorial3;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -3,6 +3,6 @@
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="gen"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||
<classpathentry kind="src" path="opencv2.3.1_src"/>
|
||||
<classpathentry kind="src" path="OpenCV-2.3.1_src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Sample 4 Mixed</name>
|
||||
<name>Tutorial 2 Advanced - 2. Mix Java\Native OpenCV</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
@ -32,9 +32,9 @@
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>opencv2.3.1_src</name>
|
||||
<name>OpenCV-2.3.1_src</name>
|
||||
<type>2</type>
|
||||
<locationURI>_android_opencv2_3_1_d2471b5d/src</locationURI>
|
||||
<locationURI>_android_OpenCV_2_3_1_df28900a/src</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.opencv.samples.s4"
|
||||
package="org.opencv.samples.tutorial4"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
|
@ -8,7 +8,7 @@ using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
extern "C" {
|
||||
JNIEXPORT void JNICALL Java_org_opencv_samples_s4_Sample4View_FindFeatures(JNIEnv* env, jobject thiz, jlong addrGray, jlong addrRgba)
|
||||
JNIEXPORT void JNICALL Java_org_opencv_samples_tutorial4_Sample4View_FindFeatures(JNIEnv* env, jobject thiz, jlong addrGray, jlong addrRgba)
|
||||
{
|
||||
Mat* pMatGr=(Mat*)addrGray;
|
||||
Mat* pMatRgb=(Mat*)addrRgba;
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Sample 4: Mixed</string>
|
||||
<string name="app_name">Tutorial 2 Advanced - 2. Mix Java\Native OpenCV</string>
|
||||
</resources>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.opencv.samples.s4;
|
||||
package org.opencv.samples.tutorial4;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.opencv.samples.s4;
|
||||
package org.opencv.samples.tutorial4;
|
||||
|
||||
import org.opencv.*;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.opencv.samples.s4;
|
||||
package org.opencv.samples.tutorial4;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user