Merged android-experimental branch back to trunk.
This commit is contained in:
BIN
android/android-opencv/res/drawable-mdpi/cameraback.jpg
Normal file
BIN
android/android-opencv/res/drawable-mdpi/cameraback.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 161 KiB |
11
android/android-opencv/res/layout/calibrationviewer.xml
Normal file
11
android/android-opencv/res/layout/calibrationviewer.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical|center_horizontal">
|
||||
<TextView android:scrollbars="vertical" android:id="@+id/calibtext" android:text="" android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" android:padding="20dip"/>
|
||||
|
||||
</LinearLayout>
|
28
android/android-opencv/res/layout/camera.xml
Normal file
28
android/android-opencv/res/layout/camera.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent" android:layout_height="fill_parent"
|
||||
android:background="@drawable/cameraback">
|
||||
<!--<SurfaceView-->
|
||||
<com.opencv.camera.NativePreviewer
|
||||
android:id="@+id/nativepreviewer" android:layout_width="400dip"
|
||||
android:layout_height="300dip" android:layout_alignParentLeft="true"
|
||||
android:layout_margin="20dip" android:gravity="center_horizontal|center_vertical"
|
||||
android:layout_marginRight="20dip" />
|
||||
<LinearLayout android:id="@+id/glview_layout"
|
||||
android:layout_width="400dip" android:layout_height="300dip"
|
||||
android:layout_alignParentLeft="true" android:layout_margin="20dip"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:layout_marginRight="20dip">
|
||||
</LinearLayout>
|
||||
<LinearLayout android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent" android:orientation="vertical"
|
||||
android:layout_margin="20dip" android:gravity="center_horizontal|center_vertical"
|
||||
android:layout_alignParentRight="true">
|
||||
<ImageButton android:src="@android:drawable/ic_menu_camera"
|
||||
android:id="@+id/button_capture" android:layout_width="60dip"
|
||||
android:layout_height="60dip" android:layout_marginBottom="10dip"></ImageButton>
|
||||
<ImageButton android:src="@android:drawable/ic_menu_preferences"
|
||||
android:id="@+id/button_camera_settings" android:layout_width="60dip"
|
||||
android:layout_height="60dip" android:layout_marginBottom="10dip"></ImageButton>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
43
android/android-opencv/res/layout/camerasettings.xml
Normal file
43
android/android-opencv/res/layout/camerasettings.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent" android:layout_height="fill_parent"
|
||||
android:orientation="vertical" android:gravity="center_vertical|center_horizontal">
|
||||
<TextView android:text="@string/settings_text"
|
||||
android:autoLink="web" android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" android:padding="20dip" />
|
||||
|
||||
<LinearLayout android:id="@+id/LinearLayout01"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
<TextView android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" android:text="@string/image_size_prompt" />
|
||||
<Spinner android:id="@+id/image_size" android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" android:saveEnabled="true"
|
||||
android:prompt="@string/image_size_prompt" android:entries="@array/image_sizes">
|
||||
</Spinner>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/LinearLayout01"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
<TextView android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" android:text="@string/camera_mode_prompt" />
|
||||
<Spinner android:id="@+id/camera_mode" android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" android:saveEnabled="true"
|
||||
android:prompt="@string/camera_mode_prompt" android:entries="@array/camera_mode">
|
||||
</Spinner>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/LinearLayout01"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
<TextView android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" android:text="@string/whitebalance_prompt" />
|
||||
<Spinner android:id="@+id/whitebalance" android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" android:saveEnabled="true"
|
||||
android:prompt="@string/whitebalance_prompt" android:entries="@array/whitebalance">
|
||||
</Spinner>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
40
android/android-opencv/res/layout/chesssizer.xml
Normal file
40
android/android-opencv/res/layout/chesssizer.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical|center_horizontal">
|
||||
<TextView android:text="@string/patterntext" android:autoLink="web" android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" android:padding="20dip"/>
|
||||
<LinearLayout android:id="@+id/LinearLayout01"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
<TextView android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Corners in width direction:"/>
|
||||
<Spinner android:id="@+id/rows"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:saveEnabled="true"
|
||||
android:prompt="@string/chesspromptx"
|
||||
android:entries="@array/chesssizes">
|
||||
</Spinner>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/LinearLayout01"
|
||||
android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
<TextView android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" android:text="Corners in height direction:"/>
|
||||
<Spinner android:id="@+id/cols"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:saveEnabled="true"
|
||||
android:prompt="@string/chessprompty"
|
||||
android:entries="@array/chesssizes">
|
||||
</Spinner>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
11
android/android-opencv/res/values/attrs.xml
Normal file
11
android/android-opencv/res/values/attrs.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<declare-styleable name="CameraParams">
|
||||
|
||||
<attr name="preview_width" format="integer"/>
|
||||
<attr name="preview_height" format="integer"/>
|
||||
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
21
android/android-opencv/res/values/chessnumbers.xml
Normal file
21
android/android-opencv/res/values/chessnumbers.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="chesssizes">
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
<item>8</item>
|
||||
<item>9</item>
|
||||
<item>10</item>
|
||||
<item>11</item>
|
||||
<item>12</item>
|
||||
<item>13</item>
|
||||
</string-array>
|
||||
<string name="chesspromptx">
|
||||
Choose the width:</string>
|
||||
<string name="chessprompty">
|
||||
Choose the height:</string>
|
||||
</resources>
|
31
android/android-opencv/res/values/settingnumbers.xml
Normal file
31
android/android-opencv/res/values/settingnumbers.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="image_sizes">
|
||||
<item>320x240</item>
|
||||
<item>400x300</item>
|
||||
<item>640x480</item>
|
||||
<item>800x600</item>
|
||||
<item>1000x800</item>
|
||||
</string-array>
|
||||
<string-array name="camera_mode">
|
||||
<item>color</item>
|
||||
<item>BW</item>
|
||||
</string-array>
|
||||
<string name="image_size_prompt">
|
||||
Image Size:\n(may not be exact)
|
||||
</string>
|
||||
<string name="camera_mode_prompt">
|
||||
Camera Mode:
|
||||
</string>
|
||||
|
||||
<string-array name="whitebalance">
|
||||
<item>auto</item>
|
||||
<item>incandescent</item>
|
||||
<item>fluorescent</item>
|
||||
<item>daylight</item>
|
||||
<item>cloudy-daylight</item>
|
||||
</string-array>
|
||||
<string name="whitebalance_prompt">
|
||||
Whitebalance:
|
||||
</string>
|
||||
</resources>
|
20
android/android-opencv/res/values/strings.xml
Normal file
20
android/android-opencv/res/values/strings.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Calibration</string>
|
||||
<string name="patternsize">Pattern Size</string>
|
||||
<string name="patterntext">Please choose the width and height (number of inside corners) of the checker
|
||||
board pattern you will be using for calibration. Default is 6 by 8 corners. You may find a checkerboard pattern at
|
||||
http://opencv.willowgarage.com/pattern</string>
|
||||
|
||||
<string name="patternlink">http://opencv.willowgarage.com/pattern</string>
|
||||
<string name="camera_settings_label">Camera Settings</string>
|
||||
<string name="settings_text">Change the camera settings. Be aware that BW is much faster for previewing, than color. Also, if you change the image size, you should
|
||||
rerun calibration. Default values: BW and 640x480 are a good start.</string>
|
||||
|
||||
<string name="calibration_service_started">Calibration calculations have started...</string>
|
||||
<string name="calibration_service_stopped">Calibration calculations has stopped.</string>
|
||||
<string name="calibration_service_finished">Calibration finished, you camera is calibrated.</string>
|
||||
<string name="calibration_service_label">Calibration</string>
|
||||
<string name="calibration_not_enough">Please capture atleast 10 images of the pattern!</string>
|
||||
|
||||
</resources>
|
Reference in New Issue
Block a user