Page 1 of 2 12 LastLast
Results 1 to 25 of 29

Thread: Does SCAR NEED this?

  1. #1
    Join Date
    Mar 2006
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Does SCAR NEED this?

    I know there are currently a lot of problems with changing colours etc, and that dtms only work on colours... and I've always thought we need to use more than colours. Hence, I had a little google on edge detection and knocked up a script over the past 24 hours. The result is attached.

    Obviously if people deem this a decent idea I could write functions to find deformed, rotated edges etc. Combined with colours and dtms there's not much you can't find.

    If this seems useless.. think box, maze, mime solver (detect shapes, detect gates, arms etc)

    Feedback please

  2. #2
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by piv View Post
    I know there are currently a lot of problems with changing colours etc, and that dtms only work on colours... and I've always thought we need to use more than colours. Hence, I had a little google on edge detection and knocked up a script over the past 24 hours. The result is attached.

    Obviously if people deem this a decent idea I could write functions to find deformed, rotated edges etc. Combined with colours and dtms there's not much you can't find.

    If this seems useless.. think box, maze, mime solver (detect shapes, detect gates, arms etc)

    Feedback please
    I like the idea, although I don't fully understand what the picture has to do with it, except for that it looks like a mask..
    Did you make a script to detect edge's of objects on this .jpg?



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  3. #3
    Join Date
    Mar 2006
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Pic is showing the output of the script. It's an implementation of the Canny edge detection algorithm, without the gaussian mask since the rs client obviously doesn't have any noise in the image.

    http://en.wikipedia.org/wiki/Canny

    As a dll it will run fast enough to work in real time, currently takes a few seconds to produce that image. The fundamental idea is you can detect objects that are otherwise impractical or impossible to detect using colours, the most obvious example being the gate in the maze (see pic) Ideally you'd have a screen in scar similar to the DTM editor. You'd simply select what you want it to detect and save that as what you want to search for. From there it works the same as any other searching function, including deformation and rotation.

    This would also work excellent on the map for walking functions, without variables being passed from java reflection (that's cheating you know :P).

    Put simply - this will enable scar to detect objects via shapes, not just colour alone. Hence, a box, maze and mime solver are all feasible.

    Edit: forums are obviously shrinking the attachments, but you get the idea. It's dead obvious where the gates are, and I can explain how to solve the maze in words if someone desperately wants to code it, otherwise I may do it in a few weeks after exams.

  4. #4
    Join Date
    Mar 2006
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Awesome stuff Piv. This looks very handy indeed, I can see how it would be good for a box solver.
    asdf misses his ascii signature.

  5. #5
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Markus recognizes the ranger on the pic
    This looks very promising. Could you please tell your method of solving the maze?

    [offtopic]
    Looks like you have no reward left, be sure to open some chests so I at least get some reward.
    [/offtopic]
    I made a new script, check it out!.

  6. #6
    Join Date
    Mar 2006
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You can detect your location in a hallway on the map, and where the center is. Rotate your camera to face the center, walk the longest way along the hall and open gates along your way. The logic involved isn't difficult.

    And btw big thanks to markus letting me borrow a character currently in the maze. Wouldn't be able to start on a maze solver without this.

  7. #7
    Join Date
    Feb 2006
    Location
    Under a rock.
    Posts
    1,351
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Excellent stuff piv! Are you planning on releasing the plugin, or are you still perfecting it? Crazy, When you think SCAR's at its peak, Ben, pups, and piv start making stuff like SCAR is just in it's beginning stages.
    SRL Developer
    ◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘

  8. #8
    Join Date
    Mar 2006
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's currently a pile of shit haha, really crude code but it works. I'm just kinda gauging if there is a demand for this. If i go to the effort to make searching functions and make it fast enough, will you guys actually use it?

    Ben is a gnarly little maths kid, haven't spoken to pups for ages, and as for myself... I'm just me.

    I googled for this stuff like a year ago and couldn't find anything solid, there's a ton of websites with good explanations of computer vision now. It's a sweet subject. If my uni ran it... it'd probably dump engineering hehe.

  9. #9
    Join Date
    Feb 2006
    Location
    Locked in RAM's closet !
    Posts
    2,001
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Cheesehunk View Post
    Excellent stuff piv! Are you planning on releasing the plugin, or are you still perfecting it? Crazy, When you think SCAR's at its peak, Ben, pups, and piv start making stuff like SCAR is just in it's beginning stages.
    well if you have not noticed it kind of goes in a circle around the year...


    summer is when everyone is most active...

    every other time people are busy with stuff... and possibly school.


    this is some great stuff <3 it.
    Darky has stopped by to say hello :).
    10-21-2010
    Updated-
    10-09-2012

  10. #10
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Quote Originally Posted by piv View Post
    And btw big thanks to markus letting me borrow a character currently in the maze. Wouldn't be able to start on a maze solver without this.
    It's ok. Just create an awesome maze solver that owns.

    And the shape detection stuff might be usefull for an evil bob solver...
    I made a new script, check it out!.

  11. #11
    Join Date
    Mar 2006
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Update: this needs to become a dll to continue. In terms of computer processing power this isn't straining by any means but it's pushing scar to its limits. To put it in perspective, the guts of it is less than 100 lines of code and its taking 30 seconds to generate an image, and I'm not running a gaussian mask first to get better results - that may double the time. It's mainly due to hammering through 2d arrays, and the fact that the actual arctan function was left out of scar, making the trig incredibly slow. Ive downloaded a few programs that use the same algorithm and produce the same result from a webcam so it's not dodgy code. That's just to generate the image, not even begin searching.

    I'd like to write some searching functions and release this soon but its just not feasible to test if it takes 30 seconds plus each time.

    Promise to keep you updated kiddos. I'll see what I can do by downloading delphi overnight.

  12. #12
    Join Date
    Nov 2006
    Posts
    1,103
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    i guess you should talk to freddy if there is anyway of putting into scar its via him
    Infractions, reputation, reflection, the dark side of scripting, they are.

  13. #13
    Join Date
    Apr 2006
    Location
    England
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    this looks like a mask?
    there is already a bitmap mask function?

    Drewley.net Advanced Runescape Cheating Forums


  14. #14
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    A mask shows you where certain colors are. This is more like edge detection, it detects objects.
    I made a new script, check it out!.

  15. #15
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Yes; SCAR needs this. I could come up with a great amount of uses for it.

    This would be to object finding what DDTMs are to walking


    Just one question...would there be any way to make it 3d? That way it'd work from any camera angle.

    I know 3d is possible in SCAR, I just don't know how laggy it would be...probably extremely laggy....
    Interested in C# and Electrical Engineering? This might interest you.

  16. #16
    Join Date
    Feb 2006
    Posts
    406
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hey piv
    im glad to see youre still around
    how long has it been since you started? 3-4 years? haha
    it seemed like you were already an old timer when i had just started, way back at kaitnieks in like 2005

    anyway, i think the spot where edge detection would be the most useful would be in reading the text in the top left

    it is difficult because the font is slightly transparent and it is hard to set the tolerance, so a lot of people are frustrated with it

    i think edge detection could separate the letters very easily and make for accurate text reading
    it would also be pretty fast because it would only require edge detection on like a 100x8 rectangle

    side: do you live in the us? do you have msn?

  17. #17
    Join Date
    Mar 2006
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Fuck's sake... just typed a huge post and accidently closed the window. Let's do it again...

    Smartzkid...
    -It could be done in 3d, rotated about the xplane (into the screen), but I don't think it's necessary or useful, and it would be confusing as hell to use. I think regular 2d deformation will be enough.
    -Edit: lag - this thing decides how long it takes, anywhere up 40 seconds. Scar is great for simple logic, like check a colour and click, wait a bit, check again, but not for using calculus and trig on 2d arrays.

    masquerader...
    -I think I've been around since early 2002, so 5 years or more? I'm a veteran that's seen it all.
    -Edge detection should work on the text by fiddling with tolerances and perhaps a slight gaussian mask. I thought at first a gaussian mask wasn't necessary but it's looking that it may be. Little tiny rocks and bits of grass keep showing up.
    -I do have msn but dont like to keep many rs people on it, not a personal thing sorry.

    Delphi downloaded overnight... I'll get in touch with freddy soon and see what he thinks or lets me do.

  18. #18
    Join Date
    Feb 2006
    Posts
    411
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I wrote a custom edge detector that is very crude and specifically for rs.

    AutoTolerance 4:
    http://www.rscheata.net/images/4.PNG
    AutoTolerance 39:
    http://www.rscheata.net/images/39.PNG

    Takes about 150ms to do a game screen.

    We use edge detection on all object finding now.

    To reduce the 150ms footprint we instead only check 1 out of 36 pixel.
    thus 150/36 ms.

    Next we add our RGBCluster functions.

    gather 10 points:
    http://www.rscheata.net/images/c2.PNG

    We dont do shape recognition

    You can probably only need a SCAR dll function that takes like 500ms. With everyone buying dual core machines now and with most people only running one scar. Have rs on one core and scar on anouther.
    www.rscheata.net
    Home of iBot on neXus: a multi-client, minimizable, Hyrid, Color, Reflection, scriptable, multi-threaded Java Bot.

  19. #19
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    Nice approach piv, I might look into that after my exams are over *adds to todo list*

    And erm ruler, it's not nessecarilly 500ms, delphi functions can easilly be optimised to work extremely fast given the right ammount of experience...

  20. #20
    Join Date
    Feb 2006
    Posts
    411
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Freddy1990 View Post
    Nice approach piv, I might look into that after my exams are over *adds to todo list*

    And erm ruler, it's not nessecarilly 500ms, delphi functions can easilly be optimised to work extremely fast given the right ammount of experience...
    http://shootout.alioth.debian.org/gp...t=all&lang=all
    Assuming they call it " Pascal Free Pascal"

    I would estimate about 2 times faster but with 2 times the number of lines compared to Java.
    www.rscheata.net
    Home of iBot on neXus: a multi-client, minimizable, Hyrid, Color, Reflection, scriptable, multi-threaded Java Bot.

  21. #21
    Join Date
    Mar 2006
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Freddy1990 View Post
    Nice approach piv, I might look into that after my exams are over *adds to todo list*

    And erm ruler, it's not nessecarilly 500ms, delphi functions can easilly be optimised to work extremely fast given the right ammount of experience...
    Thanks.. added you to msn but you're obviously busy with study etc. I'll chat with you when you're available.

    Ruler, that first one looks very much like the second derivative of luminosity. I did that and it's fast as hell but gives dodgy results obviously.

    Might look at some other algorithms in the mean time...

  22. #22
    Join Date
    Feb 2006
    Location
    Berkeley, CA
    Posts
    1,837
    Mentioned
    52 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by piv View Post
    Ben is a gnarly little maths kid, haven't spoken to pups for ages, and as for myself... I'm just me.
    Was that a compliment XD By the way, I started this about a year ago, assuming I've still got what I did I can send it to you if you'ed like. I believe the dll I wrote was pretty fast, can't remember though
    Edit: Yea, I did more than I realized, got into houghe (sp) transfoms and the like. I can't believe the devs don't remember this... Guess its true that no one likes me Anywho, finding the triangle took 0.328 seconds (And that is with excess processing for debug output, along with other stuff besides edge detection, and shapefinding transforms, Ruler The edge detection took 100ms total), give or take 15 ms.

    Dunno how long this one took, it was saved in the folder however. Thats the binary output, grayscale is much more interesting Also, that was with a really low threashold.

  23. #23
    Join Date
    Mar 2006
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Certainly was a compliment haha..

    Why was this ignored when benland did it

    I came across the Hough transforms but didn't think much of them. I've added you to msn, I'd love to see what you've done.

  24. #24
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by piv View Post
    Certainly was a compliment haha..

    Why was this ignored when benland did it

    I came across the Hough transforms but didn't think much of them. I've added you to msn, I'd love to see what you've done.
    Pups made a boxsolver in 3 days, before Benland did, Benland was working on it for a long time already though.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  25. #25
    Join Date
    Feb 2006
    Posts
    920
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The question has already been answered Piv,
    you know BenLand is this little math kid that no one understands.
    So because we don't understand we just do like: "mmhm, yeah, woaw, jubii, hello, mmhm, yea, neat, hey, juhu" or stuff like that, so it goes in one of the eyes and out the other

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 15
    Last Post: 09-22-2008, 12:32 PM
  2. SCAR Divi 3.01 DONT associate .scar files!!!
    By chimpy in forum News and General
    Replies: 1
    Last Post: 04-21-2007, 08:49 PM
  3. Replies: 28
    Last Post: 06-22-2006, 04:27 PM

Posting Permissions

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