tester Posted September 22, 2011 Share Posted September 22, 2011 Hello out there. I think I need some help with a problem which I am confronted now. Example: I take a screenshot with 1024x768 resolution. One second later i take another screenshot with the same resolution. The screenshots differs in one or more sections with a size of 10x10px. These sections are the interesting areas which I need to find. Any ideas? PS: The colors of the sections are changing every 100ms- cause of this fact, a comparison of difference is the only practable way to find them out. Thanks a lot for your help Quote Link to comment Share on other sites More sharing options...
FHannes Posted September 22, 2011 Share Posted September 22, 2011 Hmm, that's not really how SCAR works, to implement this you'd have to write a plugin because this requires a very cpu intensive routine. You should use SCAR to look for specific colors, bitmaps, etc... Quote Link to comment Share on other sites More sharing options...
tester Posted September 22, 2011 Author Share Posted September 22, 2011 ok... first of all, thanks for your answer. Here are some more informations - hints. The objects i want to find are attached to this post. The colours are blue and yellowlike and they are rotating. Maybe it is possible to get the form / profile of it. Any suggestions? PS: the screenshots down below are one and the same screenarea at different times (the colour rotating thing of my first post) Quote Link to comment Share on other sites More sharing options...
FHannes Posted September 22, 2011 Share Posted September 22, 2011 Yeah, the Seafight slitters, I've been over this, it's a lot harder than it looks to find, I had a fairly accurate method that I could basically improve by inputting more and more data about them into it, but the approach did have some issues. The way I looked at it was first finding the glitters by comparing the color values of the puts, basically trying to find a pattern and then wait a small amount of time to check whether they had changed. However, these are all calculations that will be fairly to very slow in SCAR. Quote Link to comment Share on other sites More sharing options...
tester Posted September 23, 2011 Author Share Posted September 23, 2011 Yeah, the Seafight slitters, I've been over this, it's a lot harder than it looks to find, I had a fairly accurate method that I could basically improve by inputting more and more data about them into it, but the approach did have some issues. The way I looked at it was first finding the glitters by comparing the color values of the puts, basically trying to find a pattern and then wait a small amount of time to check whether they had changed. However, these are all calculations that will be fairly to very slow in SCAR. mhhh... ok.. My next idea was to put every px in an multi-array and compare each px with the next taken screentshot array. I don't know, think thats too much runtime... Tricky thing... ahh... next idea.. what about to search for the most appearing color on the screenshot (eg. blue for the seamap) and then we just have to look for an 10x10px area where the color ist more different than blue (eg. yellow). Rule: the px colors nearby or around the 10x10px area should be then most apperaring color blue. (that would mean that we never get slitters near islands or monsters, but better than nothing) If this area is in the next screenshot different than before, then we have found the shiny/glitter/glitzi/slitters or how is it called. Good, bad or shxxx idea? Yeah, the Seafight slitters, I've been over this, it's a lot harder than it looks to find, I had a fairly accurate method that I could basically improve by inputting more and more data about them into it, but the approach did have some issues. The way I looked at it was first finding the glitters by comparing the color values of the puts, basically trying to find a pattern and then wait a small amount of time to check whether they had changed. However, these are all calculations that will be fairly to very slow in SCAR. mhhh... ok.. My next idea was to put every px in an multi-array and compare each px with the next taken screentshot array. I don't know, think thats too much runtime... Tricky thing... ahh... next idea.. what about to search for the most appearing color on the screenshot (eg. blue for the seamap) and then we just have to look for an 10x10px area where the color ist more different than blue (eg. yellow). Rule: the px colors nearby or around the 10x10px area should be then most apperaring color blue. (that would mean that we never get slitters near islands or monsters, but better than nothing) If this area is in the next screenshot different than before, then we have found the shiny/glitter/glitzi/slitters or how is it called. Good, bad or shxxx idea? harrr... think i've got a solution. Step1: take screenshot 1 and put every px and colour in an 1. array. Step2: take screenshot 2 and put every px and colour in an 2. array. Step3: find every difference- first hitrate should be very negative (driving ships, acting monsters eg.) Step4: take screenshot 3 and put every px and colour in an 3. array. Step5: check every founded slitter coordinate from Step 3 in the 3. array. If there are still changing colours at the spots, then we have found the slitters. mhh. waiting for my lunchbreak. then i'm going to test it. Quote Link to comment Share on other sites More sharing options...
wundertüte Posted September 23, 2011 Share Posted September 23, 2011 I am just working on the same shit and freddy i love you for Scar 3.28 - this is exactly what i just need and by the way - iam still not able with 3.27 even with reinstalling to get my functions list back its still grey and i cannot activate it again this really sucks ... you got a hint for me how to get the list back or do i have to reinstall windows XP complete ? greetz edit: yiha i found out that i still have the list in portable version Quote Link to comment Share on other sites More sharing options...
FHannes Posted September 23, 2011 Share Posted September 23, 2011 I am just working on the same shit and freddy i love you for Scar 3.28 - this is exactly what i just need and by the way - iam still not able with 3.27 even with reinstalling to get my functions list back its still grey and i cannot activate it again this really sucks ... you got a hint for me how to get the list back or do i have to reinstall windows XP complete ? greetz edit: yiha i found out that i still have the list in portable version I wasn't aware you had this issue, I've had this myself though, I'm not sure what the exact cause is, but you can easily fix it. Close SCAR and then go into "C:\Users\[You]\AppData\Local\SCAR Divi\" and delete "docks-settings.isf", then start SCAR again. I'll probable remove saving the dock settings in 3.28 anyway since it's not that important. Quote Link to comment Share on other sites More sharing options...
tester Posted September 26, 2011 Author Share Posted September 26, 2011 I am just working on the same shit and freddy i love you for Scar 3.28 - this is exactly what i just need and by the way - iam still not able with 3.27 even with reinstalling to get my functions list back its still grey and i cannot activate it again this really sucks ... you got a hint for me how to get the list back or do i have to reinstall windows XP complete ? greetz edit: yiha i found out that i still have the list in portable version Hi out there. @wundertüte any more ideas for the glitzi / slitter thing? putting each px colour into an array is just to slow... needed minutes over minutes for it. Quote Link to comment Share on other sites More sharing options...
wundertüte Posted September 28, 2011 Share Posted September 28, 2011 I am just working on the same shit and freddy i love you for Scar 3.28 - this is exactly what i just need and by the way - iam still not able with 3.27 even with reinstalling to get my functions list back its still grey and i cannot activate it again this really sucks ... you got a hint for me how to get the list back or do i have to reinstall windows XP complete ? greetz edit: yiha i found out that i still have the list in portable version Hi out there. @wundertüte any more ideas for the glitzi / slitter thing? putting each px colour into an array is just to slow... needed minutes over minutes for it. hmm it is possible to do this faster... think of your logical structure again if you wait for colorchange between each point and do one point after one is slow you have to scan all for colors and then wait for change and then scan again... Quote Link to comment Share on other sites More sharing options...
tester Posted October 2, 2011 Author Share Posted October 2, 2011 arrg. sorry. new thread between this one. Freddy :-) How do i get my scar divi from the not existing second display to my main display? any chance? PS: The second display is only at company connected. not at home Quote Link to comment Share on other sites More sharing options...
FHannes Posted October 2, 2011 Share Posted October 2, 2011 Hmm, there's not really a way to do that, you can remove your settings and/or prime settings file in Users\You\AppData\Local\SCAR Divi\. Quote Link to comment Share on other sites More sharing options...
Home Posted October 2, 2011 Share Posted October 2, 2011 What I would do is: Split the whole area into little bitmaps, then use For i := 0 to High(BitmapArray) If not findbitmap(....) then Result that Bitmap coords. ~Home Quote Link to comment Share on other sites More sharing options...
KingKong Posted October 3, 2011 Share Posted October 3, 2011 What I would do is: Split the whole area into little bitmaps, then use For i := 0 to High(BitmapArray) If not findbitmap(....) then Result that Bitmap coords. ~Home Even that will take time since he said one or more areas of 10 x 10 pixels change and i'm not sure if we can find out what changed in the 100-200ms time. If it were upto me i would get the colors of the changing thing, use ACA and find out the tolerance/whatever put them in an array and search the whole screen using getcolorstolerance or similar then split the TPA using splittpa which hopefully should work, but im not sure how long that will take. Quote Link to comment Share on other sites More sharing options...
tester Posted October 12, 2011 Author Share Posted October 12, 2011 Hi, I've got another question about the scar-divi and the comparing thing. Is it possible to exclude my screenshotfiles into another scar-file. It looks very nasty, when i got all my "bitmapfromstring" variables in my main form? Thx for your help out there. Quote Link to comment Share on other sites More sharing options...
FHannes Posted October 12, 2011 Share Posted October 12, 2011 Yes, you can create a method in another scar file, containing all of the bitmapfromstring code and all of the variables and use {.include file.Scar} to include it in your script. The include would look something like: [scar]var bmp1, bmp2, ...: Integer; procedure LoadBitmaps; begin bmp1 := BitmapFromString(...); bmp2 := BitmapFromString(...); ... end;[/scar] Quote Link to comment Share on other sites More sharing options...