SRL Archive - Discussions and Debates

About ColorToleranceSpeed(3)


The_Shermanator

2008-11-09 18:54:25

Could somebody explain to me why nobody uses ColorToleranceSpeed(3)?
I just used it right now and it seems really accurate.

*If this is the wrong place, I'm sorry I didn't really know where to post it*

-Shermanator

Sumilion

2008-11-10 10:24:31

It's new, give it some time ;)

All the tutorials etc. are about RGB or HSL, even ACA is RGB or HSL (though we'd love to have XYZ in it but Freddy wouldn't let us know the tolerance formula, he has his reasons)

Wizzup?

2008-11-10 11:00:43

From: Shermanator
Could somebody explain to me why nobody uses ColorToleranceSpeed(3)?
I just used it right now and it seems really accurate.

*If this is the wrong place, I'm sorry I didn't really know where to post it*

-Shermanator


It is not used a lot, because people simply don't know how it works, and what the algorithm is. It isn't in ACA (Auto Color Aid, made by Nielsie95 and Sumilion), because Nielsie95 and Sumilion don't know how ColorToleranceSpeed 3 works.
ColorToleranceSpeed 3 is also highly sensitive, and rather slow compared to the other Color Tolerance speeds. :)

Shuttleu

2008-11-10 11:16:23

i dont know how it works
mabey someone who does know could make a tut on it and how ColorToleranceSpeed works

~shut

The_Shermanator

2008-11-10 11:20:52

Oh ok, Thanks a lot for clearing that up Sumilion and Wizzup? :D

-Shermanator

Freddy1990

2008-11-10 12:53:15

The fourth tolerance mode compares colors based on the human eye, so if you think a color looks alike, so will SCAR using that mode, making it extremely sensitive and accurate. You can also change the sensitivity which will make it so you have to use a higher or lower tolerance to achieve a similar effect.

n3ss3s

2008-11-10 14:55:21

Use CTS 3, it makes your penis bigger.

I remember when CTS 3 was new and Wizzup gave me some function and told to try it in Rimmington Mine. It freaking painted all the points of the rock's clay part… I was amused :p

Nava2

2008-11-10 15:28:30

From: Freddy1990
The fourth tolerance mode compares colors based on the human eye, so if you think a color looks alike, so will SCAR using that mode, making it extremely sensitive and accurate. You can also change the sensitivity which will make it so you have to use a higher or lower tolerance to achieve a similar effect.


So, its only shows colors of the visible spectrum, as compared to RS might show colors which are indistinguishable to us, but throw off autoers?

Cazax

2008-11-10 16:29:04

Here is how do i find a willow without sorting it with ColorToleranceSpeed(3) and SetColorSpeed3Modifiers(Sensivity):
Function FindWillow(Var X,Y : Integer): Boolean;
Var
TPA : TPointArray;
I : Integer;
Begin
ColorToleranceSpeed(3);
SetColorSpeed3Modifiers(4);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 10344398, MSX1, MSY1, MSX2, MSY2, 13);
ColorToleranceSpeed(1);
For I := 0 To High(TPA) Do
Begin
MiddleTPAex(TPA, X, Y);
MMouse(X, Y, 5, 5);
If IsUpText('illow') Then
Begin
Result := True;
GetMousePos(X, Y);
//DebugTPA(TPA, '');
Exit;
End;
End;
End;
If you want to test it:
program New;
{.include srl/srl.scar}
Var
X, Y : Integer;
Function DebugTPA(Points: TPointArray; BmpName: String): Boolean;

Var
Width, Height, ClientBMP, I, L: Integer;
xs, ys, xe, ye: Integer;

Begin
Try
Begin
xe := xs xor xs;
ye := ys xor ys;
xs := 1 shl 20;
ys := 1 shl 20;

For I := 0 To High(Points) Do
Begin
xs := Min(xs, Points[i].X);
ys := Min(ys, Points[i].Y);

xe := Max(xe, Points[i].X);
ye := Max(ye, Points[i].Y);
End;

Width := xe - xs;
Height := ye - ys;

DisplayDebugImgWindow(0, 0);
DisplayDebugImgWindow(Width, Height);
ClientBMP := BitmapFromString(Width, Height, '');

CopyClientToBitmap(ClientBMP, xs, ys, xe, ye);
For I := 0 To High(Points) Do
FastSetPixel(ClientBMP, Points[i].X - xs, Points[i].Y - ys, 255);
If BmpName <> '' Then
SaveBitmap(ClientBMP, ScriptPath + BmpName + '.bmp');
SafeDrawBitmap(ClientBMP, GetDebugCanvas, 0, 0);
DisplayDebugImgWindow(Width, Height);

