camera.processPicture
处理之前拍摄但尚未处理的图片。
此命令仅在您支持 delayProcessing
时才相关,因为
处理过程需要很长时间如果你不支持 delayProcessing
,
对此命令的请求应该会失败,并生成错误代码 disabledCommand。
此命令是在 API 级别 2 中添加的。
参数
- previewFileUrls:未处理图片的网址列表。
如果您要处理相机中所有未处理的图片,则为 [“all”]。
此字段不能为空。如果相机无法处理任何图片,
并不会返回错误,而是会忽略该网址并继续
极端情况可以是
previewToFinalFileUrls
,
作为空 JSONObject 返回。
结果
- previewToFinalFileUrls: JSON <key, value=""> 的 JSONObject
键值对,其中每个键都是预览图片的绝对网址,每个键
是对应的最终处理图片,可用于下载
直接使用相机拍摄请注意,此命令类似于
Camera.takePicture,不返回
previewToFinalFileUrls
(本段后面将会介绍的特殊情况除外),因为
处理(包括相机内拼接)通常需要一段时间(因
从几秒到几分钟)即可完成。系统会获取命令的进度
使用 /osc/commands/status API 定期轮询相机,并且
previewToFinalFileUrls
是执行以下命令时返回的结果:
。如果在命令完成之前与相机的连接断开,
客户端可以使用 listFiles
在重新连接到相机时获取最终图像的网址,或者
发出另一个 processPicture 命令,该命令应该返回
previewToFinalFileUrls
如果图片已经
。</key,>
错误
- disabledCommand:如果您不支持延迟处理。
- invalidParameterName:输入参数名称为
无法识别。
- invalidParameterValue::输入参数名称为
但其值无效;例如
previewFileUrls
无效。
命令 I/O |
命令输入 |
{ "parameters": { "previewFileUrls": [ "previewFileUrl1", "previewFileUrl2", "previewFileUrl3", ... "previewFileUrln" ] } } |
命令输出 |
{ "results": { "previewToFinalFileUrls":{ "previewFileUrl1": "finalFileUrl1", "previewFileUrl2": "finalFileUrl2", "previewFileUrl3": "finalFileUrl3", ... "previewFileUrln": "finalFileUrln" } } } |
命令输出(错误) |
{ "error": { "code": "disabledCommand", "message": "Command is currently disabled." } } |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-21。
[null,null,["最后更新时间 (UTC):2024-08-21。"],[[["This command processes previously captured but unprocessed images, relevant only if `delayProcessing` is supported."],["It accepts a list of preview image URLs as input, processing them into final images if possible, ignoring problematic URLs."],["The command returns a JSON object mapping preview image URLs to their corresponding processed final image URLs."],["It is only available in API level 2 and above, returning a `disabledCommand` error if `delayProcessing` is not supported."],["Potential errors include `invalidParameterName` for unrecognized input parameters and `invalidParameterValue` for invalid values like incorrect URLs."]]],["This command processes previously captured, unprocessed images using a list of `previewFileUrls`. If \"all\" is provided, all unprocessed images are processed. The camera ignores problematic URLs and returns a `previewToFinalFileUrls` JSONObject mapping input URLs to final processed URLs. Errors include `disabledCommand` if delay processing isn't supported, and parameter-related issues like `invalidParameterName` or `invalidParameterValue`. This command requires API level 2.\n"]]