Results 1 to 8 of 8

Thread: Extrapolate

  1. #1
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default Extrapolate

    I was just curious if there's a function I might have missed, or if there's a possibility to even create a function that extrapolates a given color at coords x,y with a tolerance .. to build an undefined shape?

    Again curious; advice/tips/comments/input appreciated

  2. #2
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    You can use GetColor to return the color at specific coordinate

  3. #3
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    I was thinking something along these lines, something like an outward building TPA.


    In the example, if you follow it along from left to right, you see that it starts out with a maroon dot/pixel. Then as it progresses, it builds in (some formula?) outward, following a tolerance that is relevant to the bright red misc. shape; until it reaches the perimeter marked by the orange. (They choice of grey/black dots, are suppose to visualize the process of gathering the surrounding colors)

  4. #4
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That's some crazy lookin stuff, what are you looking to do with this? Sorry I can't be of assistance, this is way out of my level. PM Brandon if you want, he knows a bit of everything, and he usually responds to my PMs.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  5. #5
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Quote Originally Posted by Footy View Post
    That's some crazy lookin stuff, what are you looking to do with this? Sorry I can't be of assistance, this is way out of my level. PM Brandon if you want, he knows a bit of everything, and he usually responds to my PMs.
    Heh thanks :>
    It's ok, I know Brandon does a lot for SRL as it is. This is more of a side project to keep me busy, and if any onlookers want to sprout ideas/comment/etc. they're more than welcome.

  6. #6
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    I'm confused. :S Are you talking about getting the outline of the inner red shape? We have "FindTPAEdges(const p: TPointArray): TPointArray;" which will give you a TPA of all the outlining points of a TPA.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  7. #7
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    You may also want to look at some of Simba's OCR code for some examples/idea's.

  8. #8
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Ugh.. started reading the MMLCore/ocr.pas and well.. stuff like:
    Code:
        for i := 0 to high(thachars[j]) do
        begin
          if (thachars[j][i].x) + ((thachars[j][i].y) * font.width) <= nl then
            n[(thachars[j][i].x) + ((thachars[j][i].y) * font.width)] := 1;
        end;
    gives me a headache for all the reading/catching up with what being done. It's too late, I'll attempt some more tomorrow; thanks for the reference!
    Last edited by Le Jingle; 08-04-2012 at 04:19 AM.

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
  •