Commit e95fc274 authored by Alexander Smorkalov's avatar Alexander Smorkalov

Samples updated

In tutorial-1 fps meter enabled via layout.xml. Camera id is set to "any" via lauout.xml;
In tutorial-2 message moved ion the bottom of the screen.
parent 0efc32fc
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:opencv="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" > android:layout_height="match_parent" >
...@@ -7,12 +8,16 @@ ...@@ -7,12 +8,16 @@
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"
android:id="@+id/tutorial1_activity_java_surface_view" /> android:id="@+id/tutorial1_activity_java_surface_view"
opencv:show_fps="true"
opencv:camera_id="any" />
<org.opencv.android.NativeCameraView <org.opencv.android.NativeCameraView
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"
android:id="@+id/tutorial1_activity_native_surface_view" /> android:id="@+id/tutorial1_activity_native_surface_view"
opencv:show_fps="true"
opencv:camera_id="any" />
</LinearLayout> </LinearLayout>
...@@ -110,7 +110,7 @@ public class Sample2NativeCamera extends Activity implements CvCameraViewListene ...@@ -110,7 +110,7 @@ public class Sample2NativeCamera extends Activity implements CvCameraViewListene
case Sample2NativeCamera.VIEW_MODE_RGBA: case Sample2NativeCamera.VIEW_MODE_RGBA:
{ {
inputFrame.copyTo(mRgba); inputFrame.copyTo(mRgba);
Core.putText(mRgba, "OpenCV+Android", new Point(10, 50), 3, 1, new Scalar(255, 0, 0, 255), 2); Core.putText(mRgba, "OpenCV+Android", new Point(10, inputFrame.rows() - 10), 3, 1, new Scalar(255, 0, 0, 255), 2);
} break; } break;
case Sample2NativeCamera.VIEW_MODE_CANNY: case Sample2NativeCamera.VIEW_MODE_CANNY:
{ {
......
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