diff --git a/specification/cognitiveservices/data-plane/ComputerVision/stable/v2.0/ComputerVision.json b/specification/cognitiveservices/data-plane/ComputerVision/stable/v2.0/ComputerVision.json index 7be89405de6a..a457c748970e 100644 --- a/specification/cognitiveservices/data-plane/ComputerVision/stable/v2.0/ComputerVision.json +++ b/specification/cognitiveservices/data-plane/ComputerVision/stable/v2.0/ComputerVision.json @@ -494,6 +494,14 @@ }, "x-nullable": true }, + "brands": { + "description": "Array of brands detected in the image.", + "type": "array", + "items": { + "$ref": "#/definitions/DetectedBrand" + }, + "x-nullable": true + }, "requestId": { "description": "Id of the REST API request.", "type": "string", @@ -715,6 +723,31 @@ }, "x-nullable": true }, + "DetectedBrand": { + "description": "A brand detected in an image.", + "type": "object", + "properties": { + "name": { + "description": "Label for the brand.", + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "confidence": { + "format": "double", + "description": "Confidence score of having observed the brand in the image, as a value ranging from 0 to 1.", + "type": "number", + "readOnly": true, + "x-nullable": false + }, + "rectangle": { + "$ref": "#/definitions/BoundingRect", + "description": "Approximate location of the detected brand.", + "readOnly": true + } + }, + "x-nullable": true + }, "ImageMetadata": { "description": "Image metadata.", "type": "object", @@ -1335,7 +1368,7 @@ "VisualFeatures": { "name": "visualFeatures", "in": "query", - "description": "A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid visual feature types include: Categories - categorizes image content according to a taxonomy defined in documentation. Tags - tags the image with a detailed list of words related to the image content. Description - describes the image content with a complete English sentence. Faces - detects if faces are present. If present, generate coordinates, gender and age. ImageType - detects if image is clipart or a line drawing. Color - determines the accent color, dominant color, and whether an image is black&white. Adult - detects if the image is pornographic in nature (depicts nudity or a sex act). Sexually suggestive content is also detected. Objects - detects various objects within an image, including the approximate location. The Objects argument is only available in English.", + "description": "A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid visual feature types include: Categories - categorizes image content according to a taxonomy defined in documentation. Tags - tags the image with a detailed list of words related to the image content. Description - describes the image content with a complete English sentence. Faces - detects if faces are present. If present, generate coordinates, gender and age. ImageType - detects if image is clipart or a line drawing. Color - determines the accent color, dominant color, and whether an image is black&white. Adult - detects if the image is pornographic in nature (depicts nudity or a sex act). Sexually suggestive content is also detected. Objects - detects various objects within an image, including the approximate location. The Objects argument is only available in English. Brands - detects various brands within an image, including the approximate location. The Brands argument is only available in English.", "required": false, "type": "array", "items": { @@ -1348,7 +1381,8 @@ "Color", "Tags", "Description", - "Objects" + "Objects", + "Brands" ], "x-nullable": false, "x-ms-enum": { @@ -1758,4 +1792,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/cognitiveservices/data-plane/ComputerVision/stable/v2.0/examples/SuccessfulAnalyzeImageWithStream.json b/specification/cognitiveservices/data-plane/ComputerVision/stable/v2.0/examples/SuccessfulAnalyzeImageWithStream.json index 25563786840a..179147d658af 100644 --- a/specification/cognitiveservices/data-plane/ComputerVision/stable/v2.0/examples/SuccessfulAnalyzeImageWithStream.json +++ b/specification/cognitiveservices/data-plane/ComputerVision/stable/v2.0/examples/SuccessfulAnalyzeImageWithStream.json @@ -2,7 +2,7 @@ "parameters": { "Endpoint": "https://westus.api.cognitive.microsoft.com", "Ocp-Apim-Subscription-Key": "{API key}", - "visualFeatures": ["Categories", "Adult", "Tags", "Description", "Faces", "Color", "ImageType", "Objects"], + "visualFeatures": ["Categories", "Adult", "Tags", "Description", "Faces", "Color", "ImageType", "Objects", "Brands"], "details": ["Celebrities", "Landmarks"], "language": "en", "Image": "{binary}" @@ -132,6 +132,28 @@ "confidence": 0.95 } } + ], + "brands": [ + { + "name": "Pepsi", + "confidence": 0.857, + "rectangle": { + "x": 489, + "y": 79, + "w": 161, + "h": 177 + } + }, + { + "name": "Coca-Cola", + "confidence": 0.893, + "rectangle": { + "x": 216, + "y": 55, + "w": 171, + "h": 372 + } + } ] } } diff --git a/specification/cognitiveservices/data-plane/ComputerVision/stable/v2.0/examples/SuccessfulAnalyzeImageWithUrl.json b/specification/cognitiveservices/data-plane/ComputerVision/stable/v2.0/examples/SuccessfulAnalyzeImageWithUrl.json index 8bd63c44fe61..8339de31d4b5 100644 --- a/specification/cognitiveservices/data-plane/ComputerVision/stable/v2.0/examples/SuccessfulAnalyzeImageWithUrl.json +++ b/specification/cognitiveservices/data-plane/ComputerVision/stable/v2.0/examples/SuccessfulAnalyzeImageWithUrl.json @@ -2,7 +2,7 @@ "parameters": { "Endpoint": "https://westus.api.cognitive.microsoft.com", "Ocp-Apim-Subscription-Key": "{API key}", - "visualFeatures": ["Categories", "Adult", "Tags", "Description", "Faces", "Color", "ImageType", "Objects"], + "visualFeatures": ["Categories", "Adult", "Tags", "Description", "Faces", "Color", "ImageType", "Objects", "Brands"], "details": ["Celebrities", "Landmarks"], "language": "en", "ImageUrl": "{url}" @@ -138,6 +138,28 @@ "confidence": 0.95 } } + ], + "brands": [ + { + "name": "Pepsi", + "confidence": 0.857, + "rectangle": { + "x": 489, + "y": 79, + "w": 161, + "h": 177 + } + }, + { + "name": "Coca-Cola", + "confidence": 0.893, + "rectangle": { + "x": 216, + "y": 55, + "w": 171, + "h": 372 + } + } ] } }