AI-generated Key Takeaways
-
This command processes previously captured but unprocessed images, relevant only if
delayProcessingis 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
disabledCommanderror ifdelayProcessingis not supported. -
Potential errors include
invalidParameterNamefor unrecognized input parameters andinvalidParameterValuefor invalid values like incorrect URLs.
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
previewToFinalFileUrlsis 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 previewToFinalFileUrlsimmediately (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 andpreviewToFinalFileUrlsis the result returned when the command finishes. If the connection to camera is lost before the command finishes, the client can uselistFilesto obtain the URLs of the final images when connected to the camera again or issue another processPicture command, which should returnpreviewToFinalFileUrlsimmediately 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
previewFileUrlsis 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."
}
} |