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>
<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>
<?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>
</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>
<?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">
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">
<?xml version="1.0" encoding="utf-8"?>\r
<resources>\r
- <string name="app_name">Sample 3: Native Camera</string>\r
+ <string name="app_name">Tutorial 1 Basic - 2. Use OpenCV Camera</string>\r
</resources>\r
-package org.opencv.samples.s3;
+package org.opencv.samples.tutorial2;
import android.app.Activity;
import android.os.Bundle;
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;
public static int viewMode = VIEW_MODE_RGBA;
- public Sample3NativeCamera() {
+ public Sample2NativeCamera() {
Log.i(TAG, "Instantiated new " + this.getClass());
}
Log.i(TAG, "onCreate");
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
- setContentView(new Sample3View(this));
+ setContentView(new Sample2View(this));
}
@Override
-package org.opencv.samples.s3;
+package org.opencv.samples.tutorial2;
import org.opencv.*;
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);
}
@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;
-package org.opencv.samples.s3;
+package org.opencv.samples.tutorial2;
import java.util.List;
<?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>
<?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">
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">
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);
<?xml version="1.0" encoding="utf-8"?>\r
<resources>\r
- <string name="app_name">Sample 2: Native API</string>\r
+ <string name="app_name">Tutorial 2 Advanced - 1. Add Native OpenCV</string>\r
</resources>\r
-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());
}
Log.i(TAG, "onCreate");
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
- setContentView(new Sample2View(this));
+ setContentView(new Sample3View(this));
}
}
-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);
}
-package org.opencv.samples.s2;
+package org.opencv.samples.tutorial3;
import java.util.List;
<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>
<?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>
</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>
<?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">
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;
<?xml version="1.0" encoding="utf-8"?>\r
<resources>\r
- <string name="app_name">Sample 4: Mixed</string>\r
+ <string name="app_name">Tutorial 2 Advanced - 2. Mix Java\Native OpenCV</string>\r
</resources>\r
-package org.opencv.samples.s4;
+package org.opencv.samples.tutorial4;
import android.app.Activity;
import android.os.Bundle;
-package org.opencv.samples.s4;
+package org.opencv.samples.tutorial4;
import org.opencv.*;
-package org.opencv.samples.s4;
+package org.opencv.samples.tutorial4;
import java.util.List;