Commit 902463b6 authored by Alexander Smorkalov's avatar Alexander Smorkalov

Tutorial4 sample renamed to Tutorial-2-MixedProcessing

parent 08cd51df
...@@ -12,7 +12,7 @@ add_subdirectory(image-manipulations) ...@@ -12,7 +12,7 @@ add_subdirectory(image-manipulations)
add_subdirectory(color-blob-detection) add_subdirectory(color-blob-detection)
add_subdirectory(tutorial-1-camerapreview) add_subdirectory(tutorial-1-camerapreview)
add_subdirectory(tutorial-4-mixed) add_subdirectory(tutorial-2-mixedprocessing)
add_subdirectory(tutorial-5-cameracontrol) add_subdirectory(tutorial-5-cameracontrol)
#hello-android sample #hello-android sample
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.opencv.samples.tutorial4" package="org.opencv.samples.tutorial2"
android:versionCode="21" android:versionCode="21"
android:versionName="2.1"> android:versionName="2.1">
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
android:icon="@drawable/icon" android:icon="@drawable/icon"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<activity android:name="Sample4Mixed" <activity android:name="Sample2MixedProcessing"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="landscape" android:screenOrientation="landscape"
android:configChanges="keyboardHidden|orientation"> android:configChanges="keyboardHidden|orientation">
......
set(sample example-tutorial-4-mixed) set(sample example-tutorial-2-nativeprocessing)
if(BUILD_FAT_JAVA_LIB) if(BUILD_FAT_JAVA_LIB)
set(native_deps opencv_java) set(native_deps opencv_java)
......
...@@ -8,9 +8,9 @@ using namespace std; ...@@ -8,9 +8,9 @@ using namespace std;
using namespace cv; using namespace cv;
extern "C" { extern "C" {
JNIEXPORT void JNICALL Java_org_opencv_samples_tutorial4_Sample4Mixed_FindFeatures(JNIEnv*, jobject, jlong addrGray, jlong addrRgba); JNIEXPORT void JNICALL Java_org_opencv_samples_tutorial2_Sample2NativeProcessing_FindFeatures(JNIEnv*, jobject, jlong addrGray, jlong addrRgba);
JNIEXPORT void JNICALL Java_org_opencv_samples_tutorial4_Sample4Mixed_FindFeatures(JNIEnv*, jobject, jlong addrGray, jlong addrRgba) JNIEXPORT void JNICALL Java_org_opencv_samples_tutorial2_Sample2NativeProcessing_FindFeatures(JNIEnv*, jobject, jlong addrGray, jlong addrRgba)
{ {
Mat& mGr = *(Mat*)addrGray; Mat& mGr = *(Mat*)addrGray;
Mat& mRgb = *(Mat*)addrRgba; Mat& mRgb = *(Mat*)addrRgba;
......
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
<org.opencv.android.JavaCameraView <org.opencv.android.JavaCameraView
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:id="@+id/tutorial4_activity_surface_view" /> android:id="@+id/tutorial2_activity_surface_view" />
</LinearLayout> </LinearLayout>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="app_name">OCV T4 Mix Java+Native OpenCV</string> <string name="app_name">OCV T2 Mixed Processing</string>
</resources> </resources>
package org.opencv.samples.tutorial4; package org.opencv.samples.tutorial2;
import org.opencv.android.BaseLoaderCallback; import org.opencv.android.BaseLoaderCallback;
import org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame; import org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame;
...@@ -17,7 +17,7 @@ import android.view.Menu; ...@@ -17,7 +17,7 @@ import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.WindowManager; import android.view.WindowManager;
public class Sample4Mixed extends Activity implements CvCameraViewListener2 { public class Sample2MixedProcessing extends Activity implements CvCameraViewListener2 {
private static final String TAG = "OCVSample::Activity"; private static final String TAG = "OCVSample::Activity";
private static final int VIEW_MODE_RGBA = 0; private static final int VIEW_MODE_RGBA = 0;
...@@ -58,7 +58,7 @@ public class Sample4Mixed extends Activity implements CvCameraViewListener2 { ...@@ -58,7 +58,7 @@ public class Sample4Mixed extends Activity implements CvCameraViewListener2 {
} }
}; };
public Sample4Mixed() { public Sample2MixedProcessing() {
Log.i(TAG, "Instantiated new " + this.getClass()); Log.i(TAG, "Instantiated new " + this.getClass());
} }
...@@ -69,9 +69,9 @@ public class Sample4Mixed extends Activity implements CvCameraViewListener2 { ...@@ -69,9 +69,9 @@ public class Sample4Mixed extends Activity implements CvCameraViewListener2 {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.tutorial4_surface_view); setContentView(R.layout.tutorial2_surface_view);
mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.tutorial4_activity_surface_view); mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.tutorial2_activity_surface_view);
mOpenCvCameraView.setCvCameraViewListener(this); mOpenCvCameraView.setCvCameraViewListener(this);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment