camera.processPicture
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이전에 캡처했지만 아직 처리하지 않은 이미지 처리
이 명령어는 delayProcessing
를 지원하는 경우에만 관련이 있습니다.
처리하는 데 시간이 오래 걸립니다. delayProcessing
를 지원하지 않는 경우
이 명령어에 대한 요청이 실패하고 오류 코드 disabledCommand가 표시됩니다.
이 명령어는 API 수준 2에 추가되었습니다.
매개변수
- previewFileUrls: 처리되지 않은 이미지의 URL 목록입니다.
카메라에서 처리되지 않은 모든 이미지를 처리하려면 [“all”]을 선택해야 합니다.
이 입력란은 비워둘 수 없습니다. 카메라에서 이미지를 처리하는 데 문제가 있는 경우 카메라는
가 오류로 응답하지 않는 대신 해당 URL을 무시하고
극단적인 경우는
previewToFinalFileUrls
가 될 수 있습니다.
빈 JSONObject로 반환됩니다.
결과
- previewToFinalFileUrls: JSON <key, value="">의 JSONObject입니다.
쌍(각 키는 미리보기 이미지의 절대 URL임)과 각 키는
는 해당하는 최종 처리된 이미지이며,
카메라에서 바로 촬영합니다. 이 명령어는
camera.takePicture를 사용하고
previewToFinalFileUrls
를 반환하지 않음
즉시 (이 단락 뒷부분에서 설명하는 특수한 사례 제외)
처리 (카메라 내 병합 포함)에 보통 시간이 걸립니다 (다양함).
완료할 수 있습니다. 명령어 진행 상황 가져오기
/osc/commands/status API를 사용하여 주기적으로 카메라를 폴링하고
previewToFinalFileUrls
는 명령어가 실행될 때 반환되는 결과입니다.
있습니다. 명령이 완료되기 전에 카메라 연결이 끊어지면
클라이언트는 listFiles
를 사용할 수 있습니다.
카메라에 다시 연결될 때 최종 이미지의 URL을 얻거나
다른 processPicture 명령어를 발급합니다. 이 명령어는
이미지가 이미 업로드된 경우 즉시 previewToFinalFileUrls
재연결 전에 처리됩니다.</key,>
오류
- disableCommand: 지연 처리를 지원하지 않는 경우
- 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."
}
} |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-08-21(UTC)
[null,null,["최종 업데이트: 2024-08-21(UTC)"],[[["\u003cp\u003eThis command processes previously captured but unprocessed images, relevant only if \u003ccode\u003edelayProcessing\u003c/code\u003e is supported.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts a list of preview image URLs as input, processing them into final images if possible, ignoring problematic URLs.\u003c/p\u003e\n"],["\u003cp\u003eThe command returns a JSON object mapping preview image URLs to their corresponding processed final image URLs.\u003c/p\u003e\n"],["\u003cp\u003eIt is only available in API level 2 and above, returning a \u003ccode\u003edisabledCommand\u003c/code\u003e error if \u003ccode\u003edelayProcessing\u003c/code\u003e is not supported.\u003c/p\u003e\n"],["\u003cp\u003ePotential errors include \u003ccode\u003einvalidParameterName\u003c/code\u003e for unrecognized input parameters and \u003ccode\u003einvalidParameterValue\u003c/code\u003e for invalid values like incorrect URLs.\u003c/p\u003e\n"]]],["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"],null,["# camera.processPicture\n\nProcess images, which were previously captured, but not processed yet.\nThis command is relevant only if you support `delayProcessing` since\nthe processing takes long. If you don't support `delayProcessing`,\nthe request for this command should fail with error code disabledCommand.\n**This command was added in API level 2.**\n\nParameters\n----------\n\n- **previewFileUrls:** A list of URLs of unprocessed images. If you want to process all unprocessed images in the camera, it is \\[\"all\"\\]. It cannot be empty. If the camera has trouble processing any image, the camera doesn't respond with error, instead, it should ignore that URL and proceed with others, and the extreme case can be `previewToFinalFileUrls` is returned as an empty JSONObject.\n\nResults\n-------\n\n- **previewToFinalFileUrls:** A JSONObject of JSON pairs, where each key is the absolute URL of the preview image, and each key is the corresponding final processed image and can be used to download directly from the camera. Please note this command is similar to camera.takePicture, and doesn't return `previewToFinalFileUrls` immediately (except for a corner case explained later in this paragraph) since the processing (including in-camera stitching) usually takes a while (varies from seconds to minutes) to complete. The progress of the command is obtained by polling the camera periodically using the [/osc/commands/status](/streetview/open-spherical-camera/guides/osc/commands/status) API and `previewToFinalFileUrls` is the result returned when the command finishes. If the connection to camera is lost before the command finishes, the client can use [listFiles](/streetview/open-spherical-camera/reference/camera/listFiles) to obtain the URLs of the final images when connected to the camera again or issue another processPicture command, which should return `previewToFinalFileUrls` immediately if the images were already processed before the reconnection.\n\nErrors\n------\n\n- **disabledCommand:** If you don't support delay processing.\n- **invalidParameterName:** The input parameter name is unrecognized.\n- **invalidParameterValue:** The input parameter name is recognized, but its value is invalid; for example, any URL in `previewFileUrls` is invalid.\n\n| Command I/O ----------- ||\n|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Command Input** | ```text { \"parameters\": { \"previewFileUrls\": [ \"previewFileUrl1\", \"previewFileUrl2\", \"previewFileUrl3\", ... \"previewFileUrln\" ] } } ``` |\n| **Command Output** | ```text { \"results\": { \"previewToFinalFileUrls\":{ \"previewFileUrl1\": \"finalFileUrl1\", \"previewFileUrl2\": \"finalFileUrl2\", \"previewFileUrl3\": \"finalFileUrl3\", ... \"previewFileUrln\": \"finalFileUrln\" } } } ``` |\n| **Command Output (Error)** | ```text { \"error\": { \"code\": \"disabledCommand\", \"message\": \"Command is currently disabled.\" } } ``` |"]]