Image recognition query

Asked by Mick Monk

So here is my dilemma.

I am attempting to make an automated process for buying items for an online game. this just needs to be a very simple script and I have completed the majority of it.

here is my question:-

I want my image recognition to recognise items priced at the value of my image ( eg: the text in the image is "Total Price: 10") and for it then to recognise all items priced at 10 or any value below that....

I am a 2 day sikuli noob and have had a look for anything similar. I am thinking the MTGOBOT has something similar however that is far beyond me at the moment.

Thanks for any help/assistance which may come my way :)

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

It would be much easier to me, to make any coding suggestion, if you give me a screenshot of the relevant screen situation.

You can send all stuff (your script and some screenshots) zipped together to my mail at https://launchpad.net/~raimund-hocke.

If you want to go on yourself:
- have a look at findAll()
- if the item screen has some regular grid layout, you may use it to calculate the item regions and check its contents
- you might try to use Region.text() to read the price of an item
- if this is not possible, you have to have images of all relevant price tags, to check which one is used with an item

Be aware: every find operation takes about 0.5 to one second (or more on larger screens). With optimum situations (restricted regions) you might come down to about 0.2 seconds. So analyzing a screen with many items to check, might take a longer time, than it might be acceptable. The only possibility to speed things up beyond that, is parallel operation: using observe(FOREVER, background=True) or sub processing.

I guess you are using the Sikuli IDE (Python scripting).

What is your system environment?

Revision history for this message
Mick Monk (mickmonk77) said :
#2

Email sent. thanks very much :)

Revision history for this message
Mick Monk (mickmonk77) said :
#3

oh my goodness, first visit back here after initial help from Raiman and I realise I never said thanks for the help received...

apologies to Raiman for abuse of his assistance <embarrased>

Revision history for this message
RaiMan (raimund-hocke) said :
#4

So it seems to be solved on that level.

Thanks for your feedback anyway.