Results 1 to 24 of 24

Thread: Change in color in a box.

  1. #1
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default Change in color in a box.

    Is there a function that counts all the colors in a box (For a certain duration or a instant) and returns as a integer or something comparable?

    Example:
    A area of chicken where all the color is constant but they move and such, but once a person walks in it realizes there is a new color or a change in sum of the color and do something.. My actual use is something for real life, so reflection won't work he.


    I am not too aware of wizzyplugin but I can't find any thing that do this. I appreciate all the help I can get:P
    Last edited by Main; 02-08-2011 at 06:06 AM.
    Oh Hai Dar

  2. #2
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Yes, there is. Check out PixelShift or something.

  3. #3
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    mkay. It doesn't solve my problem thou. Am looking for a something that would point out if a new color popus up in a area of other colors.
    Last edited by Main; 02-08-2011 at 06:31 AM.
    Oh Hai Dar

  4. #4
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    The only way I can think of is get the colors of all the pixels and store them in an array removing the duplicate colors, then after a while get all colors and store again removing the duplicates, then see if any new colors have appeared. (Yes, i know this isn't the fastest, but the only way I can think of)

  5. #5
    Join Date
    Oct 2006
    Posts
    1,190
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    something like this?



  6. #6
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Oh, sorry, I didn't read the question at all.

    What you should do is just get a few small boxes and check the colors in each of them, store the colors, and then check them again. Any changed colors (with a certain tolerance, if you so please) would be done whatever you want with.

    if(NewColor[x][y] <> OldColor[x][y])then Writeln('Color ' + ToStr(NewColor[x][y]) + ' is new at point ' + ToStr(x) + ', ' + ToStr(y) + '. (Replaced color ' + ToStr(OldColor[x][y]) + '.)');

    or something.

  7. #7
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    @Bon
    Yeah definately, except mine is used for real life and I could do without the tpa out of bound. Unfortunately I am not sure what excalty is going on in fawki's script but I will try to learn it.

    @i luff,
    What am looking for is somthing like motion tracking, except it tracks new colors. I will try your ideas and see how it goes.


    If this could work, it could be motion tracking on scar heheh.
    Oh Hai Dar

  8. #8
    Join Date
    Oct 2006
    Posts
    1,190
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    real life? so what do you want to use this for?



  9. #9
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    It sounds like Main Ftw wants to make a keylogger/mouse tracker, lol

  10. #10
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Track movement of cans for my uni project. Besides, it could be fun:P I got it to work with tracking objects with certain color, but constantly adjusting the color of objects is quite annoying, so it would be nice for tpa to sums up the colors or constantly record and detect if a new color comes into the area.

    Also, it would be AWSOME if scar can draw canvas on regular screens hehe.


    EDIT: I wasn't thinking about keylogging tomtuff, but it could be (from my other thread). I was intending to make little form alarm clock. Also, didn't benland or someone made a keylogger? (Gonna go an run to check the get key hehe).
    Last edited by Main; 02-08-2011 at 08:34 AM.
    Oh Hai Dar

  11. #11
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Neither Simba or SCAR would be able to handle this.

  12. #12
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    Quote Originally Posted by Main Ftw View Post
    I wasn't thinking about keylogging tomtuff, but it could be (from my other thread). I was intending to make little form alarm clock. Also, didn't benland or someone made a keylogger? (Gonna go an run to check the get key hehe).
    There was no real seriousness to what I had said, it's just funny that you want to do movement tracking and detecting when a key is down without a huge for..to..do loop.

  13. #13
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    The color thing gotta be fast, cause the project involvs stuff accelerating in 0.5-1 G hehe. Its been good with web cam just but if i can find new colors it would be much better.
    Oh Hai Dar

  14. #14
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Again, you can't do this with SCAR/Simba.

  15. #15
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Just have an array of all the colors that you've found which will make it easy for you to detect if any new colors showed up.

    Pure colors (tol 0) is the best way to go, because yagex's coloring system starts from those colors and then they apply a coloring algorithm to their models.

    Check SmartColors, there's a function in there that captures the pure colors and returns it to the SC record.

    As for detecting new colors, anything that goes too far beyond the average rgb of the pure colors would probably mean there's a new pure color around.

    As I've said before, I wish I could look at their coloring algorythm. cts 2 is a great way to go about finding new colors / keeping track of colors tbh. Never tried scar's cts 3 tho. I still need to read up on that.

    ~RM
    Last edited by Sir R. M8gic1an; 02-08-2011 at 12:08 PM.

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  16. #16
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    RM, he wants to do this with a camera + real life objects.

  17. #17
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    RM, he wants to do this with a camera + real life objects.
    yeh well RS teaches u somethin bout real life doesnt it? its all hacking / color finding anyway

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  18. #18
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Just sayin', it will be a bit different.

    And you can't do this in SCAR/Simba.

  19. #19
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Isn't there a way to compare if a color is in a tpa without specific coordinate?

    Like I'll find all the color within a given area, and I get a new color poping out, it compares it with all the pre-recorded colors in the area and see if it matchese or not.

    EDIT: Rofl nvm.
    Last edited by Main; 02-08-2011 at 09:13 PM.
    Oh Hai Dar

  20. #20
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    Just sayin', it will be a bit different.

    And you can't do this in SCAR/Simba.
    Why not?

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  21. #21
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    Why not?
    The speed required for realtime image processing is nuts.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  22. #22
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Am trying to detect stuff like this through my web cam.





    What we are actually trying to do is to automatically count number of cans that go through a straight transparent pipe. It works well with my test can (red) and on a white wall. But when every thing is completed, the can will be surrounded by other colors of the machine and the color of the can might be different.

    Thats what am trying to solve.
    Oh Hai Dar

  23. #23
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Do you just need the total number of cans passed? Or you need to know how many blue cans passed and how many red cans passed? Will the camera be stationary relative to the pipe, and will the background behind the pipe by static?

  24. #24
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    I'm a bit out of my depth here, but I think you'd want to figure out how to remove noise from the image, or at least read up on such concepts.

    I would guess that the image you posted adds up to about 7 pure colors, and if you'd want to count red & blue cans going through a pipe then first you'd want to find the pipe, isolate it, get an area around it and then monitor for changes in that area.

    Blue and red are just two more colors to deal with, with another 'color' (trasparent) on top.

    Blue mixed with transparent and red mixed with transparent would probably make a new pure color in itself, because the image is 2D. Not 100% sure, but I think the logics are on the right path.

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

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
  •