camera.processPicture
Stay organized with collections
Save and categorize content based on your preferences.
Process images, which were previously captured, but not processed yet.
This command is relevant only if you support delayProcessing
since
the processing takes long. If you don’t support delayProcessing
,
the request for this command should fail with error code disabledCommand.
This command was added in API level 2.
Parameters
- 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.
Results
- 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 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
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.
Errors
- disabledCommand: If you don’t support delay processing.
- invalidParameterName: The input parameter name is
unrecognized.
- invalidParameterValue: The input parameter name is
recognized, but its value is invalid; for example, any URL in
previewFileUrls
is invalid.
Command I/O |
Command Input |
{
"parameters": {
"previewFileUrls": [
"previewFileUrl1",
"previewFileUrl2",
"previewFileUrl3",
...
"previewFileUrln"
]
}
} |
Command Output |
{
"results": {
"previewToFinalFileUrls":{
"previewFileUrl1": "finalFileUrl1",
"previewFileUrl2": "finalFileUrl2",
"previewFileUrl3": "finalFileUrl3",
...
"previewFileUrln": "finalFileUrln"
}
}
} |
Command Output (Error) |
{
"error": {
"code": "disabledCommand",
"message": "Command is currently disabled."
}
} |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[null,null,["Last updated 2024-10-09 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.\" } } ``` |"]]