FreeBitmap(ClientBMP);
End
Except
FreeBitmap(ClientBMP);
End;
Result := True;
End;

Function FindWillow(Var X,Y : Integer): Boolean;
Var
TPA : TPointArray;
I : Integer;
Begin
ColorToleranceSpeed(3);
SetColorSpeed3Modifiers(4);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 10344398, MSX1, MSY1, MSX2, MSY2, 13);
ColorToleranceSpeed(1);
For I := 0 To High(TPA) Do
Begin
MiddleTPAex(TPA, X, Y);
MMouse(X, Y, 5, 5);
If IsUpText('illow') Then
Begin
Result := True;
GetMousePos(X, Y);
DebugTPA(TPA, '');
Exit;
End;
End;
End;

begin
ActivateClient;
SetupSRL;
Wait(500);
Writeln(BoolToStr(FindWillow(X, Y)));
end.

Pic:


;)

Esteban

2008-11-10 20:12:53

From: Cazax

Pic:


;)


That is one sexy debug picture, I must say.

lordsaturn

2008-11-10 22:10:23

I use it to get the length of the progress bar in the tutorial island.

Claymore

2008-11-10 22:28:31

I have seen this in the manual and I too wondered. After reading it, i might give it a try! It looks awesome! Maybe its good for auto-coloring. ;p

And also in CTS2 is sort of similar to the debug image of CTS3, so i don't really think it's that big of a deal.

Heavenzeyez1

2008-11-11 03:07:14

It looks nastily nice!
Gonna use it.
~Eerik~

Freddy1990

2008-11-11 15:34:57

From: Nava2
So, its only shows colors of the visible spectrum, as compared to RS might show colors which are indistinguishable to us, but throw off autoers?


Well, it just looks at colors the way you would rather than in a computerish way, comparing RGB, HSL and such… Making it really accurate to find close colors, When I first created the algorithm I created a small POC app which would have a screenshot of the RS minimap and would flawlessly color the road and only the road… Then I put it in SCAR with the minimap functions, which I later removed and just converted it to a tolerance mode so it can be used with any function… On a sidenote… You don't have to use SetColorSpeed3Modifiers in most cases, I've chosen a value which should be good in most cases…

EDIT, btw Nava, that was a yes :p

Nava2

2008-11-11 21:39:33

From: Freddy1990
Well, it just looks at colors the way you would rather than in a computerish way, comparing RGB, HSL and such… Making it really accurate to find close colors, When I first created the algorithm I created a small POC app which would have a screenshot of the RS minimap and would flawlessly color the road and only the road… Then I put it in SCAR with the minimap functions, which I later removed and just converted it to a tolerance mode so it can be used with any function… On a sidenote… You don't have to use SetColorSpeed3Modifiers in most cases, I've chosen a value which should be good in most cases…

EDIT, btw Nava, that was a yes :p


Would you mind writing a tutorial on setting the modifier? :)

EvilChicken!

2008-11-11 22:17:15

First of all Freddy, thanks for explaining CTS 3.

From: Nava2
Would you mind writing a tutorial on setting the modifier? :)


I was actually going to ask the very same question, as it very few people except yourself (if any) that know how the CTS 3 algorithm works, and I believe this could be a very useful feature to have in advanced autocoloring functions like SRL's so they wouldn't have to be updated as frequently.

And, one more question, I see people are talking about you having your reasons not to release the source of CTS 3. I fully understand if you do not want to answer this, but what are these reasons?

Freddy1990

2008-11-12 01:53:27

From: Nava2
Would you mind writing a tutorial on setting the modifier? :)


Well, it's really simple… A higher sensitivity will require a much lower tolerance… And a lower one a higher tolerance, nothing more to it, it just influences the tolerance you need to input.

From: EvilChicken!
And, one more question, I see people are talking about you having your reasons not to release the source of CTS 3. I fully understand if you do not want to answer this, but what are these reasons?


It's part of SCAR, SCAR is closed source, so this is 2…

EvilChicken!

2008-11-12 02:12:46

Thank you.

One final question that noone seemed to be able to respond to on IRC, how much does the sensitivity modifier range from and to, and what is the default sensitivity?

Freddy1990

2008-11-12 07:15:09

From: EvilChicken!
Thank you.

One final question that noone seemed to be able to respond to on IRC, how much does the sensitivity modifier range from and to, and what is the default sensitivity?


It ranges from 1 to infinity i guess, but at a certain point it'll become useless… And the default value is 4