SRL Archive - OSR Help

DTMs


xdarkshadowx

2012-12-30 16:13:17

I'm using DTMs to locate text, but the text changes color slightly depending on the angle. I've tried high tolerance and other DTM setting in scar but It doesn't seem to find the DTM anywhere.

Should I use an army of getColor functions to read the text? cause DTMs aren't working for me..

Enslaved

2012-12-30 16:27:23

Have you tried the OCR?

xdarkshadowx

2012-12-30 16:36:21

No, i heard it's not very good?..

Enslaved

2012-12-30 16:38:02

OCR= Optical Charater Recognition

xdarkshadowx

2012-12-30 16:40:25

yes but I heard it doesn't work very well, do you know where the documentation for it is? or any guides?

Wardancer

2012-12-30 16:57:00

1) Is this for a private server?

2) What text exactly are you looking for?

xdarkshadowx

2012-12-30 16:59:47

1) It's not runescape,
2) I'm just trying to locate a menu by it's name so I can get it's location and the location of all it's contents (it's always the same size, so once I find it's location I'm set). but I want it to be able to find the menu over and over again because it moves around sometimes.
The title of the menu is Overview, but it also has a symbol next to it that I was going to use as part of a DTM to help locate it. But I haven't been able to get a functioning DTM of it.

Gucci

2012-12-30 17:40:36

A DTM most likely won't work (I'm sure it won't work at all) you need to use a bitmap if you looking for text

xdarkshadowx

2012-12-30 17:45:35

The window is opaque, so it changes color a lot. only the text is likely to stay near it's color, it'll be visually white-ish no matter what kind of lighting you're in. Is my best bet just a bunch of getcolors?

Gucci

2012-12-30 17:50:12

From: xdarkshadowx
The window is opaque, so it changes color a lot. only the text is likely to stay near it's color, it'll be visually white-ish no matter what kind of lighting you're in. Is my best bet just a bunch of getcolors?


Best bet is to use a bitmap and FindBitmapToleranceIn, trust me it works ;) I had to use it for a script I'm working on cause chooseoption stopped working for a bit

DannyRS

2012-12-30 17:56:06

From: Gucci
Best bet is to use a bitmap and FindBitmapToleranceIn, trust me it works ;) I had to use it for a script I'm working on cause chooseoption stopped working for a bit


The text in the options now seems to shift slightly so theres more spacing between the chars, or the width of a char will increase / decrease by 1 pixel, fuuu jagex,

Maybe they upped the shifting slightly so its harder to compare for us?

xdarkshadowx

2012-12-30 17:59:17

From: Gucci
Best bet is to use a bitmap and FindBitmapToleranceIn, trust me it works ;) I had to use it for a script I'm working on cause chooseoption stopped working for a bit


That's what I was doing, but I had to use a tolerance of 135 just to get it to recognize it, not at all reliable…

Gucci

2012-12-30 18:40:23

From: DannyRS
The text in the options now seems to shift slightly so theres more spacing between the chars, or the width of a char will increase / decrease by 1 pixel, fuuu jagex,

Maybe they upped the shifting slightly so its harder to compare for us?


I noticed the shifting but really didn't affect my detection

From: xdarkshadowx
That's what I was doing, but I had to use a tolerance of 135 just to get it to recognize it, not at all reliable…


Must be your bitmap or something, the bitmap was your best bet

xdarkshadowx

2012-12-30 18:48:46

It's because I have an opaque backround…

DannyRS

2012-12-30 18:51:26

From: xdarkshadowx
It's because I have an opaque backround…


I dont get this, can you post a screenshot of the text your trying to find, is the text partly see through as well?

Gucci

2012-12-30 18:53:32

From: DannyRS
I dont get this, can you post a screenshot of the text your trying to find, is the text partly see through as well?


^This, can you post a screen shot?

xdarkshadowx

2012-12-30 18:59:08

I can give you a screenshot.. idk how much that will help though. it's just text with a see-through backround, and the text is also partially see through. and the lighting behind it varies greatly.

DannyRS

2012-12-30 19:00:29

From: xdarkshadowx
I can give you a screenshot.. idk how much that will help though. it's just text with a see-through backround, and the text is also partially see through. and the lighting behind it varies greatly.


Post a screenshot maybe we can figure something out, but its sounding like its going to be very hard to do, unless something somewhere is static

xdarkshadowx

2012-12-30 19:04:10

Nowhere is static, why I have to use tolerance.

DannyRS

2012-12-30 19:07:18

From: xdarkshadowx
Nowhere is static, why I have to use tolerance.


There could be something somewhere near it you could use instead or something like that, just incase someone here with mad color skills has done something we havent even thought about, post it anyway ;)

xdarkshadowx

2012-12-30 19:08:50


xdarkshadowx

2012-12-30 19:13:21

currently building a function that finds lines of white-ish pixels then compares to find 4 lines on top of eachother, then returns the location. might work, who knows. haha.

DannyRS

2012-12-30 19:18:36

From: xdarkshadowx
currently building a function that finds lines of white-ish pixels then compares to find 4 lines on top of eachother, then returns the location. might work, who knows. haha.


More or less what FindDTM's do :)

But worth a shot, there may be a way to copy an image, reduce the contrast and such so its as black and white as possible, then use a black and white dtm, but i have no idea how to do it :D

Have you maybe tried doing Not (color of the black/brown part)

If the menu for example could only be in 2-3 places, and the white would be in a normally black spot, thats always black otherwise

xdarkshadowx

2012-12-30 19:24:10

the menu can be anywhere sadly..

yes what I'm building does what I thought DTMs did.. but for some reason I couldn't get DTMs to do it. Seems like DTMs would work perfectly here but I guess not.