Results 1 to 7 of 7

Thread: Help detecting numbers

  1. #1
    Join Date
    Dec 2016
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    22 Post(s)

    Default Help detecting numbers

    Any recommendations on how to detect numbers within this image?
    Ultimately what I have is the mouse clicking the dice which randomizes the stats on the left. I want it to detect a specific number (Ex. 4 for INT) and then for it to stop clicking. I'm struggling to understand the simplest approach to detect this however. Any recommendations would be appreciated.
    MS.PNG

    Edit: I created a bitmap which it looks like I can use FindBitMapIn (within a TBox(?)) however I can't figure out how to declare the bitmap or maybe I'm completely misunderstanding this.
    Last edited by BlitzKrieger; 06-16-2017 at 01:23 AM.

  2. #2
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

  3. #3
    Join Date
    Dec 2009
    Posts
    380
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    If you want to play around with fonts you could try above suggestion.

    If all else fails, it wouldn't be as efficient but you could make a Bitmap (or even DTM) for each number and have it search that portion of the screen for a match.
    Currently: Playing OSRS legit until I get bored

  4. #4
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    This would be trivial with Tesseract.

    TesseractTool will help you get the right settings.

  5. #5
    Join Date
    Dec 2016
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    22 Post(s)

    Default

    Quote Originally Posted by Citrus View Post
    This would be trivial with Tesseract.

    TesseractTool will help you get the right settings.

    You guys are always awesome. Thanks for the assistance and I apologize for the late response was out of town at the lake. I will give this tesseract tool a shot tonight.

    EDIT: Tesseract tools works EXCEPT. It only returns 'L' Character for the '4' under LUK stat. For the other stats when wrapping them around a tbox it gives a large number of different characters mostly bizzare things such as 'I IIIK 1'

    What I am doing is the following:
    Simba Code:
    writeln(Tesseract_GetText(564, 343, 591, 358, FILTER_SMALL_CHARS));
        wait(1000);
    Last edited by BlitzKrieger; 06-18-2017 at 06:54 PM.

  6. #6
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by BlitzKrieger View Post
    You guys are always awesome. Thanks for the assistance and I apologize for the late response was out of town at the lake. I will give this tesseract tool a shot tonight.

    EDIT: Tesseract tools works EXCEPT. It only returns 'L' Character for the '4' under LUK stat. For the other stats when wrapping them around a tbox it gives a large number of different characters mostly bizzare things such as 'I IIIK 1'

    What I am doing is the following:
    Simba Code:
    writeln(Tesseract_GetText(564, 343, 591, 358, FILTER_SMALL_CHARS));
        wait(1000);
    I'm not sure why you're using the filter for smallChars. You should use the tool to find the settings that work for you.

  7. #7
    Join Date
    Dec 2016
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    22 Post(s)

    Default

    Quote Originally Posted by Citrus View Post
    I'm not sure why you're using the filter for smallChars. You should use the tool to find the settings that work for you.
    I'm an idiot - the smallchars worked. I did finally figure out how to PROPERLY use the tesseracttool though and created my own filter (wasn't needed).
    I realized what I did wrong was input my other 3 TBox's INCORRECTLY by a typo or something... opposed to looking at 568, 330 or 568, 310 it was looking at 368, 330 and 368, 310 which as you can guess was nowhere near the numbers I was actually searching for. Thanks again!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •