web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - AI Builder
Answered

Getting a Text Value from object detection

(0) ShareShare
ReportReport
Posted on by 87

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!!

 

Categories:
I have the same question (0)
  • antoinec Profile Picture
    on at
    Re: Getting a Text Value from object detection

    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?

  • MaxWendorff Profile Picture
    87 on at
    Re: Getting a Text Value from object detection

    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

  • antoinec Profile Picture
    on at
    Re: Getting a Text Value from object detection

    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.

  • v-siky-msft Profile Picture
    on at
    Re: Getting a Text Value from object detection

    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

  • npouhaer Profile Picture
    on at
    Re: Getting a Text Value from object detection

    @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

  • MaxWendorff Profile Picture
    87 on at
    Re: Getting a Text Value from object detection

    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!!

  • Verified answer
    npouhaer Profile Picture
    on at
    Re: Getting a Text Value from object detection

    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. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard