Difference between revisions of "Template:RK3399-Android8"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(updated by API)
Line 17: Line 17:
  
 
===使用USB摄像头进行拍照和录像===
 
===使用USB摄像头进行拍照和录像===
Android系统支持USB摄像头拍照和录像,使用系统自带的 Camera 应用即可,有两点需要注意的地方:
+
Android系统同时支持USB摄像头拍照和录像,使用系统自带的 Camera 应用即可,有两点需要注意的地方:<br />
1)需要根据摄像头规格,选择合适的录像分辨率,可以先选择CIF分辨率,测试OK之后再尝试更高的分辨率,设置界面如下所示:
+
1)需要根据摄像头规格,选择合适的录像分辨率,可以先选择CIF分辨率,测试OK之后再尝试更高的分辨率,设置界面如下所示:<br />
[[File:Android8-usbcamera-setting.png|frameless|600px]]; <br />
+
[[File:Android8-usbcamera-setting.png|frameless|800px]]; <br />
 
2)USB摄像头不能与MIPI摄像头同时使用,也不能热拨插,插入摄像头后需要重新开机才能识别;<br />
 
2)USB摄像头不能与MIPI摄像头同时使用,也不能热拨插,插入摄像头后需要重新开机才能识别;<br />
 
<br />
 
<br />
 
我们测试过的USB摄像头型号如下:罗技C270,罗技C922 PRO<br />
 
我们测试过的USB摄像头型号如下:罗技C270,罗技C922 PRO<br />
<br />
 
  
 
===Android8.1 hardware access===
 
===Android8.1 hardware access===

Revision as of 02:04, 14 November 2018

1 Work with Android 8.1

FriendlyElec provides a full Android8.1 BSP for {{{1}}}. The source code is hosted at gitlab.com and is open source. The BSP supports GPU and VPU hardware acceleration.

1.1 Connect MIPI Camera to T4

FriendlyElec developed a MIPI camera CAM1320 for {{{1}}} and it works under Android. You can use this camera to take pictures and record video. The operation is straightforward. You just need to connect the camera at your {{{1}}}'s MIPI interface, boot your T4 to Android and start Android's camera app.

The {{{1}}} has two MIPI interfaces: one front camera and the other rear camera:

Interface Camera Type(front or rear)
MIPI-CSI1 Android rear camera
MIPI-CSI2 Android front camera

1.2 使用USB摄像头进行拍照和录像

Android系统同时支持USB摄像头拍照和录像,使用系统自带的 Camera 应用即可,有两点需要注意的地方:
1)需要根据摄像头规格,选择合适的录像分辨率,可以先选择CIF分辨率,测试OK之后再尝试更高的分辨率,设置界面如下所示:
Android8-usbcamera-setting.png;
2)USB摄像头不能与MIPI摄像头同时使用,也不能热拨插,插入摄像头后需要重新开机才能识别;

我们测试过的USB摄像头型号如下:罗技C270,罗技C922 PRO

1.3 Android8.1 hardware access

You can use the FriendlyThings SDK to access and control hardware resources on the motherboard in the Android App, such as Uart, SPI, I2C, GPIO and other interfaces. For details, please refer to the following two documents.:

1.4 Android Neural Networks Sample

Android8.1 BSP预装了Rockchip为Android8.1提供的Android NN SDK,支持GPU加速。
我们提供的Android8固件中预装了Android NN的示例程序:TfLiteCameraDemo,这是一个使用Rockchip AndroidNN GPU加速的MobileNet分类器Demo,运行时需要主板连接有摄像头模块,USB摄像头和CSI摄像头都是支持的,示例程序通过点击首页的 “TfLiteCameraDemo”图标进入,运行效果如下所示:

TfLiteCameraDemo.png
关于Android NN SDK的详细描述,可以参考原厂的这份文档:[RK3399_Android8.1_AndroidNN_SDK_V1.0_20180605发布说明.pdf]
TfLiteCameraDemo示例源代码下载地址:[TfLiteCameraDemo源代码]