Azure-Samples / Azure-Samples/cognitive-services-dotnet-sdk-samples
Domain-specific content API call returns raw response
- Dominant language
- C#
- Stars
- 123
- Forks
- 166
- PR merge metrics
- No merged PRs in 30d
Description
Computer Vision
## API Name (Kind)
`ComputerVision`
## Issue Description
The `AnalyzeImageByDomainAsync()` function returns a `DomainModelResults.Results`, but it is raw JSON response, meaning the user does not know what it can get from this response, until they print the whole response as a JSON dump.
The other API calls do not have this, they have properties that represent the keys.
Requesting a fix so the user is not confused and this function is consistent with the other API calls.
Suggestion: return the properties of the results similar to the following examples:
`results.Result.name` - the name of the landmark or celebrity
`results.Result.confidence` - confidence of the correct name or face rectangle
`results.Result.faceRectangle.width` - gets the dimensions of the found face of a celebrity
https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cognitiveservices.vision.computervision.computervisionclientextensions.analyzeimagebydomainasync?view=azure-dotnet#Microsoft_Azure_CognitiveServices_Vision_ComputerVision_ComputerVisionClientExtensions_AnalyzeImageByDomainAsync_Microsoft_Azure_CognitiveServices_Vision_ComputerVision_IComputerVisionClient_System_String_System_String_System_String_System_Threading_CancellationToken_
Contributor guide
Assessment
This issue has not been assessed yet.