@steeleyj Thanks for your suggestion. Can you please tell what are the parameters you are passing from powerapps to Azure function with an example. I am not able to pass the image url from my custom image gallery.
This returns a table with a single row (I guess as a single image was submitted) with two columns - 'captions' and 'tags'. Each of the two columns contain an embedded table. In the code above I am capturing the returned table in a collection 'colImageDesc'.
Captions is a table that contains a single row with two columns: 'confidence' and 'text' where 'text' is a description/caption for the image and 'confidence' is a % representing how likely it is that the descption/caption is correct.
To display the caption, you can add a label with the following formula for the Text property (take the first row from colImageDesc, take the captions value (a table) then take the first row from the captions table and the entry from the text column).
To show the confidence, add another label with the following formula for the Text property:
I've used a round function to limit the display to just 2 decimal places.
Tags is a single column 'value' with multiple rows and lists tags (person, car, beach, etc.) representative of the image. There is no confidence rating returned, but it seems to list the tags from 'better' (most confident) to 'worse' (least confident).
An easy way to display this is to add a datatable and set the Items property as follows:
Given that the tags appear to be listed from 'most likely to apply to least likely to apply' you could use a FirstN function to limit to the first 5 results or so.
All the other ComputerVision commands appear to require 'format' and 'string' as arguments and as others here have found, there appears to be no way to pass these arguments directly from PowerApps in a way that the ComputerVision API will accept.
Fingers crossed for an update to PowerApps and/or ComputerVision to get more of the commands (especially OCR, I can see a lot of potential applications for that) working within PowerApps without resorting to FLOW, Azure Functions, etc.