SRL Archive - Help and Support

DDTM Editor (CTS) Question


smurg

2012-02-03 17:47:02

I was having some issues making DTM's and applying appropriate tolerances.

I logged in and out multiple times, got multiple different colors for multiple different points on my items. I ran it through GetBestColor using a CTS of 2 and got my best color and tolerance.

Question is, what CTS modifier does the DDTM editor use? I was making the dtm's in the editor and had to up or decrease tolerances due to 'Show Matching DTMs' finding more/less in the client image.

But I was thinking that the DTM editor may not use a CTS of 2 and I should not check for the DTMs in the editor, just run my script, and see if it picks up the DTMs correctly.

Kasi

2012-02-03 17:52:51

Nope, DTM Editor uses the current CTS i think so which ever one its set to as a default, default is 1, if you make it whist being in CTS 2 then it shouldn't really affect anything. best way to do it is to declare it as a DDTM i think

Edit : if you make it whilst in CTS 2 then make sure you set the CTS to 2 before searching for it

smurg

2012-02-03 17:58:21

From: pur3b100d
Nope, DTM Editor uses the current CTS i think so which ever one its set to as a default, default is 1, if you make it whist being in CTS 2 then it shouldn't really affect anything. best way to do it is to declare it as a DDTM i think

Edit : if you make it whilst in CTS 2 then make sure you set the CTS to 2 before searching for it


It's a Simba tool… I don't think setting the CTS inside a script affects anything outside the script, does it?

Kasi

2012-02-03 18:08:08

From: smurg
It's a Simba tool… I don't think setting the CTS inside a script affects anything outside the script, does it?


it doesn't directly affect it but like anything it wont work together, because your using GetBestColor with CTS 2

CTS 1: RGB comparison that uses the Pythagorean distance in the RGB cube to define tolerance. Matches if the distance <= Tolerance.

CTS 2: HSL comparison. It has two modifiers that modify the result tolerance, Hue and Saturation. The lower the modifier, the higher tolerance required for a match. They can be set seperately and therefore used to distinguish very specific colours. Some differ a lot in saturation, but very little in hue. Luminance is assigned a somewhat static function, and has no modifier.

http://docs.villavu.com/simba/scriptref/colourfinding.html#get-and-set-colour-modifiers

Edit: If your gonna use GetBestColor to find the DTM SubPoint Color when setting it whilst setting the script, remember your putting a CTS 2 Value into a DTM editor which doesnt hold, suggest or Think about Hue and saturation so you will have to use the CTS 2 color and tolerance values then later set the Hue and Sat before searching for the DTM in the Script

smurg

2012-02-03 22:41:28

From: pur3b100d
it doesn't directly affect it but like anything it wont work together, because your using GetBestColor with CTS 2

CTS 1: RGB comparison that uses the Pythagorean distance in the RGB cube to define tolerance. Matches if the distance <= Tolerance.

CTS 2: HSL comparison. It has two modifiers that modify the result tolerance, Hue and Saturation. The lower the modifier, the higher tolerance required for a match. They can be set seperately and therefore used to distinguish very specific colours. Some differ a lot in saturation, but very little in hue. Luminance is assigned a somewhat static function, and has no modifier.

http://docs.villavu.com/simba/scriptref/colourfinding.html#get-and-set-colour-modifiers

Edit: If your gonna use GetBestColor to find the DTM SubPoint Color when setting it whilst setting the script, remember your putting a CTS 2 Value into a DTM editor which doesnt hold, suggest or Think about Hue and saturation so you will have to use the CTS 2 color and tolerance values then later set the Hue and Sat before searching for the DTM in the Script


Not sure why you are quoting CTS definitions, but I just want to know what CTS algorithm the DDTM editor uses for its tolerances.

I was just explaining I'm using CTS 2 in my script and there seems to be a discrepancy when I search for the DTM in the DDTM editor than what I find when I run the script (setting the CTS to 2).

nielsie95

2012-02-04 04:56:19

You're right, the DTM editor uses the default tolerance comparison method. If you want to run it using another method, you can open dtm_editor.sex (in your Extensions folder) and adjust it.

You can just add SetColorToleranceSpeed(2) to the main proc (the last begin..end). It will also run as a normal script, not just as an extensions.

smurg

2012-02-04 18:55:37

From: nielsie95
You're right, the DTM editor uses the default tolerance comparison method. If you want to run it using another method, you can open dtm_editor.sex (in your Extensions folder) and adjust it.

You can just add SetColorToleranceSpeed(2) to the main proc (the last begin..end). It will also run as a normal script, not just as an extensions.


Alright, thanks. Perfect.