How to get the numer out of this picture

Hello guys,
how is it possible to get the value (Number) from this picture?
I am seeking to get the number above the blue triangle.
In this case it is the 219.


The value above the triangle is dynamic. So for another company it would be at a different point

HI,

For now, can you share attribute list of the element (219) using UiExplorer?

Regards,

Hello @alirida.alhalass

This value should be inspectable. So use uiexplorer and inspect on that value.

Then share the selector here.

Thanks

i dont get the value!
It just get the image as a whole thing.

Is it possible to search for the triangle and point few pixel above it to extraxct the text?

Hi,

How about using FindImage, TakeScreenShot and OCR as the following sample?

Sample20221112-1L.zip (3.9 KB)

Regards,

It says empty text. Did you test it? I dont get the number above the triangle. Any documentation on clipping region?

Hi,

In my environment (Studio22.10.3CE+Win10 and Studio 22.4.6+Win10) , this works.

Please make sure to have browser foreground, because it’s image manipulation.
Then, also check result.png in the project folder. This image is for OCR, like the following.

result

Regards,

It is working great!
Thanks a lot.
i just cropped the cliiping region a bit more.

New Rectangle(uie.ClippingRegion.Rectangle.Value.X+2,uie.ClippingRegion.Rectangle.Value.Y-25,uie.ClippingRegion.Rectangle.Value.Width, 25)

1 Like

Hi,

FYI, please note that as there are some scale numbers in the chart, it might be necessary to delete them by image manipulation.

Regards,

Could you please tell me more about it?
I didn’t get the idea what you are trying to point out

Hi

There are some ideas to do it.

One of the most easiest way is binalization.

1

If we convert 127 or lower value to 0 and 128 or higher to 255 in each pixel, the image will be the following.

2

To achieve this, we need code like the following for example.

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.