Decodes the blind watermark in an image.
Operation description
-
Before you call this operation, make sure that you are familiar with the billing of Intelligent Media Management (IMM).
**
Note that Asynchronous processing does not guarantee timely task completion.
-
Make sure that an IMM project is created. For information about how to create a project, see CreateProject .
-
The region and project specified in the request to decode a blind watermark must match those in the EncodeBlindWatermark request to encode the blind watermark.
-
A blind watermark can still be extracted even if attacks, such as compression, scaling, cropping, and color transformation, are performed on the image.
-
This operation is compatible with its earlier version DecodeBlindWatermark.
-
This operation is an asynchronous operation. After a task is executed, the task information is retained only for seven days and cannot be retrieved when the retention period elapses. You can call the GetTask or ListTasks operation to query information about the task. If you specify Notification , you can obtain information about the task based on notifications.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| imm:CreateDecodeBlindWatermarkTask | create | *Project acs:imm:{#regionId}:{#accountId}:project/{#ProjectName} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| ProjectName | string | Yes | immtest | |
| SourceURI | string | Yes | The OSS URI of the image. Specify the OSS URI in the | oss://target/sampleobject.jpg |
| StrengthLevel | string | No | The level of watermark extraction. A higher level indicates a longer time and a higher quality. Valid values:
| low |
| WatermarkType | string | No | The type of the watermark. Valid value: text. No image watermarks are supported. | text |
| TargetURI | string | No | The OSS URI of the output image. This parameter is also available in the earlier DecodeBlindWatermark operation. Specify the OSS URI in the | oss://target/targetobject.jpg |
| ImageQuality | integer | No | The quality of the output image. This parameter is also available in the earlier DecodeBlindWatermark operation. Higher image quality indicates a larger image size and higher watermark resolution quality. | 90 |
| Model | string | No | The watermark algorithm model. This parameter is also available in the earlier DecodeBlindWatermark operation. Valid values: FFT, FFT_FULL, DWT, and DWT_IBG. Default value: FFT. If this parameter is left empty, the CreateDecodeBlindWatermarkTask operation is called. Otherwise, the earlier DecodeBlindWatermark operation is called. | FFT |
| OriginalImageURI | string | No | The OSS URI of the image before the blind watermark is added. This parameter is also available in the earlier DecodeBlindWatermark operation. Do not specify this parameter when you set the Model parameter to DWT or DWT_IBG. Specify the OSS URI in the | oss://imm-test/testcases/watermarktestbefore.jpg |
| Notification | Notification | No | The notification settings. For information about the asynchronous notification format, see Asynchronous message examples. |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "4A7A2D0E-D8B8-4DA0-8127-EB32C6600ADE",
"EventId": "27C-1jyAP5qQI7RoI8lFFwvMrWtl0ft",
"TaskId": "DecodeBlindWatermark-78ac8f3b-59e0-45a6-9b67-32168c3f22b9"
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|
