cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MaxWendorff
Helper II
Helper II

Getting a Text Value from object detection

Hello, 

 

I have been working with the object detector. As a test model I used a calculator. Everything works fine however I am struggling with how to pull the result of the scan onto a label. I just want the object name that is scanned to be put in a label. Right now the labels code that I am trying to use is as follows:

 

 

ObjectDetector1.VisionObjects.displayName

 

Any help would be much appreciated!!

 

1 ACCEPTED SOLUTION

Accepted Solutions

The easiest way is to use a data table (Insert > Data table)

 

Then select your data table and in the formula bar type: 

ObjectDetector1.VisionObjects

 

Once that's done, you just need to select the fields you want to display. (Edit fields from the right panel and then select the fields you want to display like displayName and count). 

 

If you want more control over the visualization, you can use a productGallery instead of a data table. 

View solution in original post

7 REPLIES 7
antoinec
Power Apps
Power Apps

Hi Max, would you be able to provide a visual example of what you are trying to achieve? Are you trying to detect an object and then extract text within the bounds of that object? Or are you just trying to extract text from an image?

Yes! Below is the test app that I am running as you can see it registers the calculator. In the label below I am trying to have it say "calculator." or whatever the object is be it a stapler or glasses etc. Let me know if you need any more info!

 

Unknown.jpeg

Ah ok, that makes sense. I think what you're looking for is "First(ObjectDetector1.Results).tagName". Let me know if that works or if I misunderstood.

Hi  @antoinec 

It seems we are not able to exact Text from the ObjectDetector component since we cannot find any Results outcome.

Am I miss something?

Annotation 2020-02-27 143157.png

Sik

@MaxWendorff , 

 

If you only have one object, you can use this:

If(First(ObjectDetector1.VisionObjects).count > 0, First(ObjectDetector1.VisionObjects).displayName)

 

The If statement is here just to make sure there is at least one object in the picture. 

 

Thanks,

Nicolas

That 100% works for 1 object!! However I have 3 different objects (Stapler,Calculator and Safety Glasses) would there be a way as of now to be able to get the result in text from the other two? Or does this method only work with a one object model? Let me know what you think and I appreciate the help!!

The easiest way is to use a data table (Insert > Data table)

 

Then select your data table and in the formula bar type: 

ObjectDetector1.VisionObjects

 

Once that's done, you just need to select the fields you want to display. (Edit fields from the right panel and then select the fields you want to display like displayName and count). 

 

If you want more control over the visualization, you can use a productGallery instead of a data table. 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Kudoed Authors
Users online (2,277)