cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Supriya191
Level: Powered On

How to use OCR - Computer Vision API from Azure cognitive service in PowerApps

We have the requirement to scan the image and read text from that image using powerapps. I have created "Computer Vision API" data connection and when i try to create it, unauthorized error is thrown. Please see attached screenshot. 

Can anyone tell me, is it possible to add this connection in PowerApps. Thanks.

7 REPLIES 7
Supriya191
Level: Powered On

Re: How to use OCR - Computer Vision API from Azure cognitive service in PowerApps

The error got resolved. Somehow there was a region problem with westus. 

Please tell me what are the arguments to pass into the function with one example

ComputerVisionAPI.OCR ([internal][Optional]string language, [internal][Optional]boolean detectOrientation, string format, OCRParameterImage Image)

Optical Character Recognition (OCR) to JSON

Community Support Team
Community Support Team

Re: How to use OCR - Computer Vision API from Azure cognitive service in PowerApps

Hi,

 

Please check the parameter description below:

OCR

Summary: Optical Character Recognition (OCR) to JSON

Description: Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable JSON stream.

 

Syntax:

ComputerVisionAPI.OCR ([internal][Optional]string language, [internal][Optional]boolean detectOrientation, string format, OCRParameterImage Image)

 

Parameters:

Name

Type

Summary

Required

Related Action

language

string

(Language)

The language code of the text to be detected in the image.

False

 

detectOrientation

boolean

(Detect Orientation)

he BCP-47 language code of the text to be detected in the image.

False

 

format

string

(Image Source)Values: [Image Content, Image URL]

Source of the image - either included or by reference url.

True

 

Image

OCRParameterImage

 

 

True

 

 

Reference.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Supriya191
Level: Powered On

Re: How to use OCR - Computer Vision API from Azure cognitive service in PowerApps

Thanks Michael. 

I am using the below method with parameters.

ComputerVisionAPI.OCR(Format(string), Image(OCRParameterImage))

ComputerVisionAPI.OCR("https://www.netplates.co.uk/uploads/6c62efa141e2ad113fbfa15f43dfa4bf.jpg", First(MyPictures.Url))

 

Image parameter - First(MyPictures.Url) - is the first image from image gallery.

 

What should be specified in the Format parameter? If I specify image url from my image gallery, it's throwing invalid parameter error.

"https://www.netplates.co.uk/uploads/6c62efa141e2ad113fbfa15f43dfa4bf.jpg" is the example url string, still it throws "InvalidImageUrl 
Image URL is badly formatted". 
Please help me out here. Thanks.

 

Highlighted
Supriya191
Level: Powered On

Re: How to use OCR - Computer Vision API from Azure cognitive service in PowerApps

Please help me for the parameter values in OCR function 

ComputerVisionAPI.OCR(Format(string), Image(OCRParameterImage))

format

string

(Image Source)Values: [Image Content, Image URL]

Source of the image - either included or by reference url.

True

 

Image

OCRParameterImage

 

 

True

 

What should be given for format and Image parameter with some example values, as I am getting "InvalidImageUrl 
Image URL is badly formatted" error. Thanks.

jlister
Level 8

Re: How to use OCR - Computer Vision API from Azure cognitive service in PowerApps

@Supriya191 Were you able to resolve the formatting issue? I am also interested and am wondering what parameters should be passed.

schphi
Level: Powered On

Re: How to use OCR - Computer Vision API from Azure cognitive service in PowerApps

I also struggle with getting OCR to work in PowerApps. The most puzzling to me is that autocomplete doesn't even ask for an Image as Parameter:

 

ocr.png

It only wants a format but no content or url.

 

Any ideas? Getting this to run without flow would be extremely preferable.

StevenZ
Level: Powered On

Re: How to use OCR - Computer Vision API from Azure cognitive service in PowerApps

Does anyone know if this has been resolved? I'm having the same problem - not sure how to make ocrtextv2 to work. The auto fill parameters do not make a lot sense to me.

Thanks

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 144 members 4,852 guests
Please welcome our newest community members: