Code review notes fixed.

This commit is contained in:
Alexander Smorkalov 2013-02-11 11:36:12 +04:00
parent 9a2d6f854b
commit d067dc5a05
11 changed files with 20 additions and 20 deletions

View File

@ -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="Sample1CameraPreview" <activity android:name="Tutorial1Activity"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="landscape" android:screenOrientation="landscape"
android:configChanges="keyboardHidden|orientation"> android:configChanges="keyboardHidden|orientation">

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="app_name">OCV T1 Camera Preview</string> <string name="app_name">OCV T1 Preview</string>
</resources> </resources>

View File

@ -17,7 +17,7 @@ import android.view.SurfaceView;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.Toast; import android.widget.Toast;
public class Sample1Java extends Activity implements CvCameraViewListener2 { public class Tutorial1Activity extends Activity implements CvCameraViewListener2 {
private static final String TAG = "OCVSample::Activity"; private static final String TAG = "OCVSample::Activity";
private CameraBridgeViewBase mOpenCvCameraView; private CameraBridgeViewBase mOpenCvCameraView;
@ -41,7 +41,7 @@ public class Sample1Java extends Activity implements CvCameraViewListener2 {
} }
}; };
public Sample1Java() { public Tutorial1Activity() {
Log.i(TAG, "Instantiated new " + this.getClass()); Log.i(TAG, "Instantiated new " + this.getClass());
} }

View File

@ -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="Sample2MixedProcessing" <activity android:name="Tutorial2Activity"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="landscape" android:screenOrientation="landscape"
android:configChanges="keyboardHidden|orientation"> android:configChanges="keyboardHidden|orientation">

View File

@ -1,4 +1,4 @@
set(sample example-tutorial-2-nativeprocessing) set(sample example-tutorial-2-mixedprocessing)
if(BUILD_FAT_JAVA_LIB) if(BUILD_FAT_JAVA_LIB)
set(native_deps opencv_java) set(native_deps opencv_java)

View File

@ -8,9 +8,9 @@ using namespace std;
using namespace cv; using namespace cv;
extern "C" { extern "C" {
JNIEXPORT void JNICALL Java_org_opencv_samples_tutorial2_Sample2NativeProcessing_FindFeatures(JNIEnv*, jobject, jlong addrGray, jlong addrRgba); JNIEXPORT void JNICALL Java_org_opencv_samples_tutorial2_Tuturial2Activity_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_tutorial2_Tutorial2Activity_FindFeatures(JNIEnv*, jobject, jlong addrGray, jlong addrRgba)
{ {
Mat& mGr = *(Mat*)addrGray; Mat& mGr = *(Mat*)addrGray;
Mat& mRgb = *(Mat*)addrRgba; Mat& mRgb = *(Mat*)addrRgba;

View File

@ -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 Sample2MixedProcessing extends Activity implements CvCameraViewListener2 { public class Tutorial2Activity 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 Sample2MixedProcessing extends Activity implements CvCameraViewList
} }
}; };
public Sample2MixedProcessing() { public Tutorial2Activity() {
Log.i(TAG, "Instantiated new " + this.getClass()); Log.i(TAG, "Instantiated new " + this.getClass());
} }

View File

@ -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="Sample3CameraControl" <activity android:name="Tutorial3Activity"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="landscape" android:screenOrientation="landscape"
android:configChanges="keyboardHidden|orientation"> android:configChanges="keyboardHidden|orientation">

View File

@ -3,7 +3,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" > android:layout_height="match_parent" >
<org.opencv.samples.tutorial5.SampleJavaCameraView <org.opencv.samples.tutorial3.Tutorial3View
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:visibility="gone" android:visibility="gone"

View File

@ -28,10 +28,10 @@ import android.view.View.OnTouchListener;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.Toast; import android.widget.Toast;
public class Sample3CameraControl extends Activity implements CvCameraViewListener2, OnTouchListener { public class Tutorial3Activity extends Activity implements CvCameraViewListener2, OnTouchListener {
private static final String TAG = "OCVSample::Activity"; private static final String TAG = "OCVSample::Activity";
private SampleJavaCameraView mOpenCvCameraView; private Tutorial3View mOpenCvCameraView;
private List<Size> mResolutionList; private List<Size> mResolutionList;
private MenuItem[] mEffectMenuItems; private MenuItem[] mEffectMenuItems;
private SubMenu mColorEffectsMenu; private SubMenu mColorEffectsMenu;
@ -46,7 +46,7 @@ public class Sample3CameraControl extends Activity implements CvCameraViewListen
{ {
Log.i(TAG, "OpenCV loaded successfully"); Log.i(TAG, "OpenCV loaded successfully");
mOpenCvCameraView.enableView(); mOpenCvCameraView.enableView();
mOpenCvCameraView.setOnTouchListener(Sample3CameraControl.this); mOpenCvCameraView.setOnTouchListener(Tutorial3Activity.this);
} break; } break;
default: default:
{ {
@ -56,7 +56,7 @@ public class Sample3CameraControl extends Activity implements CvCameraViewListen
} }
}; };
public Sample3CameraControl() { public Tutorial3Activity() {
Log.i(TAG, "Instantiated new " + this.getClass()); Log.i(TAG, "Instantiated new " + this.getClass());
} }
@ -69,7 +69,7 @@ public class Sample3CameraControl extends Activity implements CvCameraViewListen
setContentView(R.layout.tutorial3_surface_view); setContentView(R.layout.tutorial3_surface_view);
mOpenCvCameraView = (SampleJavaCameraView) findViewById(R.id.tutorial3_activity_java_surface_view); mOpenCvCameraView = (Tutorial3View) findViewById(R.id.tutorial3_activity_java_surface_view);
mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE); mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);

View File

@ -14,11 +14,11 @@ import android.hardware.Camera.Size;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.util.Log; import android.util.Log;
public class SampleJavaCameraView extends JavaCameraView { public class Tutorial3View extends JavaCameraView {
private static final String TAG = "Sample::SampleJavaCameraView"; private static final String TAG = "Sample::Tutorial3View";
public SampleJavaCameraView(Context context, AttributeSet attrs) { public Tutorial3View(Context context, AttributeSet attrs) {
super(context, attrs); super(context, attrs);
} }