Android Google Lens in Camera

本文概述了集成Google Lens到Android设备上的具体要求,包括硬件特性如后置摄像头规格、处理器性能、内存大小等,以及软件方面的要求,例如集成到系统默认相机应用中。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

google lens in camera 原文以及翻译:
Google Lens in Camera runs within the Android Google Search App (AGSA), which is Google’s main app on Android. Lens SDK is available for download on the Google Lens page. Lens SDK and logo are available for download at Google Lens SDK
(https://drive.google.com/a/google.com/uc?export=download&id=1Zc2cxA8QX7de8QJSC_6YOFGFfqWXbSM5) and Google Lens Branding (https://drive.google.com/a/google.com/uc?export=download&id=1TnRv7poRfwbQvWAA8M8n0gqplG–1dsL), respectively . The Lens SDK needs to be integrated following the Google Lens integration guidelines (/gms/building/apps/lens#integration-steps) .
The Lens libraries that provide extended functionality to the Android Open Source Project (AOSP) assume an Android-compatible device, which allows maximum compatibility with the Android app development ecosystem and distribution systems. DEVICEs MAY optionally integrate the Google Lens feature in their app. However, DEVICEs integrating the Google Lens feature MUST meet the requirements below.

译文:Camera中的Google Lens可以在Android Google搜索应用(AGSA)中运行,这是Google在Android上的主要应用。 Lens SDK可在Google Lens页面上下载。 Lens SDK和徽标可从Google Lens SDK下载
(https://drive.google.com/a/google.com/uc?export=download&id=1Zc2cxA8QX7de8QJSC_6YOFGFfqWXbSM5)和Google Lens品牌(https://drive.google.com/a/google.com/uc?export= download&id = 1TnRv7poRfwbQvWAA8M8n0gqplG–1dsL)。 必须遵循Google Lens集成准则(/ gms / building / apps / lens#integration-steps)集成Lens SDK。
为Android开源项目(AOSP)提供扩展功能的Lens库采用的是Android兼容设备,从而最大程度地与Android应用程序开发生态系统和发行系统兼容。 设备可以选择将Google Lens功能集成到他们的应用中。 但是,集成了Google镜头功能的设备必须满足以下要求。

[GMS-7.14-001] An Androidd device with the following hardware features is REQUIRED:

A rear-facing camera (as described in CDD section 7.5.1)
The DEVICE MUST make this feature available to third-party apps.

译文:将Google Lens功能集成到他们的应用中。但是,DEVICE集成了Google摄像头功能必须满足以下要求。
Android设备需要具有后置摄像头硬件功能的,
并且三方应用能够使用该功能

[GMS-7.14-002] At least one rear-facing color camera on the device MUST support CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED or higher.

译文:将Google Lens功能集成到他们的应用中。但是,DEVICE集成了Google摄像头功能必须满足以下要求。
设备上至少有一个后置彩色摄像头功能等级为
CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED或者更高等级。

[GMS-7.14-003] At least one rear-facing color camera on the device MUST be configurable with standard Camera2 APIs, or MUST have default values that support acceptable Lens performance on the device:

CaptureRequest.CONTROL_AF_MODE
CaptureRequest.CONTROL_VIDEO_STABILIZATION_MODE
CaptureRequest.EDGE_MODE
CaptureRequest.FLASH_MODE
CaptureRequest.LENS_OPTICAL_STABILIZATION_MODE
CaptureRequest.NOISE_REDUCTION_MODE

译文:设备上至少有一个后置彩色摄像头必须使用标准Camera2 API进行配置,
或者必须具有支持设备上可接受镜头性能的默认值:
CaptureRequest.CONTROL_AF_MODE
CaptureRequest.CONTROL_VIDEO_STABILIZATION_MODE
CaptureRequest.EDGE_MODE
CaptureRequest.FLASH_MODE
CaptureRequest.LENS_OPTICAL_STABILIZATION_MODE
CaptureRequest.NOISE_REDUCTION_MODE

[GMS-7.14-004] At least one rear-facing color camera on the device SHOULD conform to the following specification:

Simultaneously supports at least one 1920x1080 SurfaceTexture stream and one 640x480 stream

译文:设备上至少有一个后置彩色摄像头应符合以下规范:
同时支持至少一个1920x1080 SurfaceTexture 流 和一个 640x480 流

[GMS-7.14-005] At least one rear-facing color camera on the device SHOULD support the following features:

Zoom
Flash

译文:设备上至少有一个后置彩色摄像头应支持以下功能:
缩放
闪光灯

[GMS-7.14-006] At a minimum, the device main processor is STRONGLY RECOMMENDED meet either of the following requirements:

A main processor with at least eight (A53 class) cores of at least 1.4 GHz that allow simultaneous execution of prioritized processing threads
A main processor with at least two (A57 class) cores of at least 1.9 GHz, and two (A53 class) cores of at least 1.6 GHz

译文:强烈建议设备主处理器至少满足以下任一要求:
一种主处理器,至少有8个(A53类)核,至少1.4GHz,允许同时执行优先处理线程
一种主处理器,至少有两个(A57类)核和两个(A53类)核(至少1.6GHz)

[GMS-7.14-007] At a minimum, the device memory MUST meet the following requirement:

More than 2 GB of RAM

译文:设备存储器至少必须满足以下要求:
超过2GB的RAM

[GMS-7.14-008] At a minimum, the device screen MUST meet the following requirement:

720 px screen width

译文:设备屏幕至少必须满足以下要求:
720像素屏幕宽度

[GMS-7.14-009]
The app that the Google Lens in Camera SDK is integrated into MUST be the system’s
default camera app.
The package name of the app that the Google Lens in Camera SDK is integrated into
MUST be identi?ed in the ro.com.google.lens.oem_camera_package system property.

译文:Camera SDK中的 Google Lens 集成到的应用程序必须是系统的默认Camera应用程序。
Camera SDK中 Google Lens 集成到的应用程序的包名必须在ro.com.google.lens.oem_camera_package系统属性中标识。

[GMS-7.14-010] It’s STRONGLY RECOMMENDED to adhere to the placement requirements of Google Lens icon as described in the Google Lens branding guidelines.

译文:强烈建议遵守Google Lens品牌指南中描述的Google Lens图标的位置要求。

[GMS-7.14-011] After opening the native camera app on a device with Google Lens SDK
integrated, Google Lens should be featured as prominently as the video mode to the end
user in terms of form, ?t, and function.

译文:在集成了Google Lens SDK的设备上,打开原生camera app后,Google Lens应在形式、契合度、功能等方面与视频模式一样突出于终端用户。

[GMS-7.14-012] Lens in Camera doesn’t support large screen (tablet) devices. Lens in
Camera MUST NOT be integrated on devices where Configuration.smallestScreenWidthDp
is greater than or equal to 600 dp.

译文:相机镜头不支持大屏幕(平板)设备。
相机中的镜头不得集成在配置smallestScreenWidthDp大于或等于600 dp。

[GMS-7.14-013] Google Lens in Camera requires the support of AGSA version 11.33 or
higher.
译文:谷歌镜头在相机需要支持AGSA版本11.33或更高。

[GMS-7.14-014] The com.google.lens.feature.CAMERA_INTEGRATION feature ?ag MUST be
declared as described in the Google Lens integration guidelines(/gms/building/apps/lens#integration-steps) .

译文:com.google.lens.feature.CAMERA_INTEGRATION特性标志必须按照Google Lens集成指南中的说明声明。

通过上面14点要求就是在集成Google lens 时需要设备具有的,必须遵行。

Android Jetpack Compose 中使用 Camera1 API 进行视频预览的过程涉及到了 `CameraX` 和 `PreviewSession` 的结合。`CameraX` 是 Google 推出的一个用于 Android 设备拍摄照片和录制视频的库,它简化了原生 Camera API,并与 Jetpack Compose 兼容。 以下是使用 Jetpack Compose 结合 Camera1 API 进行预览的基本步骤: 1. **设置依赖**: 确保你的项目已经添加了 `相机` 和 `相机x-compose` 的依赖,可以在 Gradle 文件中添加以下内容: ```groovy implementation "androidx.camera:camera-core:1.0.0" implementation "androidx.camera:camera-camera2:1.0.0" implementation "androidx.camera:camera-view:1.0.0-alpha04" implementation "androidx.compose.ui:ui:1.0.0-rc06" ``` 2. **初始化相机**: 在 ViewModel 中初始化 `CameraProvider` 并选择后置摄像头: ```kotlin val cameraProvider = CameraXProvider.createInstance(this) val cameraSelector = CameraSelector.Builder() .requireLensFacing(CameraSelector.LENS_FACING_BACK) .build() cameraProvider.bindToLifecycle(viewLifecycleOwner, cameraSelector) { camera -> // ... } ``` 3. **创建预览视图**: 在 Composable 中,使用 `CameraView` 或者自定义 `SurfaceView` 来显示预览画面: ```kotlin SurfaceView( modifier = Modifier.size(800.dp, 800.dp), cameraProvider = cameraProvider ) { CameraX.startPreview(camera, this@<YourComposable>) } ``` 4. **处理预览事件**: 当预览开始时,你需要监听 `onPreviewOutputUpdated` 等回调来获取预览帧,并在需要的地方更新 UI。 5. **停止预览**: 当不再需要预览时,记得调用 `stopPreview()` 关闭预览流。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值